The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: Vladki on August 21, 2016, 09:45:42 AM

Title: City roads are "bridleway" with timeline off
Post by: Vladki on August 21, 2016, 09:45:42 AM
I have noticed this on the testing network server (server.exp.simutrans.com). The game was started with timeline on, but later switched to timeline off. Now as the city grows, it rebuilds public roads to bridleways, thus disrupting road traffic (too low weight limit). I suggest that city roads either obey the timeline even if it is off, or that the most modern cityroad is used instead of oldest. A game with timeline off should be IMHO the "easy" game.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on August 21, 2016, 12:00:57 PM
Thank you for that. I have now changed the method for selecting city and inter-city roads in the case where the timeline is disabled to choose more suitable roads.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on August 27, 2016, 03:11:55 PM
Thanks, seems fixed, server game now builds hot-rolled asphalt road 280 mm by default (no-timeline, game year 2032)
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on September 16, 2016, 09:39:00 PM
I have restarted the server with freshly compiled executable and pakset, and foud that some city roads got rebuilt again to bridleway. I have repaired a piece of road at trnava - new cemetery, but left a piece at osterskar - builders yard as evidence
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on September 16, 2016, 09:43:46 PM
You write that "some" city roads were thus built - can you elaborate as to which ones? Is this on new map generation, or the expansion of roads?
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on September 16, 2016, 11:57:09 PM
If you look at the server game you'll find about 3 tiles of bridleway near the builders yard at Osterskar. The road was there before - I think that the houses nearby have grown (upgraded) and rebuilt the road. The same happened at the cemetery - 2-3 tiles of existing (intercity) road on both sides of rail crossing have been changed to bridleway as the city grew closer.

I have tried to grow the Osterskar city as public player and the roads have been upgraded to asphalt.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on September 18, 2016, 11:07:35 PM
This is very odd. Are you able to define circumstances in which a specific tile of road will reliably downgrade to a bridelway?
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on September 26, 2016, 05:37:07 PM
It happened again on the test servergame - see the railway station at Selpice - there is a long continuous stretch of bridleway, destroying bus lines.

It looks like most of the bridleways - anywhere on the map, are in places where city buildings are only one one side of the road, while on the other is something else: factory (builders yard at Osterskar), station and fields at Selpice, open country (Bohdanovce), runway (Kopanka), rail track (Trnava - near railway works ZOS), church at Modranka
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on September 26, 2016, 10:28:21 PM
Hmm - is there a way in which I can reliably reproduce a specific piece of road being downgraded to a bridleway so that I can capture the actual mechanism by which that specific tile is downgraded in the debugger?
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on September 27, 2016, 06:43:29 AM
I dont know. It always happened while the server was running unattended. And btw should not the server stop if nobody is connected?

I would try to fix those roads on local copy and turn fast fwd on.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on September 29, 2016, 10:53:52 AM
The server will stop if nobody is connected if the relevant setting is set, otherwise not. If this setting is set and the server does not stop, this would be a separate bug; if you find that this is so, I should be grateful if you could post a fresh bug report.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on October 01, 2016, 06:17:34 PM
I am having considerable difficulty reproducing the bridleway issue. I can see bridleways when I load the server, but they do not seem to generate when I run the game. I am afraid that I will need some more detailed steps about exactly how to reproduce this if I am to track this down (such as a saved game in which it is known that a specific tile of road will be downgraded in a specific month in the future after being loaded).
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on October 09, 2016, 10:03:25 AM
I have tried running the game from server with fast forward, but no bridleways appeared. I have fixed most of them on server by growing the cities as public player. However one city - bohdanovce does not grow at all. It may be related bug to bridleways, as there are also some of them. I managed to get the city grow again by upgrading all roads in the city by hand. Server game is left in the non-growing state.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on October 23, 2016, 06:31:08 PM
Hmm, it happened again, while nobody watched... And again it is in places where there is a station (trnava cargo), railroad (ZOS depot) or runway (kopanka) next to the road.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on October 23, 2016, 06:59:49 PM
Very odd. It will be extraordinarily difficult to fix this issue unless there is a way of reproducing it reliably at a certain place and time.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on December 21, 2016, 07:39:23 PM
After almost a week of running on the server, bridleways again appeared on random places. With the most strange one being inside the tunnel. All of them were quite heavily used, which makes me think if they were not worn out as the owner is long bankrupted - but freeplay is on. But all the tiles in tunnel should have the same wear and indeed they have 97% condition, both asphalt and bridleways...
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 21, 2016, 09:48:40 PM
Quote from: Vladki on December 21, 2016, 07:39:23 PM
After almost a week of running on the server, bridleways again appeared on random places. With the most strange one being inside the tunnel. All of them were quite heavily used, which makes me think if they were not worn out as the owner is long bankrupted - but freeplay is on. But all the tiles in tunnel should have the same wear and indeed they have 97% condition, both asphalt and bridleways...

It will be fantastically difficult to fix this unless there is a method of reliably reproducing this (i.e., a specific tile that is known to downgrade incorrectly at a specific time in a specific saved game).
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on December 21, 2016, 10:46:33 PM
I know, this is like ghost coming and changing the roads... Just noticed that newly built roads say Built: January,0, some older roads 1970. Nothing in between
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 21, 2016, 10:59:24 PM
Very odd. I am also away from my usual computer at the moment, so cannot easily work on the code: I will have to look into this when I get back from my Christmas break in January. Until then, I am working on rescaling/improving the road vehicles.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on December 28, 2016, 10:04:24 PM
I have a susipcion that the server.exp.simutrans.com does not pause while players are disconnected....

The bridleway conversion seems to happen in places where city is growing along an existing road, or more precisely when a road is being taken over by city. And most often when such road should be upgraded to more modern, and/or has been used - i.e. worn out (not completely, but not 100% new).

I know this his hard to track, just putting down more info for future bug hunting...
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 28, 2016, 10:13:12 PM
Is this server set to pause when disconnected? If it is, but it fails to do so, that is a separate bug in its own right which will need to be investigated.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on December 28, 2016, 10:27:53 PM
pause_server_no_clients was commented in simuconf.tab. Well, let's see after next update/crash/restart.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 28, 2016, 10:31:53 PM
Ahh, I see.
Title: Re: City roads are "bridleway" with timeline off
Post by: Ves on December 28, 2016, 10:38:11 PM
I checked the swedish server today and that was way out in the future!
Title: Re: City roads are "bridleway" with timeline off
Post by: Rollmaterial on December 28, 2016, 11:32:14 PM
Here the roads at city edges wear out completely without upgrading (i. e. "upgrade" to mothballed road).
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 28, 2016, 11:37:09 PM
Quote from: Rollmaterial on December 28, 2016, 11:32:14 PM
Here the roads at city edges wear out completely without upgrading (i. e. "upgrade" to mothballed road).

Who is the owner of these roads?
Title: Re: City roads are "bridleway" with timeline off
Post by: Rollmaterial on December 29, 2016, 12:04:01 AM
I own them but they have pavements.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 29, 2016, 12:13:57 AM
Quote from: Rollmaterial on December 29, 2016, 12:04:01 AM
I own them but they have pavements.

Had you set these not to upgrade?
Title: Re: City roads are "bridleway" with timeline off
Post by: Rollmaterial on December 29, 2016, 12:16:17 AM
No.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 29, 2016, 12:24:59 AM
This does not seem to be correct behaviour, in that case. If you can give steps reliably to reproduce the occurrence of this phenomenon, I will look into trying to fix it when I get back home in around the second week of January.
Title: Re: City roads are "bridleway" with timeline off
Post by: Rollmaterial on December 29, 2016, 01:20:53 AM
Actually it applies only to city roads that are "unowned or privately owned" and outside the city limits (i. e. in "open countryside").
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on December 29, 2016, 05:11:30 PM
Quote from: Rollmaterial on December 28, 2016, 11:32:14 PM
Here the roads at city edges wear out completely without upgrading (i. e. "upgrade" to mothballed road).

I had also one such example. Perhaps the road is not renewed because the owner is very deep in debt (milions) although freeplay is on. So no bankruptcy.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 29, 2016, 05:12:07 PM
Are these roads public rights of way?
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on December 29, 2016, 09:56:05 PM
They are public right of way, but It is hard to guess what they were before... It seems that some were public right of way and some not.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 29, 2016, 10:01:31 PM
The code should work as follows: if the way is worn out and in need of renewing, renew it unless:

(1) it is owned by a player with insufficient money to upgrade it;
(2) it has been marked by a player not to be upgraded; and
(3) it is owned by nobody, is not in a town and is not a public right of way.

There should not be circumstances in which city roads are not in the towns of which they are roads. Are you getting circumstances occurring where roads are failing to upgrade, and are becoming degraded, where the above do not apply?
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on December 29, 2016, 11:35:03 PM
1) - As said before - all players are bankrupt, but freeplay is enabled
2) - I don't know how to do (or check) that
3) - nobody - yes, not in town - probably yes, public right of way - sometimes yes sometimes not

On the server.exp.... there is a stretch of bridleway at 24,106 - 24,97 that is unowned, public right of way, has a sidewalk but is out of city limits. Some tiles of it are in quite bad condition (18%) some still good (85%). I think it was built as the city grew, and the growth was blocked by railway. Also other places where it happened were on the edge of the city, and on busy roads. So it may be that the piece of road was taken by the city (unowned), but the city limits did not extend that far. And a time to upgrade has come. Probably the public right of way makes a difference whether the road becomes mothballed (not public) or bridleway (public)
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 29, 2016, 11:38:40 PM
Hmm - I will have to look into this in more detail when I get home.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on December 30, 2016, 11:14:41 PM
Quote from: Ves on December 28, 2016, 10:38:11 PM
I checked the swedish server today and that was way out in the future!

It seems that the new bridgwater brunel server is also running int he background - perhaps the default is NOT to pause.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on December 30, 2016, 11:31:28 PM
Quote from: Vladki on December 30, 2016, 11:14:41 PM
It seems that the new bridgwater brunel server is also running int he background - perhaps the default is NOT to pause.

I think that that is explicitly set to pause - I shall have to look into this.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on January 05, 2017, 09:43:27 PM
I hope I have found a way to replicate the bridleway issue. On the server game I have prepared a scene - look at town Bohdanovce - there is a rail track alongside a road with some traffic. On the other side of the road, there is the town. It cannot grow to the other side of the road, as it is blocked by the track. As houses are built near the road - the road is taken over by nobody (unowned) - turned to public right of way, but is still outside of the city. And that is the piece of road that I expect to turn to bridleway, when it should be renewed.

Oh **** the server crashed... I have to recreate that again

Edit: server up again, set to run even wehn everybody is disconnected, let's see what happens with the roads
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on January 08, 2017, 05:23:03 PM
So, I have one more appearance of the bridleway. It is on the server.exp.simutrans.com - (80,72) - near brewery Trnavan. That tile was owned by public player, public right of way, and is now within the town (just on the border), but may have not been when it turned to bridleway. It has the sidewalks, and is unowned now. The road tile next to it (in direction out of town) is in 99% condition, which means it was renewed recently, as there is quite some traffic on it.

The experiment setup at Bohdanovce has no result so far, but I expect the tile (128,99) to turn to bridleway or mothballed road soon, as it is in 25% condition.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on January 08, 2017, 11:10:12 PM
Thank you for this. I have just pushed a possible fix for this, but have not had the chance to test it yet. Would you be able to test this and let me know whether the problem recurs? Thank you very much for all the information on this.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on January 08, 2017, 11:47:26 PM
Server has been restarted, let's run it a few days and see what happens.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on January 21, 2017, 10:32:42 PM
After leaving the server unattended for quite a while, no bridleways appeared, but one tile of road was mothballed.

Again it was on the edge (outside) of the city - unowned (with sidewalk), but this time it was NOT public right of way. Again it was a busy road, and neighboring tiles were most probably renewed. The road used to be owned by human player, but as the city grew near it was taken over by the city (unowned), but was still outside of the city borders and without public right of way.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on January 22, 2017, 11:23:20 PM
This is intended behaviour - if the road is unowned and not a public right of way, it will not be maintained for free. A player who wishes to use it will need to maintain it.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on January 23, 2017, 07:55:05 AM
Quote from: jamespetts on January 22, 2017, 11:23:20 PM
This is intended behaviour - if the road is unowned and not a public right of way, it will not be maintained for free. A player who wishes to use it will need to maintain it.
But the road was originally private. It would be impossible to watch if city has taken over my roads in large network game.


Sent from my ONEPLUS A3003 using Tapatalk

Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on January 23, 2017, 10:06:38 AM
Is the problem then that a city somehow takes over a road that ends up being outside a city border?
Title: Re: City roads are "bridleway" with timeline off
Post by: Rollmaterial on January 23, 2017, 11:20:27 AM
Yes.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on January 23, 2017, 04:46:00 PM
Exactly

Sent from my ONEPLUS A3003 using Tapatalk

Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on January 23, 2017, 09:24:28 PM
That is very odd - can either of you narrow down the circumstances in which this occurs?
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on January 23, 2017, 10:17:09 PM
The city borders are defined by city houses. Lets have a city from which you build a private road to somewhere. The city grows along the road. As it extends by building new houses it takes over your road. But it takes over not only the tile directly adjacent to the new house but also one more on both sides. The tile outwards from the city is then unowned, but outside of city limits, and not renewed when it should be.
Title: Re: City roads are "bridleway" with timeline off
Post by: jamespetts on January 23, 2017, 10:26:58 PM
Hmm - this is possibly a bug with the city borders algorithm, in that case.
Title: Re: City roads are "bridleway" with timeline off
Post by: Vladki on March 21, 2017, 09:36:23 PM
Well, this happened again on the server.exp.simutrans.com:13353
A piece of road that was "Public property" but without public right of way has been taken over by city (unowned + sidewalk), but still not within city borders. Subsequently it missed its renewal time and has been mothballed.

(http://server.exp.simutrans.com/screenshots/simscr34.jpg)