I have noticed that "pl" is not integral, unlike scenario scripts. ???
I'm afraid something caused an error and simutrans stopped working.
Update:
It seems that the error occurs when switching between players who already had the tool previously selected.
Thread 1 "sim" received signal SIGSEGV, Segmentation fault.script_vm_t::intern_prepare_pending_callback (this=this@entry=0x0,
function=function@entry=0x5555559bb318 "exec_script_base_work_callback",
nret=nret@entry=3) at script/script.cc:561
561 BEGIN_STACK_WATCH(vm);
(gdb) where
#0 script_vm_t::intern_prepare_pending_callback (this=this@entry=0x0,
function=function@entry=0x5555559bb318 "exec_script_base_work_callback",
nret=nret@entry=3) at script/script.cc:561
#1 0x000055555591b0fe in script_vm_t::prepare_callback<exec_script_base_t*, player_t*, char const*> (arg3=<optimized out>, arg2=<optimized out>,
arg1=<optimized out>, nret=3,
function=0x5555559bb318 "exec_script_base_work_callback", this=0x0)
at script/script.h:175
#2 tool_exec_script_t::work (this=0x555558be9bf0, player=0x5555751b5760,
pos=...) at simtool-scripted.cc:243
#3 0x0000555555932ecb in karte_t::call_work (this=<optimized out>,
tool=tool@entry=0x555558be9bf0, player=player@entry=0x5555751b5760,
pos=..., suspended=@0x7fffffffae74: false) at simworld.cc:6851
#4 0x00005555558dbe4f in interaction_t::interactive_event (
this=this@entry=0x55555946cb70, ev=...) at siminteraction.cc:239
#5 0x00005555558dc576 in interaction_t::process_event (
this=this@entry=0x55555946cb70, ev=...) at siminteraction.cc:417
#6 0x00005555558dc6bf in interaction_t::check_events (this=0x55555946cb70)
at siminteraction.cc:439
#7 0x000055555593abcb in karte_t::interactive (
this=this@entry=0x555571241d60, quit_month=quit_month@entry=2147483647)
at simworld.cc:7156
#8 0x00005555558e4dec in simu_main (argc=argc@entry=1,
---Type <return> to continue, or q <return> to quit---
Thread 1 "sim" received signal SIGSEGV, Segmentation fault.
script_vm_t::intern_prepare_pending_callback (this=this@entry=0x0,
function=function@entry=0x5555559bb318 "exec_script_base_work_callback",
nret=nret@entry=3) at script/script.cc:561
561 BEGIN_STACK_WATCH(vm);
(gdb) where
#0 script_vm_t::intern_prepare_pending_callback (this=this@entry=0x0,
function=function@entry=0x5555559bb318 "exec_script_base_work_callback",
nret=nret@entry=3) at script/script.cc:561
#1 0x000055555591b0fe in script_vm_t::prepare_callback<exec_script_base_t*, player_t*, char const*> (arg3=<optimized out>, arg2=<optimized out>,
arg1=<optimized out>, nret=3,
function=0x5555559bb318 "exec_script_base_work_callback", this=0x0)
at script/script.h:175
#2 tool_exec_script_t::work (this=0x555558be7b90, player=0x55557122cd10,
pos=...) at simtool-scripted.cc:243
#3 0x0000555555932ecb in karte_t::call_work (this=<optimized out>,
tool=tool@entry=0x555558be7b90, player=player@entry=0x55557122cd10,
pos=..., suspended=@0x7fffffffae74: false) at simworld.cc:6851
#4 0x00005555558dbe4f in interaction_t::interactive_event (
this=this@entry=0x5555593c6da0, ev=...) at siminteraction.cc:239
#5 0x00005555558dc576 in interaction_t::process_event (
this=this@entry=0x5555593c6da0, ev=...) at siminteraction.cc:417
#6 0x00005555558dc6bf in interaction_t::check_events (this=0x5555593c6da0)
at siminteraction.cc:439
#7 0x000055555593abcb in karte_t::interactive (
this=this@entry=0x555571236e60, quit_month=quit_month@entry=2147483647)
at simworld.cc:7156
#8 0x00005555558e4dec in simu_main (argc=argc@entry=1,
---Type <return> to continue, or q <return> to quit---
Capture:(https://www.mediafire.com/convkey/103d/q3e10kjf6bmjptq6g.jpg)
Quote from: Yona-TYT on September 02, 2020, 11:31:45 AMI'm afraid something caused an error and simutrans stopped working. Update: It seems that the error occurs when switching between players who already had the tool previously selected. Thread 1 "sim" received signal SIGSEGV, Segmentation fault.script_vm_t::intern_prepare_pending_callback (this=this@entry=0x0, function=function@entry=0x5555559bb318 "exec_script_base_work_callback", nret=nret@entry=3) at script/script.cc:561 561 BEGIN_STACK_WATCH(vm); (gdb) where #0 script_vm_t::intern_prepare_pending_callback (this=this@entry=0x0, function=function@entry=0x5555559bb318 "exec_script_base_work_callback", nret=nret@entry=3) at script/script.cc:561 #1 0x000055555591b0fe in script_vm_t::prepare_callback (arg3=, arg2=, arg1=, nret=3, function=0x5555559bb318 "exec_script_base_work_callback", this=0x0) at script/script.h:175 #2 tool_exec_script_t::work (this=0x555558be9bf0, player=0x5555751b5760, pos=...) at simtool-scripted.cc:243 #3 0x0000555555932ecb in karte_t::call_work (this=, tool=tool@entry=0x555558be9bf0, player=player@entry=0x5555751b5760, pos=..., suspended=@0x7fffffffae74: false) at simworld.cc:6851 #4 0x00005555558dbe4f in interaction_t::interactive_event ( this=this@entry=0x55555946cb70, ev=...) at siminteraction.cc:239 #5 0x00005555558dc576 in interaction_t::process_event ( this=this@entry=0x55555946cb70, ev=...) at siminteraction.cc:417 #6 0x00005555558dc6bf in interaction_t::check_events (this=0x55555946cb70) at siminteraction.cc:439 #7 0x000055555593abcb in karte_t::interactive ( this=this@entry=0x555571241d60, quit_month=quit_month@entry=2147483647) at simworld.cc:7156 #8 0x00005555558e4dec in simu_main (argc=argc@entry=1, ---Type to continue, or q to quit---
Thread 1 "sim" received signal SIGSEGV, Segmentation fault. script_vm_t::intern_prepare_pending_callback (this=this@entry=0x0, function=function@entry=0x5555559bb318 "exec_script_base_work_callback", nret=nret@entry=3) at script/script.cc:561 561 BEGIN_STACK_WATCH(vm); (gdb) where #0 script_vm_t::intern_prepare_pending_callback (this=this@entry=0x0, function=function@entry=0x5555559bb318 "exec_script_base_work_callback", nret=nret@entry=3) at script/script.cc:561 #1 0x000055555591b0fe in script_vm_t::prepare_callback (arg3=, arg2=, arg1=, nret=3, function=0x5555559bb318 "exec_script_base_work_callback", this=0x0) at script/script.h:175 #2 tool_exec_script_t::work (this=0x555558be7b90, player=0x55557122cd10, pos=...) at simtool-scripted.cc:243 #3 0x0000555555932ecb in karte_t::call_work (this=, tool=tool@entry=0x555558be7b90, player=player@entry=0x55557122cd10, pos=..., suspended=@0x7fffffffae74: false) at simworld.cc:6851 #4 0x00005555558dbe4f in interaction_t::interactive_event ( this=this@entry=0x5555593c6da0, ev=...) at siminteraction.cc:239 #5 0x00005555558dc576 in interaction_t::process_event ( this=this@entry=0x5555593c6da0, ev=...) at siminteraction.cc:417 #6 0x00005555558dc6bf in interaction_t::check_events (this=0x5555593c6da0) at siminteraction.cc:439 #7 0x000055555593abcb in karte_t::interactive ( this=this@entry=0x555571236e60, quit_month=quit_month@entry=2147483647) at simworld.cc:7156 #8 0x00005555558e4dec in simu_main (argc=argc@entry=1, ---Type to continue, or q to quit---
Capture:(https://www.mediafire.com/convkey/103d/q3e10kjf6bmjptq6g.jpg)
@Dwachs
Have you managed to replicate this?
I got the crash once, but not reliably.
Edit: Got it. Just changing player, then call the tool with original player agian.
Edit2: Should be fixed with r9207.