The International Simutrans Forum

 

Author Topic: [Bug 3.11] Seemingly random crashes  (Read 11420 times)

0 Members and 1 Guest are viewing this topic.

Offline sanna

  • *
  • Posts: 234
Re: [Bug 3.11] Seemingly random crashes
« Reply #35 on: May 26, 2009, 07:02:51 AM »
Hi, I just tested dantedarkstars save game on Exp 3.11 with -log 1 -debug 3 on a debian/squeezy 32-bit system; and after opening and closing a few depots the game crashed twice with the following terminal output (memory map of course varies):
Code: [Select]
*** glibc detected *** /usr/share/games/simutrans/simutrans-exp-latest: corrupted double-linked list: 0x0c6d0050 ***
======= Backtrace: =========
/lib/i686/cmov/libc.so.6[0xb7cc11e4]
/lib/i686/cmov/libc.so.6[0xb7cc41b2]
/lib/i686/cmov/libc.so.6(__libc_malloc+0x95)[0xb7cc55a5]
/usr/lib/libstdc++.so.6(_Znwj+0x27)[0xb7ebe627]
/usr/lib/libstdc++.so.6(_Znaj+0x1d)[0xb7ebe77d]
/usr/share/games/simutrans/simutrans-exp-latest[0x80cd428]
======= Memory map: ========
08048000-08266000 r-xp 00000000 fe:00 663154     /usr/share/games/simutrans/simutrans-exp-latest
08266000-08267000 rw-p 0021e000 fe:00 663154     /usr/share/games/simutrans/simutrans-exp-latest
08267000-082a9000 rw-p 08267000 00:00 0
08fc9000-0caab000 rw-p 08fc9000 00:00 0          [heap]
b4b00000-b4b21000 rw-p b4b00000 00:00 0
b4b21000-b4c00000 ---p b4b21000 00:00 0
b4cd4000-b4f23000 rw-p b4cd4000 00:00 0
b4f23000-b53c1000 rw-s 00000000 00:08 7929888    /SYSV00000000 (deleted)
b53c1000-b66d4000 rw-p b53c1000 00:00 0
b66d4000-b6739000 rw-p b7287000 00:00 0
b675f000-b67ec000 rw-p b675f000 00:00 0
b67ec000-b67ed000 ---p b67ec000 00:00 0
b67ed000-b6fed000 rw-p b67ed000 00:00 0
b722f000-b7286000 rw-p b7269000 00:00 0
b72a8000-b72d1000 rw-p b72a8000 00:00 0
b72d1000-b72e1000 rw-s 00000000 00:08 6750229    /SYSV0056a4d6 (deleted)
b72e1000-b72eb000 r-xp 00000000 08:02 53894      /lib/i686/cmov/libnss_files-2.9.so
b72eb000-b72ec000 r--p 00009000 08:02 53894      /lib/i686/cmov/libnss_files-2.9.so
b72ec000-b72ed000 rw-p 0000a000 08:02 53894      /lib/i686/cmov/libnss_files-2.9.so
b72ed000-b72f6000 r-xp 00000000 08:02 53900      /lib/i686/cmov/libnss_nis-2.9.so
b72f6000-b72f7000 r--p 00008000 08:02 53900      /lib/i686/cmov/libnss_nis-2.9.so
b72f7000-b72f8000 rw-p 00009000 08:02 53900      /lib/i686/cmov/libnss_nis-2.9.so
b7302000-b7312000 rw-s 00000000 00:0d 5812       /dev/snd/pcmC0D0p
b7312000-b731a000 r-xp 00000000 fe:00 165760     /usr/lib/libXcursor.so.1.0.2
b731a000-b731b000 rw-p 00007000 fe:00 165760     /usr/lib/libXcursor.so.1.0.2
b7321000-b7324000 r-xp 00000000 fe:00 426411     /usr/lib/alsa-lib/libasound_module_rate_speexrate.so
b7324000-b7325000 rw-p 00003000 fe:00 426411     /usr/lib/alsa-lib/libasound_module_rate_speexrate.so
b7325000-b732c000 r-xp 00000000 08:02 53890      /lib/i686/cmov/libnss_compat-2.9.so
b732c000-b732d000 r--p 00006000 08:02 53890      /lib/i686/cmov/libnss_compat-2.9.so
b732d000-b732e000 rw-p 00007000 08:02 53890      /lib/i686/cmov/libnss_compat-2.9.so
b732e000-b7335000 r--s 00000000 fe:00 164219     /usr/lib/gconv/gconv-modules.cache
b7335000-b7535000 r--p 00000000 fe:00 164411     /usr/lib/locale/locale-archive
b7535000-b7538000 rw-p b7535000 00:00 0
b7538000-b753c000 r-xp 00000000 fe:00 164038     /usr/lib/libXdmcp.so.6.0.0
b753c000-b753d000 rw-p 00003000 fe:00 164038     /usr/lib/libXdmcp.so.6.0.0
b753d000-b753f000 r-xp 00000000 fe:00 164712     /usr/lib/libXau.so.6.0.0
b753f000-b7540000 rw-p 00001000 fe:00 164712     /usr/lib/libXau.so.6.0.0
b7540000-b7552000 r-xp 00000000 08:02 53711      /lib/i686/cmov/libresolv-2.9.so
b7552000-b7553000 r--p 00011000 08:02 53711      /lib/i686/cmov/libresolv-2.9.so
b7553000-b7554000 rw-p 00012000 08:02 53711      /lib/i686/cmov/libresolv-2.9.so
b7554000-b7556000 rw-p b7554000 00:00 0
b7556000-b756b000 r-xp 00000000 08:02 53896      /lib/i686/cmov/libnsl-2.9.so
b756b000-b756c000 r--p 00014000 08:02 53896      /lib/i686/cmov/libnsl-2.9.so
b756c000-b756d000 rw-p 00015000 08:02 53896      /lib/i686/cmov/libnsl-2.9.so
b756d000-b756f000 rw-p b756d000 00:00 0
b756f000-b757c000 r-xp 00000000 fe:00 164106     /usr/lib/libXext.so.6.4.0
b757c000-b757d000 rw-p 0000c000 fe:00 164106     /usr/lib/libXext.so.6.4.0
b757d000-b757e000 rw-p b757d000 00:00 0
b757e000-b7581000 r-xp 00000000 08:02 32598      /lib/libuuid.so.1.2
b7581000-b7582000 rw-p 00002000 08:02 32598      /lib/libuuid.so.1.2
b7582000-b759a000 r-xp 00000000 fe:00 166658     /usr/lib/libxcb.so.1.1.0
b759a000-b759b000 rw-p 00017000 fe:00 166658     /usr/lib/libxcb.so.1.1.0
b759b000-b75d6000 r-xp 00000000 08:02 32628      /lib/libncursesw.so.5.7
b75d6000-b75d9000 rw-p 0003b000 08:02 32628      /lib/libncursesw.so.5.7
b75d9000-b75de000 r-xp 00000000 fe:00 164861     /usr/lib/libgpm.so.2.0.0
b75de000-b75df000 rw-p 00004000 fe:00 164861     /usr/lib/libgpm.so.2.0.0
b75df000-b7677000 r-xp 00000000 08:02 32634      /lib/libslang.so.2.1.3
b7677000-b7687000 rw-p 00097000 08:02 32634      /lib/libslang.so.2.1.3
b7687000-b76be000 rw-p b7687000 00:00 0
b76be000-b76ee000 r-xp 00000000 08:02 33114      /lib/libncurses.so.5.7
b76ee000-b76f1000 rw-p 0002f000 08:02 33114      /lib/libncurses.so.5.7
b76f1000-b76f3000 r-xp 00000000 08:02 32636      /lib/libx86.so.1
b76f3000-b76f4000 rw-p 00001000 08:02 32636      /lib/libx86.so.1
b76f4000-b76f9000 r-xp 00000000 fe:00 165034     /usr/lib/libgdbm.so.3.0.0
b76f9000-b76fa000 rw-p 00004000 fe:00 165034     /usr/lib/libgdbm.so.3.0.0
b76fa000-b76fd000 r-xp 00000000 08:02 33112      /lib/libcap.so.2.16
b76fd000-b76fe000 rw-p 00002000 08:02 33112      /lib/libcap.so.2.16
b76fe000-b7734000 r-xp 00000000 fe:00 164386     /usr/lib/libdbus-1.so.3.4.0
b7734000-b7736000 rw-p 00036000 fe:00 164386     /usr/lib/libdbus-1.so.3.4.0
b7736000-b7737000 rw-p b7736000 00:00 0
b7737000-b773b000 r-xp 00000000 fe:00 165679     /usr/lib/libasyncns.so.0.1.0
b773b000-b773c000 rw-p 00003000 fe:00 165679     /usr/lib/libasyncns.so.0.1.0
b773c000-b7743000 r-xp 00000000 08:02 32762      /lib/libwrap.so.0.7.6
b7743000-b7744000 rw-p 00007000 08:02 32762      /lib/libwrap.so.0.7.6
b7744000-b7748000 r-xp 00000000 fe:00 165337     /usr/lib/libXtst.so.6.1.0
b7748000-b7749000 rw-p 00003000 fe:00 165337     /usr/lib/libXtst.so.6.1.0
b7749000-b7750000 r-xp 00000000 fe:00 164340     /usr/lib/libSM.so.6.0.0
b7750000-b7751000 rw-p 00006000 fe:00 164340     /usr/lib/libSM.so.6.0.0
b7751000-b7766000 r-xp 00000000 fe:00 164137     /usr/lib/libICE.so.6.3.0
b7766000-b7767000 rw-p 00014000 fe:00 164137     /usr/lib/libICE.so.6.3.0
b7767000-b7769000 rw-p b7767000 00:00 0
b7769000-b7883000 r-xp 00000000 fe:00 164273     /usr/lib/libX11.so.6.2.0
b7883000-b7887000 rw-p 00119000 fe:00 164273     /usr/lib/libX11.so.6.2.0
b7887000-b7888000 rw-p b7887000 00:00 0
b7888000-b78cb000 r-xp 00000000 fe:00 166928     /usr/lib/libpulsecommon-0.9.15.so
b78cb000-b78cc000 rw-p 00043000 fe:00 166928     /usr/lib/libpulsecommon-0.9.15.so
b78cc000-b78ec000 r-xp 00000000 fe:00 165069     /usr/lib/libaudiofile.so.0.0.2
b78ec000-b78ef000 rw-p 0001f000 fe:00 165069     /usr/lib/libaudiofile.so.0.0.2
b78ef000-b78f6000 r-xp 00000000 08:02 53899      /lib/i686/cmov/librt-2.9.so
b78f6000-b78f7000 r--p 00006000 08:02 53899      /lib/i686/cmov/librt-2.9.so
b78f7000-b78f8000 rw-p 00007000 08:02 53899      /lib/i686/cmov/librt-2.9.so
b78f8000-b790d000 r-xp 00000000 08:02 53927      /lib/i686/cmov/libpthread-2.9.so
b790d000-b790e000 r--p 00014000 08:02 53927      /lib/i686/cmov/libpthread-2.9.so
b790e000-b790f000 rw-p 00015000 08:02 53927      /lib/i686/cmov/libpthread-2.9.so
b790f000-b7911000 rw-p b790f000 00:00 0
b7911000-b792d000 r-xp 00000000 fe:00 165687     /usr/lib/libcaca.so.0.99.16
b792d000-b79b4000 rw-p 0001b000 fe:00 165687     /usr/lib/libcaca.so.0.99.16
b79b4000-b79ba000 rw-p b79b4000 00:00 0
b79ba000-b79d2000 r-xp 00000000 fe:00 166799     /usr/lib/libaa.so.1.0.4
b79d2000-b79d4000 rw-p 00018000 fe:00 166799     /usr/lib/libaa.so.1.0.4
b79d4000-b79d5000 rw-p b79d4000 00:00 0
b79d5000-b7a26000 r-xp 00000000 fe:00 164911     /usr/lib/libvga.so.1.4.3
b7a26000-b7a2d000 rw-p 00050000 fe:00 164911     /usr/lib/libvga.so.1.4.3
b7a2d000-b7a36000 rw-p b7a2d000 00:00 0
b7a36000-b7a4c000 r-xp 00000000 fe:00 166166     /usr/lib/libdirect-1.2.so.0.7.0
b7a4c000-b7a4d000 rw-p 00016000 fe:00 166166     /usr/lib/libdirect-1.2.so.0.7.0
b7a4d000-b7a55000 r-xp 00000000 fe:00 166168     /usr/lib/libfusion-1.2.so.0.7.0
b7a55000-b7a56000 rw-p 00007000 fe:00 166168     /usr/lib/libfusion-1.2.so.0.7.0
b7a56000-b7acc000 r-xp 00000000 fe:00 165092     /usr/lib/libdirectfb-1.2.so.0.7.0
b7acc000-b7acf000 rw-p 00075000 fe:00 165092     /usr/lib/libdirectfb-1.2.so.0.7.0
b7acf000-b7b1b000 r-xp 00000000 fe:00 165326     /usr/lib/libXt.so.6.0.0
b7b1b000-b7b1e000 rw-p 0004c000 fe:00 165326     /usr/lib/libXt.so.6.0.0
b7b1e000-b7b20000 rw-p b7b1e000 00:00 0
b7b20000-b7b35000 r-xp 00000000 fe:00 165219     /usr/lib/libaudio.so.2.4
b7b35000-b7b36000 rw-p 00015000 fe:00 165219     /usr/lib/libaudio.so.2.4
b7b36000-b7b70000 r-xp 00000000 fe:00 166926     /usr/lib/libpulse.so.0.8.0
b7b70000-b7b71000 rw-p 0003a000 fe:00 16Avbruten (SIGABRT)
Furthermore it crashed yet another time with no console output apart from Segfault. So there might be more than one issue involved (or not?)

Hope this does not add to the confusion... I will retest the game with latest Exp as soon as I have time to upgrade to it *smile*


EDIT: Just tested it with Exp 3.12, and the same behavior (crashing with: *** glibc detected *** /usr/share/games/simutrans/simutrans-exp-latest: corrupted double-linked list: 0x0beb45e0 ***) occurs.
« Last Edit: May 26, 2009, 07:24:20 AM by sanna »

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: [Bug 3.11] Seemingly random crashes
« Reply #36 on: May 26, 2009, 08:17:58 AM »
Z9999,

what system do you run?

I don't think that is important.

In my case, this step cause crash. 100% reproducible for me.

1. Open left side train depot window.
2. Open right side train depot window.
3. Close right side train depot window.
4. Open monorail depot window.

knightly

  • Guest
Re: [Bug 3.11] Seemingly random crashes
« Reply #37 on: May 26, 2009, 08:48:40 AM »
James,

I have found another problem : after many trials of opening and closing depots in Dante's save game, even if the game hasn't crash yet, clicking either "Load" or "Save" button in the main menu will crash the game immediately.

I have tried to reproduce the crashes in debug mode and debug builds, but not successful so far. I suspect the bug has something to do with the difference between debug and release builds.


mastone

  • Guest
Re: [Bug 3.11] Seemingly random crashes
« Reply #38 on: May 27, 2009, 01:05:58 PM »
I have had a bug where I updated a rail depot to take electricity, and when I clicked on the electric locomotives, it crashed.

mastone

  • Guest
Re: [Bug 3.11] Seemingly random crashes
« Reply #39 on: May 27, 2009, 01:28:44 PM »
Also, the auto rail signal thing is quite buggy, if you click on a single bit of rail with ctrl held down, then that persistently seems to crash the game. Both of these are with 3.12.
Thanks

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [Bug 3.11] Seemingly random crashes
« Reply #40 on: May 27, 2009, 01:46:45 PM »
Mastone,

thank you for your bug reports. I shall look into those when I can, although I suspect that I will have difficulties reproducing the issue with the depot. As to the issue with the automatic signal placement tool, was that the only problem that you  had with it? Thank you again for your bug reports, and thank you also for your interest in Simutrans-Experimental :-)

Edit: I have now found and fixed the problem with the signal placement tool, but cannot, I am afraid, reproduce the issue with the depot.

Edit 2: I have, however, been able to reproduce the original depot crash with the wintry save game provided above with the release version of 3.12, but not a release build (tested with the debugger engaged) of the proto 3.13. I have no idea whether that means that I have inadvertently fixed the problem, but I should be grateful if people could test when the final 3.13 comes out.
« Last Edit: May 27, 2009, 10:41:49 PM by jamespetts »

knightly

  • Guest
Re: [Bug 3.11] Seemingly random crashes
« Reply #41 on: May 28, 2009, 06:14:21 AM »
James,

As I have mentioned above, when testing in debug mode (i.e. with debugger enabled), regardless of whether it is a release build or debug build, it seems to be impossible to reproduce the crashes. I don't know why it is like that, but that is what I realised from my tests on v3.12

So, please test the release build of v3.13 again without the debugger.

P.S. Can you release v3.13 first without waiting for fixing the crashes? I am afraid that the bug which causes the crashes is not catchable in a debugger. Besides, I would like to know if my patch truly fixes the lagginess. Thanks!

Offline Colin

  • Devotees (Inactive)
  • *
  • Posts: 663
  • Certa Cito
Re: [Bug 3.11] Seemingly random crashes
« Reply #42 on: May 28, 2009, 06:39:27 AM »
James,
P.S. Can you release v3.13 first without waiting for fixing the crashes?

I would second that because it is now impossible to play the game at my level, not because of crashes I hasten to add, I don't get them often enough to be a worry, but because the freeze up has now extended to 7-9 Simu Days. (I'm now forced to play The Godfather II on line with one or more of my grandchildren. HELP!!!)LOL

Offline HeinBloed

  • *
  • Posts: 79
  • Languages: DE, EN, FR
Re: [Bug 3.11] Seemingly random crashes
« Reply #43 on: May 28, 2009, 11:42:59 AM »
I would second that because it is now impossible to play the game at my level, not because of crashes I hasten to add, I don't get them often enough to be a worry, but because the freeze up has now extended to 7-9 Simu Days. (I'm now forced to play The Godfather II on line with one or more of my grandchildren. HELP!!!)LOL

Sorry for this completely off-topic post, but after looking up Colin's profile I must say I'm deeply impressed - I really hope I'll be as young in mind and open to new technologies at your age as you are! Hats off!
« Last Edit: May 28, 2009, 11:55:08 AM by tttron »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [Bug 3.11] Seemingly random crashes
« Reply #44 on: May 30, 2009, 03:57:50 PM »
Knightly,

thank you for spotting that the issue is not with the differences between the debug/release builds, per se, but between running it in a debugger and running it stand-alone. I have indeed been able to reproduce the crashes in a stand-alone build. This is a very strange problem indeed, and enormously difficult to track down without the aid of a debugger, especially as the error is intermittent, not deterministic. I have not been able to solve this for 3.13, unfortunately.

However, 3.13 does now incorporate all of the optimisations to the routing, which should deal with the performance issues reported. Also, the crash when holding down CTRL when using automatic signals is fixed.

Offline Colin

  • Devotees (Inactive)
  • *
  • Posts: 663
  • Certa Cito
Re: [Bug 3.11] Seemingly random crashes
« Reply #45 on: May 31, 2009, 07:49:41 AM »
Sorry for this completely off-topic post, but after looking up Colin's profile I must say I'm deeply impressed - I really hope I'll be as young in mind and open to new technologies at your age as you are! Hats off!

Well not quite so young in mind as you put it, but I've been using computers since Tandy or Radio Shack brought out their first TRS80/Z80. Remember that if you can. LOL.

Offline dantedarkstar

  • *
  • Posts: 98
Re: [Bug 3.11] Seemingly random crashes
« Reply #46 on: June 04, 2009, 09:33:53 PM »
Today, I got a curious thing. During game, the screen got completely "jammed". It originated from one tile (when I moved away it was gone, when I moved to the location it was back). Shortly after the game crashed.
These symptoms in my book mean that the cause of these crashes is some pointer mixup or unchecked index out of bounds. It's bad news since these type of bugs could be practically anywhere in the code.
The appearance of parts of the sand quarry in the jammed part would point to pointer mixup - like if simutrans was trying to get graphics from a wrong place in memory. Maybe usually when this happens it's outside simutrans and immediately produces error that the memory cannot be read, but this one time he accidentally hit somewhere within simutrans and could therefore read ?

Here's the screenshot in question:


Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [Bug 3.11] Seemingly random crashes
« Reply #47 on: June 04, 2009, 10:16:20 PM »
Ohh, dear. That sort of error is extremely hard to debug. Can you upload a saved game?

Offline dantedarkstar

  • *
  • Posts: 98
Re: [Bug 3.11] Seemingly random crashes
« Reply #48 on: June 04, 2009, 10:59:48 PM »
I can, but it won't help. After I started game again and loaded the save (it was by coincidence saved just a few moments before this occured) the jam didn't appear again. The "seemingly random" seems to be "really quasi-random". I just wanted to share a rare observation that might be or might be not really related to the issue at hand.

What I will have to do is to try compiling the simutrans-experimental on watcom and see if the same error occurs. Because if it doesn't, it may be either the VC or just some intricate interference between the current code and VC routines. Anyway, tomorrow or on saturday I will try that out.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [Bug 3.11] Seemingly random crashes
« Reply #49 on: June 04, 2009, 11:41:23 PM »
Dante,

that's very kind! Thank you.

Offline dantedarkstar

  • *
  • Posts: 98
Re: [Bug 3.11] Seemingly random crashes
« Reply #50 on: June 05, 2009, 07:56:00 PM »
Well, I tried my first compilation but I failed big time. Errors started popping from the very first file to be compiled  :(
But I'll be asking on the main simutrans development forum since it has nothing to do with your code (I looked and the same thing is in standard simutrans).

It might take some time before I succesfully compile that beast  :-\

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [Bug 3.11] Seemingly random crashes
« Reply #51 on: June 05, 2009, 09:56:20 PM »
Ahh, sorry that you've had problems. Are you 64-bit? I know that people have had trouble with that, although I thought that Prissi fixed it a while back.

Offline dantedarkstar

  • *
  • Posts: 98
Re: [Bug 3.11] Seemingly random crashes
« Reply #52 on: June 05, 2009, 10:07:22 PM »
No, I'm 32 bit. It's because of the compiler (additionally I'm not familiar with Watcom). I get strange errors that result from the code not being suited for Watcom (defines that make compiler error out, unexplained ignorance of what "abs" is etc.). I solved few of them but got tired out by some more complicated now on the plate. Will pick it up tomorrow... err... today morning/afternoon.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18745
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: [Bug 3.11] Seemingly random crashes
« Reply #53 on: June 05, 2009, 10:16:28 PM »
Thank you very much for your efforts - very best wishes in getting it working!