News:

SimuTranslator
Make Simutrans speak your language.

[r10659] Crash when removing objects

Started by ceeac, June 08, 2022, 06:13:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ceeac

To reproduce, try removing a tree using the remove tool.

This also happens when running the tests:
<...>
00:00:19 Script: Print:    [97/133] test_trees_plant_single
00:00:19 src/simutrans/tool/simtool.cc:692:28: runtime error: member call on null pointer of type 'obj_t'
00:00:19     #0 0x10f0cf0 in tool_remover_t::tool_remover_intern(player_t*, koord3d, signed char, char const*&) (/home/runner/work/simutrans/simutrans/sim+0x10f0cf0)
00:00:19     #1 0x10f18c6 in tool_remover_t::work(player_t*, koord3d) (/home/runner/work/simutrans/simutrans/sim+0x10f18c6)
00:00:19     #2 0x12e4516 in karte_t::call_work_api(tool_t*, player_t*, koord3d, bool&, bool) (/home/runner/work/simutrans/simutrans/sim+0x12e4516)
00:00:19     #3 0xde2b34 in script_api::param<script_api::call_tool_work>::push(SQVM*, script_api::call_tool_work) (/home/runner/work/simutrans/simutrans/sim+0xde2b34)
00:00:19     #4 0xde1be0 in command_work(SQVM*) (/home/runner/work/simutrans/simutrans/sim+0xde1be0)
00:00:19     #5 0x141fcea in SQVM::CallNative(SQNativeClosure*, long long, long long, SQObjectPtr&, int, bool&, bool&) (/home/runner/work/simutrans/simutrans/sim+0x141fcea)
00:00:19     #6 0x140bf83 in SQVM::Execute(SQObjectPtr&, long long, long long, SQObjectPtr&, unsigned long long, SQVM::ExecutionType, unsigned long long) (/home/runner/work/simutrans/simutrans/sim+0x140bf83)
00:00:19     #7 0x135874c in sq_wakeupvm (/home/runner/work/simutrans/simutrans/sim+0x135874c)
00:00:19     #8 0x1324dff in sq_resumevm(SQVM*, unsigned long long, long long) (/home/runner/work/simutrans/simutrans/sim+0x1324dff)
00:00:19     #9 0xfb0646 in script_vm_t::intern_resume_call(SQVM*) (/home/runner/work/simutrans/simutrans/sim+0xfb0646)
00:00:19     #10 0xfaf823 in script_vm_t::intern_finish_call(SQVM*, script_vm_t::call_type_t, int, bool) (/home/runner/work/simutrans/simutrans/sim+0xfaf823)
00:00:19     #11 0x655f45 in char const* script_vm_t::call_function<int, unsigned int>(script_vm_t::call_type_t, char const*, int&, unsigned int const&) (/home/runner/work/simutrans/simutrans/sim+0x655f45)
00:00:19     #12 0x64f366 in scenario_t::step() (/home/runner/work/simutrans/simutrans/sim+0x64f366)
00:00:19     #13 0x12e1fc4 in karte_t::step() (/home/runner/work/simutrans/simutrans/sim+0x12e1fc4)
00:00:19     #14 0x13021f8 in karte_t::interactive(unsigned int) (/home/runner/work/simutrans/simutrans/sim+0x13021f8)
00:00:19     #15 0x10aa5ce in simu_main(int, char**) (/home/runner/work/simutrans/simutrans/sim+0x10aa5ce)
00:00:19     #16 0x10ba0ae in sysmain(int, char**) (/home/runner/work/simutrans/simutrans/sim+0x10ba0ae)
00:00:19     #17 0x7fae0fe16082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082)
00:00:19     #18 0x42badd in _start (/home/runner/work/simutrans/simutrans/sim+0x42badd)
00:00:19
00:00:19 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior src/simutrans/tool/simtool.cc:692:28 in

prissi