I got an error while porting the tutorial scenario to pak64.
To replicate just build the stretch of road.
Script -> https://www.mediafire.com/file/h26k8u91c7uiys7/tutorial_pak64.zip/file (https://www.mediafire.com/file/h26k8u91c7uiys7/tutorial_pak64.zip/file)
Savegame -> https://www.mediafire.com/file/gq64hv5hg6kau5x/tutorial_pak64-1.sve/file
It doesn't seem to be a script error, but if it is I am going to need your help to find it since simutrans stops working without displaying an error window.
This is what gdb shows:Thread 1 "sim" received signal SIGSEGV, Segmentation fault.
script_api::param<signed char>::push (vm=vm@entry=0x55555b19b460,
v=<error reading variable>) at script/api_param.cc:139
139 sq_pushinteger(vm, v);
(gdb) where
#0 script_api::param<signed char>::push (vm=vm@entry=0x55555b19b460,
v=<error reading variable>) at script/api_param.cc:139
#1 0x0000555555835ab6 in script_api::set_slot<signed char> (index=1,
value=<optimized out>, name=0x555555993223 "z", vm=0x55555b19b460)
at script/api/../api_param.h:132
#2 exp_obj_pos_constructor (vm=0x55555b19b460)
at script/api/api_map_objects.cc:131
#3 0x00005555559624bd in SQVM::CallNative (this=this@entry=0x55555b19b460,
nclosure=0x55555b03f3d0, nargs=<optimized out>, newbase=newbase@entry=15,
retval=..., suspend=@0x7fffffffae8f: false)
at squirrel/squirrel/sqvm.cc:1216
#4 0x0000555555963e4f in SQVM::Execute (this=0x55555b19b460, closure=...,
nargs=<optimized out>, stackbase=<optimized out>, outres=...,
raiseerror=<optimized out>, et=<optimized out>,
can_suspend=<optimized out>) at squirrel/squirrel/sqvm.cc:811
#5 0x00005555559669e2 in SQVM::Call (this=this@entry=0x55555b19b460,
closure=..., nparams=nparams@entry=2, stackbase=stackbase@entry=2,
outres=..., raiseerror=raiseerror@entry=1, can_suspend=1)
at squirrel/squirrel/sqvm.cc:1585
#6 0x0000555555936b76 in sq_call (v=v@entry=0x55555b19b460,
params=params@entry=2, retval=retval@entry=1,
raiseerror=raiseerror@entry=1) at squirrel/squirrel/sqapi.cc:1179
#7 0x000055555592bbb7 in sq_call_restricted (v=v@entry=0x55555b19b460,
please test r9135
for linux found here (https://github.com/Andarix/simutrans/releases)
Quote from: Andarix on June 14, 2020, 09:37:50 AMplease test r9135 for linux found here (https://github.com/Andarix/simutrans/releases)
I have compiled the latest revision from the trunk, but the problem is still there. ???
Thread 1 "sim" received signal SIGSEGV, Segmentation fault.
script_api::param<signed char>::push (vm=vm@entry=0x5555599bc8e0,
v=<error reading variable>) at script/api_param.cc:139
139 sq_pushinteger(vm, v);
(gdb) where
#0 script_api::param<signed char>::push (vm=vm@entry=0x5555599bc8e0,
v=<error reading variable>) at script/api_param.cc:139
#1 0x000055555588034a in script_api::set_slot<signed char> (index=1,
value=<optimized out>, name=0x555555a15563 "z", vm=0x5555599bc8e0)
at script/api/../api_param.h:132
#2 exp_obj_pos_constructor (vm=0x5555599bc8e0)
at script/api/api_map_objects.cc:131
#3 0x00005555559dddcb in SQVM::CallNative (this=0x5555599bc8e0,
nclosure=0x55555b9385e0, nargs=<optimized out>, newbase=<optimized out>,
retval=..., suspend=@0x7fffffffad9f: false)
at squirrel/squirrel/sqvm.cc:1216
#4 0x00005555559e0e61 in SQVM::Execute (this=0x5555599bc8e0, closure=...,
nargs=<optimized out>, stackbase=<optimized out>, outres=...,
raiseerror=1, et=SQVM::ET_CALL, can_suspend=<optimized out>)
at squirrel/squirrel/sqvm.cc:811
#5 0x00005555559e1d22 in SQVM::Call (this=this@entry=0x5555599bc8e0,
closure=..., nparams=nparams@entry=2, stackbase=stackbase@entry=2,
outres=..., raiseerror=raiseerror@entry=1, can_suspend=1)
at squirrel/squirrel/sqvm.cc:1585
#6 0x00005555559ad6d0 in sq_call (v=v@entry=0x5555599bc8e0, params=2,
retval=1, raiseerror=raiseerror@entry=1) at squirrel/squirrel/sqapi.cc:1179
#7 0x000055555599cfb8 in sq_call_restricted (v=v@entry=0x5555599bc8e0,
params=<optimized out>, retval=<optimized out>,
---Type <return> to continue, or q <return> to quit---
should be fixed in r9136. Thank you for the report.
It works fine now. :p