News:

Use the "Forum Search"
It may help you to find anything in the forum ;).

Fatal crashes when trying to view networks on the minimap

Started by freddyhayward, April 22, 2019, 12:44:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

freddyhayward

I have networks/passengers/transfers selected on the minimap by default and have been experiencing regular crashes. I experimented with different combinations and sequences and tabled the results. The cause of the crash seems to be an attempt to display nodes of a nonexistent network. I have video recordings to be uploaded if necessary.
Action Result
new game -> open map no crash
new game -> place stop no crash
new game -> place stops no crash
new game -> open map -> place stop crash
new game -> place stop -> open map crash
new game -> place stops -> open map crash
new game -> place stops -> create mail line -> open map crash
new game -> place stops -> create passenger line -> open map no crash
existing game -> open map -> uncheck transfers -> uncheck networks no crash
existing game -> open map -> uncheck transfers -> select mail no crash
existing game -> open map -> select mail crash
existing game -> open map -> uncheck networks crash

ACarlotti

It's an off-by-one error in the upper bound for a loop in gui/karte.cc, which would manifest if there were halts that weren't transfers. Although I'm slightly unsure why you're penultimate case would crash. Can you test this again (and also recheck the other cases) once James has incorporated my fix?

jamespetts

Thank you both - I have now incorporated A. Carlotti's fix. I cannot reproduce the last crash with this fix; I should be grateful if you could re-test with 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.

freddyhayward

QuoteI'm slightly unsure why you're penultimate case would crash.
This crash happens when there is a passenger network but no mail network. If both are present then switching doesn't cause a crash.

ACarlotti

Quote from: freddyhayward on April 22, 2019, 10:33:48 PM
This crash happens when there is a passenger network but no mail network. If both are present then switching doesn't cause a crash.

If you can still produce that crash using the upcoming nightly build, then can you upload a save which demonstrates it?

jamespetts

For reference, when I fix a problem in the code, it will be incorporated into the next nightly build. This is usually compiled at around 0500-0600h GMT every day, so you will need to wait until the build from after circa 0600h on the 23rd of April 2019 to check whether this is solved - unless you are compiling yourself, of course.

My apologies if you already knew this; it is not obvious whether this is obvious.
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.

freddyhayward

The problem seems to have been fixed in the latest build.

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.