The International Simutrans Forum

 

Author Topic: Crash on looking at stations/stops  (Read 2175 times)

0 Members and 1 Guest are viewing this topic.

Offline steffen

  • *
  • Posts: 78
Crash on looking at stations/stops
« on: May 29, 2010, 10:46:34 PM »
Moderator note: split the topic, as this relates to a different bug report. Please always post one topic for each different bug.

Ok another problem tho, if I try to open (as in, just view) some of my train-bus stations it reproducibly gives an immediate segfault. It doesn't happen on all stations tho. I tried to reproduce it on a new map with a double station with a bus stop attached but it didnt crash.

E.g. on southampton it happens, on manchester-k it doesnt happen but on manchester-l it does. All three stations are the same type of platform on the same type of track. Southampton and Manchester-k are double plattform (one in each direction) whilst Manchester-l is the turnaround end station. All three have bus stations attached. I really can't think of an explanation for this pattern.

Here's one of the segfaults:
Program received signal SIGSEGV, Segmentation fault.
0x080ca109 in freight_list_sorter_t::compare_ware(ware_t const&, ware_t const&) ()
(gdb) bt
#0  0x080ca109 in freight_list_sorter_t::compare_ware(ware_t const&, ware_t const&) ()
#1  0x080cb557 in void std::__introsort_loop<ware_t*, int, bool (*)(ware_t const&, ware_t const&)>(ware_t*, ware_t*, int, bool (*)(ware_t const&, ware_t const&)) ()
#2  0x080ca66f in freight_list_sorter_t::sort_freight(vector_tpl<ware_t> const*, cbuffer_t&, freight_list_sorter_t::sort_mode_t, slist_tpl<ware_t> const*, char const*) ()
#3  0x081edca4 in haltestelle_t::get_freight_info(cbuffer_t&) ()
#4  0x0812a859 in halt_info_t::zeichnen(koord, koord) ()
#5  0x08236105 in display_win(int) ()
#6  0x082364bc in display_all_win() ()
#7  0x08236760 in win_display_flush(double) ()
#8  0x08200f58 in intr_refresh_display(bool) ()
#9  0x08243f9f in karte_t::sync_step(long, bool, bool) ()
#10 0x08200efc in interrupt_check(char const*) ()
#11 0x0824ec23 in karte_t::interactive(unsigned int) ()
#12 0x0820a663 in simu_main(int, char**) ()
#13 0x0828e751 in main ()
« Last Edit: May 29, 2010, 11:15:22 PM by jamespetts »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Crash on looking at stations/stops
« Reply #1 on: May 29, 2010, 11:18:03 PM »
Steffen,

thank you very much for the bug report. Can you tell me: are you using the 64-bit or 32-bit build? The problem seems to occur in the compare_ware method, which uses (for the first time in Simutrans history) one of the STL templates, recently added by Christopher Mallon in Standard. This method seems to have caused problems in Experimental that I have yet to track down, although I have yet to reproduce any crashes with it. I do get assert failures inside the STL methods themselves, but have not been able to trace them to anything meaningful, and no side-effects of ignoring them are apparent.

Can you upload your saved game with instructions on how to reproduce the crash?

Offline steffen

  • *
  • Posts: 78
Re: Crash on looking at stations/stops
« Reply #2 on: May 29, 2010, 11:52:12 PM »
files.simutrans-germany.com didnt work (it just kept saying the file already exists) so I put it on my own server https://schaumburger.info/steffencrash.sve
Ignore the SSL warning.
To crash it: Load the game, then try to view e.g. any of these stations: 466,738 (southampton), 687,901 (manchester-l) or 348,335 (leipzig-w).
If you open 676,909 (manchester-k) it shouldnt crash.

This (and all my other reports except the one about the 64bit versions not starting) happens with the 32bit version of experimental 8.0.
Edit: From the download site that is
« Last Edit: May 30, 2010, 05:11:30 PM by steffen »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Crash on looking at stations/stops
« Reply #3 on: June 01, 2010, 11:57:31 PM »
I couldn't reproduce the crash on my Windows system, but I did get assertion failures. I have reverted the change to the STL sort method, and I no longer get assertion failures. I've pushed the change in the source code to Github, and it will be released with the forthcoming version 8.1. I anticipate that this will fix your problem. Thank you for the report :-)

Offline steffen

  • *
  • Posts: 78
Re: Crash on looking at stations/stops
« Reply #4 on: January 04, 2011, 06:27:58 PM »
Sorry for my long absence, I've been playing with the 30Dec build for linux32 now and I haven't any crash so I think this can be closed :)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18753
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Crash on looking at stations/stops
« Reply #5 on: January 04, 2011, 06:46:01 PM »
Thank you for the confirmation and welcome back!