News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

Bug: low bridge built over active canal

Started by whaleberg, August 15, 2018, 10:30:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

whaleberg

I saw an instance where a city built a new low bridge over a canal that I had constructed.  This trapped my ships and made me unable to continue to use the canal.  I had to switch to the public player in order to make the bridge higher. 

It seems like bridges should check if they are obstructing a way before they are built.

jamespetts

This is intended to be how it works (a feature implementing the behaviour of preventing towns building low bridges over public rights of way was implemented some time ago) - but this will be difficult to track down without a saved game in which I can reliably reproduce this occurring at a specific place and time so that I can trap the execution of the faulty code in the debugger and work out exactly what is going wrong. I appreciate that this is likely to be hard to reproduce in this way.

Can I check - is the canal in question a public right of way? (If it is, it will be marked as a public right of way in its information dialogue).

Incidentally, welcome to the forums!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

ACarlotti

Also, could you please confirm what version you were using when the bridge was built? I have very recently merged some changes made in Standard in late 2014, during which time the code for bridge heights was changed several times, so it is possible that I have accidentally (re)introduced a bug.

whaleberg

Thanks for the response!  I'm really enjoying extended. 

I'm sorry this was kind of worthless bug report... I didn't think to report it right away and had already saved over the file by the time I decided to.  I had left the game running for a few hours while I went out and I came back to find hundreds of messages saying my ships can't find a route.  I don't have a save game from before it was built.  Incidentally, a rolling autosave would be useful...

It's definitely not a public way now, it's marked as belonging to "default player" which I'm assuming is me... I ended up rebuilding it when I raised the bridge, so it's hard to say what it was before.  I'm pretty sure that I built it as the default player instead of the public service player and never did anything to convert it to a public way.  I don't have any way of verifying it though.

I'm using version 120.2.1 Extended Nightly Development Build 14.0 #bf81728

I've included a screenshot of the offending bridge post raising, although I'm not sure it can help much... ( I had to downscale the resolution a lot to get it small enough to attach, sorry for the terrible quality.)  There's on other oddity in the screenshot, which is a fishing port on the lower left that was built on a tiny landlocked lake that's disconnected from the Fishing Grounds. 

Thanks for all the hard work on extended!

ACarlotti

Quote from: whaleberg on August 16, 2018, 02:45:16 AMIncidentally, a rolling autosave would be useful...
The following setting exists in simuconf.tab

# autosave every x months (0=off)
autosave = 0

If set to 1, then this will produce an autosave every game month. These are saved with a name reflecting the month in which the save is made, so you could have up to 12 such saves at one time (which for me is about 12 hours of playing time). The name does not reflect the original save name, however, so if you play September for one game and then play September for a different game (or again in the first game), the second autosave will overwrite the first one.

EDIT:
As for the original bug, it is possible that it either has been fixed, or will be fixed in the course of merging in further changes from Standard, followed by some additional bug fixes that I intend to make (to both Standard and Extended) in the future. So unless you can reproduce this again in an up-to-date build, then I think it is unlikely that we will be able to do any more than keep an eye out for this sort of bug when working on that code.

jamespetts

Thank you for letting me know the position - I am glad that you are enjoying Extended. If you find that this occurs again, please do let us know and we can look into it in more detail.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

whaleberg

Oh, did not know about that autosave option.  Thank you very much.

I'll let you know if I see the bridge issue again and try to capture a save the reproduces it. 

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

whaleberg

So this did end up happening again in the same game.  I had an autosave right before it happened (about 2 minutes on fast motion), and by replaying it repeatedly I was able to reproduce it once more.  That seemed to be a rare occurrence though since I tried a number of times and only reproduced it once.  Maybe it can help?  I'm not sure exactly how the game decides what to build so I'm not sure if there's any way to debug it sanely...

I've played another 20 years of the same game after the bridge without any more incidents.

I put the save game and some screenshots on github because I wasn't sure what the right place to upload was. It seems like this forum has a rather low file size restriction.

https://github.com/whaleberg/simutrans-extended-bug-repro

ACarlotti

Which version of the game are you using? For a bug like this it is likely that we will need to be running the same (or a very similar) version in order to reproduce it too. The version is a hexadecimal string at the end of the title of the window, and corresponds to the id of the git commit used to build it.
Also, which version of the pakset?

jamespetts

This is likely to be very difficult to test, but I have just pushed a speculative fix for this, which I suspect has a good chance of resolving this. I should be grateful if anyone could let me know whether this recurs after to-morrow's nightly build.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.