Skip to main content
Topic: Segmentation Fault in saved game (Read 3167 times) previous topic - next topic

Segmentation Fault in saved game

Hi...

I'm running Simutrans 102.2.2 on Linux*. The saved game is quite big, 256 x 256, with two AI companies running. My net bank balance has increased to 900,000C. Game crashes at random with the message "segmentation fault"

Any clues?



* Ubuntu 9.10;  2.6.31-20-generic Kernel, all updates installed.

Re: Segmentation Fault in saved game

Reply #1
In Simutrans world, a 256x256 map is considered as a small one, so that shouldn't be the problem. Which are the initial settings of the map (industries, cities, citizens, rivers, etc...)? please post here the whole error message and try to run again the map with Simutrans in debug mode

Code: [Select]
simutrans -log 0 -debug 3

Then, post here the content of simulog file.

Re: Segmentation Fault in saved game

Reply #2
debugmode is actually
Code: [Select]
simutrans -log 1 -debug 3

But I am not sure if Ubuntu compiles with Debugmode.

Re: Segmentation Fault in saved game

Reply #3
I ran ./Documents/simutrans/simutrans -log 1 -debug 3 > 20100331.log

Last few lines in terminal were...

Code: [Select]
set_zoom_factor() : set 3 (3/4)
set_zoom_factor() : set 4 (2/3)
set_zoom_factor() : set 5 (1/2)
set_zoom_factor() : set 6 (1/3)
set_zoom_factor() : set 7 (1/4)
Message: karte_t::interactive_event():   Keyboard event with code 0 '?'
Message: karte_t::interactive_event():   Keyboard event with code 0 '?'
set_zoom_factor() : set 6 (1/3)
set_zoom_factor() : set 5 (1/2)
set_zoom_factor() : set 6 (1/3)
set_zoom_factor() : set 7 (1/4)
Message: wkz_headquarter():   building headquarter at (275,220)
Segmentation fault



And heres the file...

mod note: Comments merged. Please do not double-post. Edit your last comment instead.
~vilvoh

Re: Segmentation Fault in saved game

Reply #4
Please compile with debug on. THis is a release version lacking all debug messages. No clue what went wrong.

Re: Segmentation Fault in saved game

Reply #5
Game crashes at random with the message "segmentation fault"
Could you please narrow down "random" to something more specific, like loading the savegame, rotating it, placing a building, starting a vehicle etc.?

Quote
"Message: wkz_headquarter():   building headquarter at (275,220)
Segmentation fault"
From the posted logfile:
Quote
Creating cities ...
simcity::  placed city 0 its= 0
simcity::  number of iterations 0
Distributing 1 tourist attractions ...
(Two different events, as it seems - "Segmentation fault" will not show up in the logfile.)

It may be necessary to upload/publish your savegame to have it checked by someone else, preferably someone with ST on Linux (I don't have that).

EDIT: Please see [Guidelines] How to post a Bug Report for further information, especially on how to try with a newer version of Simutrans.

Re: Segmentation Fault in saved game

Reply #6
1. I have uploaded the saved game to a website-
http://www.cedt.iisc.ernet.in/people/students/kabhijit/st/

2. I used the Windows version of 102.2.2 - with identical results. The same error - Segmentation Fault.

3. The crash is not random. I should have said that after I load the savegame, the game runs for less than a minute before it crashes. This happens almost irrespective of what i do. In fact even when i do _nothing_ the game crashes.

4. How do i recompile with Debug options?

5. I also tried with the nightly build - version 102.3.3144; and it acts exactly the same - crashing with the segmentation fault.

I will try to get the debug version and post the results.
Thanks very much!

Re: Segmentation Fault in saved game

Reply #7
Thank you, a savegame help much with debugging.

The AI failed to build a headquarter at the same palce after rotation. Fixed with next nightly.

Re: Segmentation Fault in saved game

Reply #8
Thanks. Game now works on the 1st April Nightly build.

Regards
Abhijit