News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Crash when building line to public bus stop.

Started by jk271, December 23, 2011, 05:36:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jk271

I have revealled bug causing simutrans experimental 10.4 to crash. Bug can be reproduced using following steps:


Switch to public player.
Build a bus stop as a public player.
Build second field of bus stop next to the previous one.
Switch to "human player".
Make a line that uses public stop. - click on field (built as the second) of public stop.


I am using 32bit version of simutrans experimental (simutrans-exp-2011-12-19-17f9c1b) on 32-bit Linux (my processor has 32bits too).
Game was player with pak64.experimental version 0.2.


When I realized this problem, I run program in gdb. Here is backtrace:


Program received signal SIGSEGV, Segmentation fault.
0x082a9225 in wkz_fahrplan_insert_aux(karte_t*, spieler_t*, koord3d, schedule_t*, bool) ()
(gdb) backtrace
#0  0x082a9225 in wkz_fahrplan_insert_aux(karte_t*, spieler_t*, koord3d, schedule_t*, bool) ()
#1  0x082a9391 in wkz_fahrplan_add_t::work(karte_t*, spieler_t*, koord3d) ()
#2  0x082b6161 in karte_t::interactive_event(event_t&) ()
#3  0x082d3780 in karte_t::interactive(unsigned int) ()
#4  0x0827c28f in simu_main(int, char**) ()
#5  0x08314161 in main ()


I hope that my description helps to reproduce behavior and reveal the cause.

jamespetts

Thank you for the report - that is most helpful. I am just about to go and visit my parents for Christmas, so will not be able to do any debugging until January. I shall do my best to look into the issue then. Thank you again very much 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.

archchancellor

I am seeing the same issue. I've been playing with multiple local players to simulate real, shared transport systems and trying to add a line to an existing stop of another play gives a segfault. Creating the line to the location and then adding the stop works correctly.

Locally compiled version of the 10.x branch, linux 64bit. Stacktrace:

Program received signal SIGSEGV, Segmentation fault.
0x000000000042f535 in spieler_t::allows_access_to (this=0x0, player_nr=2 '\002')
    at bauer/../player/simplay.h:463
463             bool allows_access_to(uint8 player_nr) const { return access[player_nr]; }
(gdb) backtrace
#0  0x000000000042f535 in spieler_t::allows_access_to (this=0x0, player_nr=2 '\002')
    at bauer/../player/simplay.h:463
#1  0x0000000000602c61 in wkz_fahrplan_insert_aux (welt=0xf51ec0, sp=0x82f0690, pos=..., fpl=0x27d0370,
    append=true) at simwerkz.cc:1667
#2  0x0000000000602d17 in wkz_fahrplan_add_t::work (this=0xdfe4a0, welt=0xf51ec0, sp=0x82f0690, k=...)
    at simwerkz.cc:1686
#3  0x00000000006394c0 in karte_t::interactive_event (this=0xf51ec0, ev=...) at simworld.cc:5948
#4  0x000000000063b55d in karte_t::interactive (this=0xf51ec0, quit_month=2147483647) at simworld.cc:6446
#5  0x00000000005e8c03 in simu_main (argc=1, argv=0x7fffffffe128) at simmain.cc:1274
#6  0x0000000000678e6d in main (argc=1, argv=0x7fffffffe128) at simsys_s.cc:682

Merry Christmas,
Mark

rsdworker

i found simllar crash when i tried to connect player 2 to player 1 stop (non public stop) which resulted crash

so example how i did excatly

1 build route on player A
2 switch to player B
3 build route to player A stop (providing that player A is granted access for player B)
its crashes when i click on player A stop in route planning

jamespetts

Thank you everyone for this report. I have done some brief testing, and I think that this issue is fixed with the same fix as fixed this issue. Can anyone who is able to compile from source recompile from the 10.x branch and check that the crash no longer appears? Thank you all very much indeed for your reports.
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.

archchancellor

I've pulled the change and the on the latest 10.x branch this bug no longer appears for me.

Thanks,
Mark

jamespetts

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.

jk271

It work well now. No segmentation fault with or without electric fence. I thank you for fixing it.
Tested version was the latest one in branch 10.x from 5th January.