The International Simutrans Forum

 

Author Topic: Buggy savegame  (Read 6240 times)

0 Members and 1 Guest are viewing this topic.

Offline TygerFish

  • *
  • Posts: 107
Buggy savegame
« on: December 25, 2010, 09:48:49 AM »
This savegame crashes reliably when game time gets to 9 December @ 16.30h:
http://tygerfish.homelinux.net/pak128B-0.7-G1_error.sve

It was started with -expeimental 8.2 and pak128.Britain 0.7.  I've since upgraded to 9.0 and 0.7.1, respectively.  Had no issues until this, especially not any unrecoverable ones.  (If anything, there were fewer random errors than with the earlier versions!)

Have been using 32-bit version, as 64-bit version segfaults.

Sample outputs attached.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #1 on: December 25, 2010, 02:20:48 PM »
Thank you very much for the report. I'm afraid, however, that I can't reproduce the crash - it all works normally for me. I'm wondering whether this is a problem with running a 32-bit version on a 64-bit machine? The real problem is that the 64-bit version crashes - at what point does it fail, may I ask?

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #2 on: December 25, 2010, 09:20:15 PM »
Thank you very much for the report. I'm afraid, however, that I can't reproduce the crash - it all works normally for me. I'm wondering whether this is a problem with running a 32-bit version on a 64-bit machine? The real problem is that the 64-bit version crashes - at what point does it fail, may I ask?
The problem I was experiencing with the savegame was with the 32-bit version.  If you can't duplicate it, no biggie.  That savegame also has had a persistent (but frustratingly impossible-to-isolate) bug where rotating the screen, particularly in a certain section of map, would often cause the game to crash.  I'm content to just write it all off as an old version issue.  Especially since I've just gotten interested in the cool new landscapes that can be made with the new city generation parameters... :)

I actually haven't been able to get the 64-bit version to work for at least a couple versions, although I haven't taken the time to look into it before.  Attached is the console output.  When launched, the window pops up, then quickly closes and prints the message "Segmentation fault" at the command line.

And this is all on Linux, in case it wasn't clear.  ;)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #3 on: December 25, 2010, 10:00:02 PM »
TygerFish,

the problem is, as I understand it, that 32-bit code can be unstable when run on 64-bit Linux systems (the same does not, apparently, apply to Windows). The problem(s) that you are having, therefore, may well be related to that. The answer to that problem is to get the 64-bit version working.

Unfortunately, it is very difficult for me to debug that, as I do not currently have any 64-bit hardware on which to test it. I am currently waiting for parts for a new computer, which will be 64-bit (albeit Windows), so I might well be able to make progress then. In the meantime, anyone who has access to 64-bit testing hardware and would like to help to track down the 64-bit bugs, I should be very grateful!

(The console output, unfortunately, does not give enough information to assist. Could you try running it with the "-log" flag and uploading simu.log?)

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #4 on: December 26, 2010, 12:53:17 AM »
TygerFish,

the problem is, as I understand it, that 32-bit code can be unstable when run on 64-bit Linux systems (the same does not, apparently, apply to Windows). The problem(s) that you are having, therefore, may well be related to that. The answer to that problem is to get the 64-bit version working.

Unfortunately, it is very difficult for me to debug that, as I do not currently have any 64-bit hardware on which to test it. I am currently waiting for parts for a new computer, which will be 64-bit (albeit Windows), so I might well be able to make progress then. In the meantime, anyone who has access to 64-bit testing hardware and would like to help to track down the 64-bit bugs, I should be very grateful!

(The console output, unfortunately, does not give enough information to assist. Could you try running it with the "-log" flag and uploading simu.log?)

Hm... I appended -log to the command but it doesn't seem to be logging anything.  Anything else I should try?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #5 on: December 26, 2010, 01:18:20 AM »
That's odd - -log works for me. Where are you looking for your simu.log file?

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #6 on: December 26, 2010, 01:59:16 AM »
That's odd - -log works for me. Where are you looking for your simu.log file?

Code: [Select]
~$ sudo updatedb
~$ locate simu.log
~$ /opt/simutrans-experimental/simutrans-exp-64-2010-12-19-a742fc5 -log
Use work dir /opt/simutrans-experimental/
Reading low level config data ...
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Preparing display ...
Screen Flags: requested=10, actual=10
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
Segmentation fault
~$ sudo updatedb
~$ locate simu.log
~/Dropbox/simutrans-experimental/simu.log
~$ cat ~/Dropbox/simutrans-experimental/simu.log

So I stand corrected: it's creating the file, but not putting anything in it.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #7 on: December 26, 2010, 02:08:16 AM »
Very odd. Try -log -debug 3.

Offline inkelyad

  • Devotees (Inactive)
  • *
  • Posts: 482
  • Languages: EN, RU
Re: Buggy savegame
« Reply #8 on: December 26, 2010, 10:34:48 AM »
Hm... I appended -log to the command but it doesn't seem to be logging anything.  Anything else I should try?
This should work:
1) Compile simutrans with 'DEBUG=3' in config.default
2) run it with '-debug 3' flag

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #9 on: December 27, 2010, 04:28:20 AM »
Thought I posted this already... seem to be having connection problems.

Yes, -debug 3 works.  Log attached.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #10 on: December 27, 2010, 12:32:57 PM »
Hmm - that output doesn't give me anything to go on, I'm afraid (thank you for posting it, though). You can't get a backtrace for the crash?

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #11 on: December 28, 2010, 01:38:21 AM »
Hmm - that output doesn't give me anything to go on, I'm afraid (thank you for posting it, though). You can't get a backtrace for the crash?
Instructions?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #12 on: December 28, 2010, 11:19:13 AM »
Hmm, I'm not sure how to get one in Linux - I'm more familiar with Windows. Does anyone else have any ideas?

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: Buggy savegame
« Reply #13 on: December 28, 2010, 06:05:36 PM »
A while ago neroden wrote a good howto.

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #14 on: December 28, 2010, 07:01:03 PM »
Perfect!  This is what I get:
Code: [Select]
#0  0x0000000000661a23 in display_fillbox_wh_clip(short, short, short, short, unsigned short, int) ()
#1  0x00000000004a2862 in button_t::zeichnen(koord) ()
#2  0x00000000004bbb27 in gui_table_t::paint_cells(koord const&) ()
#3  0x00000000004bbc61 in gui_table_t::zeichnen(koord) ()
#4  0x00000000004b9412 in gui_scrollpane_t::zeichnen(koord) ()
#5  0x00000000004f3967 in gui_container_t::zeichnen(koord) ()
#6  0x0000000000521793 in pakselector_t::zeichnen(koord, koord) ()
#7  0x00000000005e059c in modal_dialogue(gui_frame_t*, karte_t*, bool (*)()) ()
#8  0x00000000005e33fc in simu_main(int, char**) ()
#9  0x0000000000667e14 in main ()

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #15 on: December 28, 2010, 07:27:06 PM »
Tygerfish,

thank you for that. That is interesting, since all of the methods listed are methods that are unchanged from Standard. Could you test the 64-bit Linux version of Standard and see whether you can get that to work?

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #16 on: December 31, 2010, 05:59:34 PM »
Tygerfish,

thank you for that. That is interesting, since all of the methods listed are methods that are unchanged from Standard. Could you test the 64-bit Linux version of Standard and see whether you can get that to work?
I can't seem to find a pre-compiled version of Standard, and can't figure out how to compile the MSVC project in Linux... does anyone have some links or instructions that would help?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #17 on: December 31, 2010, 06:08:48 PM »
There have been some interesting developments in respect of 64-bit Linux in recent days in this thread, which might well enable you to use the 64-bit Linux binary on the next release.

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #18 on: January 01, 2011, 02:15:39 PM »
Here's what I've found so far...

Couldn't find a pre-compiled 64-bit version of Standard.  Am I looking in the wrong place?

I finally got the game to compile on my machine with the -Experimental 9.0-versioned code I downloaded on December 27th.  It seemed to run without any issues.  I tested with -O1 and -O2 in case that was still an issue, but both seemed to work fine.

The precompiled 64-bit -Experimental 9.1 (from http://forum.simutrans.com/index.php?topic=6514.0) had the same instant segmentation fault that 9.0 did.

I will fetch the 9.1 source, compile on my machine and do some further testing.  I've been running into a strange bug while running Simutrans on my laptop (which I've only recently been using instead of my desktop) where my entire machine will randomly become unresponsive and require a hard reset.  I'll see if using the 64-bit binary makes a difference in that...

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #19 on: January 01, 2011, 04:40:45 PM »
Which version of GCC are you using?

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #20 on: January 01, 2011, 04:50:03 PM »
Which version of GCC are you using?
According to the man page:
gcc-4.4.5 2010-09-27

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18763
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Buggy savegame
« Reply #21 on: January 01, 2011, 04:52:52 PM »
Hmm, that's odd: the same version as SDog and he is having trouble with his.

Offline TygerFish

  • *
  • Posts: 107
Re: Buggy savegame
« Reply #22 on: January 01, 2011, 07:19:26 PM »
Hmm, that's odd: the same version as SDog and he is having trouble with his.

Code: [Select]
$ file simutrans-exp-64-2011-01-01-manual1
simutrans-exp-64-2011-01-01-manual1: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
Currently running just as well as the 32-bit version!

Anyway, I think this thread has gone far enough off-topic... :D