Skip to main content
Topic: Reliable crash due to simutrans-experimental.xml (Read 8706 times) previous topic - next topic

Reliable crash due to simutrans-experimental.xml

I can get a reliable crash on startup with a simutrans-experimental.xml file present.  (7.2 as revised.)

If deleted the game runs (and after the bugfix mentioned in another thread regarding disabling the convoy replacer code in the load-save code, it actually works properly).  I may or may not get a chance to trace this down -- it might be any copy of it, or it might require certain data in it.   (My first test was to delete it, so I don't have any copy of the file right now, but I've had this happen with several different versions of the file.)

Re: Reliable crash due to simutrans-experimental.xml

Reply #1
There is an incompatibility between simutrans standard and experimental version 7.2 based on 102.3.
Will be fixed in Simutrans Experimental 8.
Unfortunatelly we could not fix it for the interim version 7.2 to maintain compatibility with previous 7.x versions.
The journey is the reward!

 

Re: Reliable crash due to simutrans-experimental.xml

Reply #2
There is an incompatibility between simutrans standard and experimental version 7.2 based on 102.3.
Will be fixed in Simutrans Experimental 8.
Unfortunatelly we could not fix it for the interim version 7.2 to maintain compatibility with previous 7.x versions.

There's more than that to this bug.   I can generate a *new* settings-experimental.xml (by changing the settings in the map-creation window) with the *current* version and it will crash the *current* version.

Re: Reliable crash due to simutrans-experimental.xml

Reply #3
Thanks for extensive testing :)

Could you please post the damaged .xml?
I cannot reproduce this error :(
The journey is the reward!

Re: Reliable crash due to simutrans-experimental.xml

Reply #4
OK, I've managed to generate another xml file which breaks things. ;D  Here you go.

I'm guessing there's some one particular setting change which is getting either written or read wrong.

If you can't reproduce it with this file, I'll retry with your current codebase.

Re: Reliable crash due to simutrans-experimental.xml

Reply #5
Bernd,

any progress in tracking this one down?
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.

Re: Reliable crash due to simutrans-experimental.xml

Reply #6
I'm sorry, I cannot reproduce it with my current branches.
The journey is the reward!

Re: Reliable crash due to simutrans-experimental.xml

Reply #7
No, I haven't been able to reproduce XML related crashes with XML files generated by the latest versions. Odd. Thank you for looking into it, though.
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.

Re: Reliable crash due to simutrans-experimental.xml

Reply #8
Backtrace for your enjoyment:

Code: [Select]
Program received signal SIGSEGV, Segmentation fault.
0x080887d1 in weg_t::calc_bild() ()
(gdb) bt
#0  0x080887d1 in weg_t::calc_bild() ()
#1  0x0808019a in grund_t::neuen_weg_bauen(weg_t*, unsigned char, spieler_t*) ()
#2  0x08066e1e in wegbauer_t::baue_fluss() ()
#3  0x080694d8 in wegbauer_t::baue() ()
#4  0x08241ae7 in karte_t::create_rivers(short) ()
#5  0x082446b3 in karte_t::distribute_groundobjs_cities(int, short, short) ()
#6  0x0824a1c6 in karte_t::enlarge_map(einstellungen_t*, signed char*) ()
#7  0x0824bc5b in karte_t::init(einstellungen_t*, signed char*) ()
#8  0x082022e9 in simu_main(int, char**) ()
#9  0x0828b12a in main ()

Ah-HA.  I figured something out: it's crashing generating a new map *for the demo*.  I had to delete demo.sve due to an entirely different set of crashes (the ****ertion failures deleting nonexistent industry fields).  

Try removing demo.sve and see if you can reproduce this crash *now*.

Re: Reliable crash due to simutrans-experimental.xml

Reply #9
Hmm, this doesn't look anything like anything to do with settings-experimental.xml. I noticed that, in the latest trunk version, there was a fix related to rivers and map generation, which I have now incorporated into -devel. Could you test using the latest code from -devel and tell me whether you can reproduce this?

Thank you.
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.

Re: Reliable crash due to simutrans-experimental.xml

Reply #10
The crash with simutrans-experimental.xml in Version 7.2 is caused by the last but one umgebung_t setting. It remembers the "hilly" setting.
Creating the demo map fails, if it is "true". Set it to false and program starts again.
This does no harm in my master branch although I didn't fix anything, so it should be fixed in next Simutrans-Experimental Version.
The journey is the reward!

Re: Reliable crash due to simutrans-experimental.xml

Reply #11
The crash with simutrans-experimental.xml in Version 7.2 is caused by the last but one umgebung_t setting. It remembers the "hilly" setting.
Creating the demo map fails, if it is "true". Set it to false and program starts again.
This does no harm in my master branch although I didn't fix anything, so it should be fixed in next Simutrans-Experimental Version.

Good to track it down.  I recently merged from your master branch but I'm still getting the same crash.... so it may well not be fixed....

Since this is related to the climate dialog I'm wondering if the const-correctness violation could possibly be related....

Re: Reliable crash due to simutrans-experimental.xml

Reply #12
Neroden,

can you try with the official Linux binary releases of 7.3, which are now available?
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.

Re: Reliable crash due to simutrans-experimental.xml

Reply #13
Neroden,

can you try with the official Linux binary releases of 7.3, which are now available?

Still crashing:

#0  0x080884c1 in weg_t::calc_bild() ()
#1  0x0807f14c in grund_t::neuen_weg_bauen(weg_t*, unsigned char, spieler_t*)
    ()
#2  0x08066ce7 in wegbauer_t::baue_fluss() ()
#3  0x08068e10 in wegbauer_t::baue() ()
#4  0x08230211 in karte_t::create_rivers(short) ()
#5  0x08232e1d in karte_t::distribute_groundobjs_cities(int, short, short) ()
#6  0x08238fdb in karte_t::enlarge_map(einstellungen_t*, signed char*) ()
#7  0x0823ae77 in karte_t::init(einstellungen_t*, signed char*) ()
#8  0x081f3f6d in simu_main(int, char**) ()
#9  0x08275bc9 in main ()

Since it's dying in river creation I wonder if it has to do with the changed river settings....
I'm going to make a build with debugging information so I can check the data out.

Re: Reliable crash due to simutrans-experimental.xml

Reply #14
Hmm, that's odd. I'm not getting any crashes in Windows... Thank you for looking into this. Are you getting this on map creation?
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.

Re: Reliable crash due to simutrans-experimental.xml

Reply #15
Hmm, that's odd. I'm not getting any crashes in Windows... Thank you for looking into this. Are you getting this on map creation?

Only for the demo.

Re: Reliable crash due to simutrans-experimental.xml

Reply #16
What do you mean?
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.


Re: Reliable crash due to simutrans-experimental.xml

Reply #18
Ohh, I see what you mean - if there is no demo.sve? Hmm, that's odd. I haven't tested that, as I generally leave demo.sve in place... Is that the only time that it crashes?
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.

Re: Reliable crash due to simutrans-experimental.xml

Reply #19
Ohh, I see what you mean - if there is no demo.sve? Hmm, that's odd. I haven't tested that, as I generally leave demo.sve in place... Is that the only time that it crashes?

Yes.

Re: Reliable crash due to simutrans-experimental.xml

Reply #20
Is this somehow related to settings-experimental.xml, or is the thread title out of date now?
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.

Re: Reliable crash due to simutrans-experimental.xml

Reply #21
Is this somehow related to settings-experimental.xml, or is the thread title out of date now?

Yes, it is related to one of the settings in that file.  If the file is absent or lacks certain settings there is no crash.

Possibly the "hilly" setting.  Possibly one of the others.

I'm not sure why any of the user-chosen climate settings are affecting the generation of the demo.  This is probably a bad idea.  For instance, my specification of 1024 rivers would probably not go down well when generating a tiny demo.

Re: Reliable crash due to simutrans-experimental.xml

Reply #22
Neroden,

thank you very much for the information. This is a very bizarre problem to track down - I cannot find the ultimate cause of it, but I have managed to add a small workaround preventing the crash from occurring and enabling the game to start as normal with no demo.sve in place. Hopefully, this should suffice for the time being!
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.