News:

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

[r11082] Crash when rebuilding elevated way of bankrupt company

Started by ceeac, March 10, 2024, 08:29:29 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ceeac

Steps to reproduce:

  • Load the attached save with pak128. Make sure freeplay is disabled.
  • Fast-forward until the end of the month for "Napik 128 AS" to go bankrupt. This will delete the elevated way under the train, but not the ground tile because it is still occupied
  • Try to build an elevated way under the train to replace the deleted one.

Result:
src/simutrans/builder/wegbauer.cc:567:73: runtime error: member call on null pointer of type 'weg_t'
    #0 0x5628d4cd797d in way_builder_t::is_allowed_step(grund_t const*, grund_t const*, int*, bool) src/simutrans/builder/wegbauer.cc:567:73
    #1 0x5628d4d07578 in way_builder_t::intern_calc_route_elevated(koord3d, koord3d) src/simutrans/builder/wegbauer.cc:1792:12
    #2 0x5628d4d12b22 in way_builder_t::calc_route(vector_tpl<koord3d> const&, vector_tpl<koord3d> const&) src/simutrans/builder/wegbauer.cc:2202:12
    #3 0x5628d4d1130f in way_builder_t::calc_route(koord3d const&, koord3d const&) src/simutrans/builder/wegbauer.cc:2167:2
    #4 0x5628d6379559 in tool_build_way_t::calc_route(way_builder_t&, koord3d const&, koord3d const&) src/simutrans/tool/simtool.cc:2601:17
    #5 0x5628d637a803 in tool_build_way_t::mark_tiles(player_t*, koord3d const&, koord3d const&) src/simutrans/tool/simtool.cc:2634:20
    #6 0x5628d62ebd93 in two_click_tool_t::move(player_t*, unsigned short, koord3d) src/simutrans/tool/simmenu.cc:1421:4
    #7 0x5628d66bfb05 in karte_t::interactive(unsigned int) src/simutrans/world/simworld.cc:6051:11
    #8 0x5628d62a94bd in simu_main(int, char**) src/simutrans/simmain.cc:1585:9
    #9 0x5628d62ca212 in sysmain(int, char**) src/simutrans/sys/simsys.cc:1385:9
    #10 0x5628d69a8241 in main src/simutrans/sys/simsys_s2.cc:1207:9
    #11 0x7fdad39f0d8f in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16

SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/simutrans/builder/wegbauer.cc:567:73 in
*** Program received signal SIGABRT (Aborted) ***