News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Buggy savegame

Started by TygerFish, December 25, 2010, 09:48:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

TygerFish

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.

jamespetts

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?
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.

TygerFish

Quote from: jamespetts 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?
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.  ;)

jamespetts

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?)
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.

TygerFish

Quote from: jamespetts 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?)

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

jamespetts

That's odd - -log works for me. Where are you looking for your simu.log file?
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.

TygerFish

Quote from: jamespetts on December 26, 2010, 01:18:20 AM
That's odd - -log works for me. Where are you looking for your simu.log file?

~$ 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.

jamespetts

Very odd. Try -log -debug 3.
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.

inkelyad

Quote from: TygerFish on December 26, 2010, 12:53:17 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

TygerFish

Thought I posted this already... seem to be having connection problems.

Yes, -debug 3 works.  Log attached.

jamespetts

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?
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.

TygerFish

Quote from: jamespetts 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?
Instructions?

jamespetts

Hmm, I'm not sure how to get one in Linux - I'm more familiar with Windows. Does anyone else have any ideas?
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.

sdog

A while ago neroden wrote a good howto.

TygerFish

Perfect!  This is what I get:
#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 ()


jamespetts

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?
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.

TygerFish

Quote from: jamespetts 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?
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?

jamespetts

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

TygerFish

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

jamespetts

Which version of GCC are you using?
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.

TygerFish

Quote from: jamespetts on January 01, 2011, 04:40:45 PM
Which version of GCC are you using?
According to the man page:
gcc-4.4.5 2010-09-27

jamespetts

Hmm, that's odd: the same version as SDog and he is having trouble with his.
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.

TygerFish

Quote from: jamespetts on January 01, 2011, 04:52:52 PM
Hmm, that's odd: the same version as SDog and he is having trouble with his.

$ 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