News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Crash on looking at stations/stops

Started by steffen, May 29, 2010, 10:46:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

steffen

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 ()

jamespetts

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

steffen

#2
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

jamespetts

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

steffen

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 :)

jamespetts

Thank you for the confirmation and welcome back!
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.