Skip to main content
Topic: [crash devel] crash when loading save (Read 4557 times) previous topic - next topic

[crash devel] crash when loading save

crash in devel with mesilliac's circular route patches.
(e.g. last state of his master branch)
http://github.com/mesilliac/simutrans-experimental/tree/
the crash however looks on a first glance more likely to be related to some of the recent standard changes.

i can't reproduce the crash, it seems i can get the same conditions. perhaps something with window size changes?

before i had the same crash repeatedly when loading old savegames from my own non-conform savegames.
now it happened when loading the demo save after starting up.
(to be more accurate, the same error message, i didn't compare the backtraces)

Code: [Select]
Calculating textures ...done
FATAL ERROR: planquadrat_t::rdwr()
Error while loading game: Unknown ground type '0'


Program received signal SIGABRT, Aborted.
0x00007ffff6c1fa75 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00007ffff6c1fa75 in raise () from /lib/libc.so.6
#1  0x00007ffff6c235c0 in abort () from /lib/libc.so.6
#2  0x000000000063d858 in log_t::fatal (this=0xa813c0,
    who=0x6a02a3 "planquadrat_t::rdwr()",
    format=0x6a0270 "Error while loading game: Unknown ground type '%d'")
    at utils/log.cc:242
#3  0x00000000005f3dc7 in planquadrat_t::rdwr (this=0x7fffecd71018,
    welt=0x14fd400, file=0x7fffffffb1d0, pos=...) at simplan.cc:257
#4  0x000000000062c3cd in karte_t::laden (this=0x14fd400, file=0x7fffffffb1d0)
    at simworld.cc:4504
#5  0x000000000062b3aa in karte_t::laden (this=0x14fd400,
    filename=0x4feda90 "\200\036\377\004") at simworld.cc:4299
#6  0x000000000051c3a5 in loadsave_frame_t::action (this=0x4fdf6f0,
    filename=0x4feda90 "\200\036\377\004") at gui/loadsave_frame.cc:51
#7  0x000000000053fab6 in savegame_frame_t::action_triggered (this=0x4fdf6f0,
    komp=0x4fdfce0, p=...) at gui/savegame_frame.cc:398
#8  0x00000000004ac593 in gui_action_creator_t::call_listeners (
    this=0x4fdfce0, v=...) at gui/components/../../ifc/gui_action_creator.h:36
#9  0x00000000004c6b3e in gui_table_t::infowin_event (this=0x4fdfcc8,
    ev=0x7fffffffb820) at gui/components/gui_table.cc:146
#10 0x00000000004c4192 in gui_scrollpane_t::infowin_event (this=0x4fdfec8,
    ev=0x7fffffffb880) at gui/components/gui_scrollpane.cc:102
#11 0x00000000004ff5d4 in gui_container_t::infowin_event (this=0x4fdf6f8,
    ev=0x7fffffffb960) at gui/gui_container.cc:163
#12 0x00000000005010cf in gui_frame_t::infowin_event (this=0x4fdf6f0,
    ev=0x7fffffffb9f0) at gui/gui_frame.cc:88
#13 0x0000000000540704 in savegame_frame_t::infowin_event (this=0x4fdf6f0,
    ev=0x7fffffffb9f0) at gui/savegame_frame.cc:536
#14 0x000000000061638c in check_pos_win (ev=0x7fffffffbb30) at simwin.cc:926
#15 0x0000000000630f1b in karte_t::interactive (this=0x14fd400,
    quit_month=2147483647) at simworld.cc:5619
#16 0x00000000005e7161 in simu_main (argc=1, argv=0x7fffffffe2d8)
    at simmain.cc:1075
#17 0x000000000066bca9 in main (argc=1, argv=0x7fffffffe2d8) at simsys_s.cc:747

Re: [crash devel] crash when loading save

Reply #1
SDog,

thank you for the report. This is idiosyncratic? I.e., it sometimes occurs and sometimes not under what appear to be the same conditions? If so, that may be hard to trace. Is this the 32-bit or 64-bit version?
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: [crash devel] crash when loading save

Reply #2
the crash before loading an actual savegame (not demo.sve) happened only once. I'll toy around to try to find the conditions to trigger it again.

i didn't report the similar looking crash with one of my old savegames, as it was created with a non standard dev version. This crash happened always.

it happened using pak britain-experimental and a 64bit binary compiled with gcc  4.4.3 in linux.

Re: [crash devel] crash when loading save

Reply #3
SDog,

I'd be very interested in information as to the steps to reproduce, to see whether this can be reproduced on a 32-bit platform.
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: [crash devel] crash when loading save

Reply #4
here we go:

Code: [Select]
FATAL ERROR: planquadrat_t::rdwr()
Error while loading game: Unknown ground type '0'


Program received signal SIGABRT, Aborted.
0x00007ffff6c1fa75 in raise () from /lib/libc.so.6
(gdb) bt
#0  0x00007ffff6c1fa75 in raise () from /lib/libc.so.6
#1  0x00007ffff6c235c0 in abort () from /lib/libc.so.6
#2  0x000000000063d858 in log_t::fatal (this=0xa813c0,
    who=0x6a02a3 "planquadrat_t::rdwr()",
    format=0x6a0270 "Error while loading game: Unknown ground type '%d'")
    at utils/log.cc:242
#3  0x00000000005f3dc7 in planquadrat_t::rdwr (this=0x97cdd80, welt=0x1282d90,
    file=0x7fffffffb1d0, pos=...) at simplan.cc:257
#4  0x000000000062c3cd in karte_t::laden (this=0x1282d90, file=0x7fffffffb1d0)
    at simworld.cc:4504
#5  0x000000000062b3aa in karte_t::laden (this=0x1282d90,
    filename=0x56b4aa0 "\031\001") at simworld.cc:4299
#6  0x000000000051c3a5 in loadsave_frame_t::action (this=0x836fcb0,
    filename=0x56b4aa0 "\031\001") at gui/loadsave_frame.cc:51
#7  0x000000000053fab6 in savegame_frame_t::action_triggered (this=0x836fcb0,
    komp=0x83702a0, p=...) at gui/savegame_frame.cc:398
#8  0x00000000004ac593 in gui_action_creator_t::call_listeners (
    this=0x83702a0, v=...) at gui/components/../../ifc/gui_action_creator.h:36
#9  0x00000000004c6b3e in gui_table_t::infowin_event (this=0x8370288,
    ev=0x7fffffffb820) at gui/components/gui_table.cc:146
#10 0x00000000004c4192 in gui_scrollpane_t::infowin_event (this=0x8370488,
    ev=0x7fffffffb880) at gui/components/gui_scrollpane.cc:102
#11 0x00000000004ff5d4 in gui_container_t::infowin_event (this=0x836fcb8,
---Type <return> to continue, or q <return> to quit---
    ev=0x7fffffffb960) at gui/gui_container.cc:163
#12 0x00000000005010cf in gui_frame_t::infowin_event (this=0x836fcb0,
    ev=0x7fffffffb9f0) at gui/gui_frame.cc:88
#13 0x0000000000540704 in savegame_frame_t::infowin_event (this=0x836fcb0,
    ev=0x7fffffffb9f0) at gui/savegame_frame.cc:536
#14 0x000000000061638c in check_pos_win (ev=0x7fffffffbb30) at simwin.cc:926
#15 0x0000000000630f1b in karte_t::interactive (this=0x1282d90,
    quit_month=2147483647) at simworld.cc:5619
#16 0x00000000005e7161 in simu_main (argc=1, argv=0x7fffffffe2d8)
    at simmain.cc:1075
#17 0x000000000066bca9 in main (argc=1, argv=0x7fffffffe2d8) at simsys_s.cc:747

got a savegame producing this bug repeatedly.
i will upload it soon. Just found another crash i want to post before.



http://dl.dropbox.com/u/1876190/17.sve

Re: [crash devel] crash when loading save

Reply #5
Sdog,

ahh, all that that tells me is that the saved game is corrupted. What I really need to know are the steps to reproduce to create a corrupted saved game...
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: [crash devel] crash when loading save

Reply #6
the version used to create that savegame is not reliable, i didn't report that crash therefore. The interesting aspect is, that the same crash happened without loading any savegame.

Re: [crash devel] crash when loading save

Reply #7
Sdog,

can you try it with the latest version of -devel that contains the 64-bit fixes to see whether that fixes the issue?
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: [crash devel] crash when loading save

Reply #8
i can try it with the latest devel, but it's luck to get the crash happen again, as you said it's idiosyncratic.

could it be related to an object in the pak file? that appeared randomly when generating the demo island?

Re: [crash devel] crash when loading save

Reply #9
Since I don't get that issue myself, I suspect that it's more likely to be a 64-bit specific error.
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: [crash devel] crash when loading save

Reply #10
btw james, would you like me to report issues with devel versions rather on github instead of the forum? in order to keep things clean for more serios releas version bug reports?