News:

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

Reproducible CTD when starting ship

Started by Matthew, April 27, 2022, 06:05:04 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Matthew

Steps to reproduce

1. Open this B-B game in Extended from 2022-04-21.
2. Switch to player British Railways Western Region.
3. Jump to (1089,1529)
4. Open the Boswarne Ocean Shipyard there.
5. You should see SS Entente Cordiale. Change her line to Erin Trade Ships.
6. Press the Start button.

Expected results

Either the Entente Cordiale starts her journey or there is an error message.

Actual results

Crash to desktop.
The following message is reported in the log:
Warning: route_t::intern_calc_route():  Too many steps (1500000>=max 1500000) in route (too long/complex)
I think this also crashed the B-B server as my previous changes had gone.

Backtrace

With pretty colours:



In boring text for boring people  :P :

Warning: route_t::intern_calc_route():  Too many steps (1500000>=max 1500000) in route (too long/complex)
simutrans-extended-debug-220421: simconvoi.cc:2691: void convoi_t::start(): Assertion `gr' failed.
--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "simutrans-exten" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff7802859 in __GI_abort () at abort.c:79
#2  0x00007ffff7802729 in __assert_fail_base (fmt=0x7ffff7998588 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x555555be85ea "gr", file=0x555555c143ae "simconvoi.cc", line=2691, function=<optimised out>) at assert.c:92
#3  0x00007ffff7814006 in __GI___assert_fail (assertion=assertion@entry=0x555555be85ea "gr", file=file@entry=0x555555c143ae "simconvoi.cc", line=line@entry=2691, function=function@entry=0x555555c143e2 "void convoi_t::start()") at assert.c:101
#4  0x0000555555a5d74b in convoi_t::start (this=0x5555d9907850) at /usr/include/c++/9/typeinfo:100
#5  0x0000555555a81e1c in depot_t::start_convoi (this=this@entry=0x5555b3a5f730, cnv=..., local_execution=<optimised out>) at simdepot.cc:623
#6  0x0000555555aec6b5 in tool_change_depot_t::init (this=0x5555d8a9d260, player=0x55557eecfd90) at simmenu.h:251
#7  0x0000555555b22f2c in karte_t::local_set_tool (this=0x55557b712c10, tool_in=0x5555d8a9d260, player=0x55557eecfd90) at simworld.cc:4255
#8  0x0000555555b232bc in karte_t::set_tool (this=this@entry=0x55557b712c10, tool_in=tool_in@entry=0x5555d8a9d260, player=0x55557eecfd90) at simworld.cc:4232
#9  0x0000555555a7edd4 in depot_t::call_depot_tool (this=0x5555b3a5f730, tool=<optimised out>, cnv=..., extra=0x0, livery_scheme_index=<optimised out>) at vehicle/../simworld.h:2648
#10 0x000055555580a2a6 in non-virtual thunk to depot_frame_t::action_triggered(gui_action_creator_t*, value_t) () at gui/depot_frame.cc:779
#11 0x00005555557b805c in gui_action_creator_t::call_listeners (v=..., this=<optimised out>) at gui/components/gui_action_creator.h:32
#12 button_t::infowin_event (this=0x55555f44eea0, ev=<optimised out>) at gui/components/gui_button.cc:323
#13 0x00005555557be728 in gui_container_t::infowin_event (this=0x55555f453c18, ev=ev@entry=0x7fffffff9c60) at gui/components/gui_container.cc:206
#14 0x00005555558454b5 in gui_frame_t::infowin_event (this=this@entry=0x55555f44e630, ev=ev@entry=0x7fffffff9d20) at gui/gui_frame.cc:135
#15 0x0000555555809346 in depot_frame_t::infowin_event (this=0x55555f44e630, ev=0x7fffffff9d20) at gui/depot_frame.cc:846
#16 0x000055555591699e in check_pos_win (ev=ev@entry=0x7fffffffa070) at gui/../display/../dataobj/../tpl/vector_tpl.h:277
#17 0x0000555555aba1c9 in interaction_t::process_event (this=0x55557ac367e0, ev=...) at siminteraction.cc:371
#18 0x0000555555aba89b in interaction_t::check_events (this=0x55557ac367e0) at siminteraction.cc:446
#19 0x0000555555b51db4 in karte_t::interactive (this=this@entry=0x55557b712c10, quit_month=quit_month@entry=2147483647) at simworld.cc:11319
#20 0x0000555555ac95aa in simu_main (argc=argc@entry=5, argv=argv@entry=0x7fffffffdee8) at simmain.cc:1693
#21 0x0000555555b55365 in sysmain (argc=5, argv=0x7fffffffdee8) at sys/simsys.cc:1102
#22 0x00007ffff78040b3 in __libc_start_main (main=0x55555567a410 <main(int, char**)>, argc=5, argv=0x7fffffffdee8, init=<optimised out>, fini=<optimised out>, rtld_fini=<optimised out>, stack_end=0x7fffffffded8) at ../csu/libc-start.c:308
#23 0x000055555567a48e in _start () at gui/components/gui_button.cc:557

There are a lot of "Warning: route_t::intern_calc_route():  Problem with heuristic:" log entries before this, but the log of debug versions is full of these all the time and the co-ordinates don't appear obviously relevant. But for the record the last one before the crash is:
Warning: route_t::intern_calc_route():  Problem with heuristic:  from 366,1810,10 to (348,1802,9) at 391,1854, best = 9310, cost = 859, heur = 9380, dist = 70, turns = 8451

Notes

GDB is reporting something about a missing Linux dependency, so perhaps worth noting that this is Ubuntu 20.4.3 and Linux kernel 5.13.0-40-generic (an Ubuntu kernel). But I assume it's a problem in our code not glibc or the kernel. Maybe a malformed assertion???
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。


jamespetts

Thank you for the report. I believe that I have now fixed this; I should be grateful if you could re-test with the next nightly build.
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.

Matthew

Quote from: jamespetts on May 01, 2022, 12:18:35 PMThank you for the report. I believe that I have now fixed this; I should be grateful if you could re-test with the next nightly build.

The test case now produces the expected result. Thank you for fixing this, James!
(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。