Author Topic: [FIXED] Simutrans closes in server mode  (Read 3326 times)

0 Members and 1 Guest are viewing this topic.

Offline Yona-TYT

[FIXED] Simutrans closes in server mode
« on: September 07, 2016, 02:55:57 AM »
Testing server mode with script and found this error.

Code: [Select]
Use work dir /home/yona/Descargas/simutrans/
Reading low level config data ...
Simutrans version 120.1.4 Nightly from Aug 20 2016 rr7860
parse_simuconf() at config/simuconf.tab: Reading simuconf.tab successful!
Server started, added 2 server sockets
Warning: simwin.cc themes_init(): Can't read themes from themes.tab
Preparing display ...
SDL_driver=x11, hw_available=0, video_mem=0, blit_sw=0, bpp=32, bytes=4
Screen Flags: requested=10, actual=10
dr_os_open(SDL): SDL realized screen size width=704, height=560 (requested w=704, h=560)
Loading font 'font/prop.fnt'
font/prop.fnt successfully loaded as old format prop font!
Init done.
parse_simuconf() at pak/config/simuconf.tab:
Reading simuconf.tab successful!
Reading compatibility sound data ...
Loaded /home/yona/Descargas/simutrans/pak/sound/bus.wav to sample 0.
Loaded /home/yona/Descargas/simutrans/pak/sound/truck.wav to sample 1.
Loaded /home/yona/Descargas/simutrans/pak/sound/diesel.wav to sample 2.
Loaded /home/yona/Descargas/simutrans/pak/sound/steam.wav to sample 3.
Loaded /home/yona/Descargas/simutrans/pak/sound/boat-horn.wav to sample 4.
Loaded /home/yona/Descargas/simutrans/pak/sound/comet-jet.wav to sample 5.
Loaded /home/yona/Descargas/simutrans/pak/sound/planelow.wav to sample 6.
Loaded /home/yona/Descargas/simutrans/pak/sound/click.wav to sample 7.
Loaded /home/yona/Descargas/simutrans/pak/sound/boing.wav to sample 8.
Loaded /home/yona/Descargas/simutrans/pak/sound/jackhammer.wav to sample 9.
Loaded /home/yona/Descargas/simutrans/pak/sound/gavel.wav to sample 10.
Loaded /home/yona/Descargas/simutrans/pak/sound/dock.wav to sample 11.
Loaded /home/yona/Descargas/simutrans/pak/sound/explosion.wav to sample 12.
Loaded /home/yona/Descargas/simutrans/pak/sound/cash.wav to sample 13.
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak/sound/beaches.wav)
Warning: sound_besch_t::get_sound_id(): sound "beaches.wav" not found
Loaded /home/yona/Descargas/simutrans/pak/sound/forest.wav to sample 14.
Loaded /home/yona/Descargas/simutrans/pak/sound/Water.wav to sample 15.
Loaded /home/yona/Descargas/simutrans/pak/sound/desert.wav to sample 16.
Loaded /home/yona/Descargas/simutrans/pak/sound/tropic.wav to sample 17.
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak/sound/mediterran.wav)
Warning: sound_besch_t::get_sound_id(): sound "mediterran.wav" not found
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak/sound/temperate.wav)
Warning: sound_besch_t::get_sound_id(): sound "temperate.wav" not found
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak/sound/tundra.wav)
Warning: sound_besch_t::get_sound_id(): sound "tundra.wav" not found
could not load wav (Couldn't open /home/yona/Descargas/simutrans/pak/sound/rocky.wav)
Warning: sound_besch_t::get_sound_id(): sound "rocky.wav" not found
Loaded /home/yona/Descargas/simutrans/pak/sound/arctic.wav to sample 18.
Warning: translator::load_files_from_folder(): no pak texts for language 'ce'
Loading BDF font 'cyr.bdf'
Reading city configuration ...
Reading speedbonus configuration ...
Reading menu configuration ...
Warning: create_simple_tool(): deprecated tool [27] requested
Reading object data from pak/...
Loaded /home/yona/Descargas/simutrans/pak/sound/horse.wav to sample 19.
Loaded /home/yona/Descargas/simutrans/pak/sound/crossing.wav to sample 20.
Reading menu configuration ...
Midi disabled ...
Calculating textures ...done
World destroyed.
Warning: karte_t::laden: Fileversion: 120002
Warning: scenario_t::rdwr: loaded persistent scenario data: persistent = {
longest_bridge_info = {
max_length = -1,
player_nr = -1,
},
pending_goals = [
[
transported_passengers_month(),
transported_mail_month(),
deliver_goods_month(),
deliver_power_month(),
hoard_money_month(),
burn_money_month(),
profite_month(),
longest_bridge(),
convoy_distance(),
convoy_profitable(1),
convoy_profitable(2),
convoy_profitable(3),
convoy_profitable(5),
convoy_profitable(6),
convoy_profitable(7),
convoy_profitable(8),
convoy_profitable(16),
],
null,
[
transported_passengers_month(),
transported_mail_month(),
deliver_goods_month(),
deliver_power_month(),
hoard_money_month(),
burn_money_month(),
profite_month(),
longest_bridge(),
convoy_distance(),
convoy_profitable(1),
convoy_profitable(2),
convoy_profitable(3),
convoy_profitable(5),
convoy_profitable(6),
convoy_profitable(7),
convoy_profitable(8),
convoy_profitable(16),
],
[
transported_passengers_month(),
transported_mail_month(),
deliver_goods_month(),
deliver_power_month(),
hoard_money_month(),
burn_money_month(),
profite_month(),
longest_bridge(),
convoy_distance(),
convoy_profitable(1),
convoy_profitable(2),
convoy_profitable(3),
convoy_profitable(5),
convoy_profitable(6),
convoy_profitable(7),
convoy_profitable(8),
convoy_profitable(16),
],
null,
[
transported_passengers_month(),
transported_mail_month(),
deliver_goods_month(),
deliver_power_month(),
hoard_money_month(),
burn_money_month(),
profite_month(),
longest_bridge(),
convoy_distance(),
convoy_profitable(1),
convoy_profitable(2),
convoy_profitable(3),
convoy_profitable(5),
convoy_profitable(6),
convoy_profitable(7),
convoy_profitable(8),
convoy_profitable(16),
],
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
],
company_goal_info = [
{
cnv_profitable = [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
max_dist = 0,
historic = 0,
underground_station = 0,
aboveground_station = 0,
},
null,
{
cnv_profitable = [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
max_dist = 0,
historic = 0,
underground_station = 0,
aboveground_station = 0,
},
{
cnv_profitable = [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
max_dist = 0,
historic = 0,
underground_station = 0,
aboveground_station = 0,
},
null,
{
cnv_profitable = [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
],
max_dist = 0,
historic = 0,
underground_station = 0,
aboveground_station = 0,
},
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
],
pending_tile_checks = [
],
save_version = 1,
inactive_players = [
],
}


script engine started.
ERROR: scenario_t::load_script: error [Reading / compiling script failed] calling /home/yona/Descargas/simutrans/pak/scenario/regions2/scenario.nut
For help with this error or to file a bug report please see the Simutrans forum:
http://forum.simutrans.com
Warning: scenario_t::rdwr: could not load script file /home/yona/Descargas/simutrans/pak/scenario/regions2/scenario.nut
Warning: karte_t::laden(): loaded savegame from 1/1930, next month=2097152, ticks=1663332 (per month=1<<20)
Loading BDF font 'cyr.bdf'
Running world, pause=0, fast forward=0 ...
Warning: nwc_tool_t::rdwr: rdwr id=8 client=0 plnr=255 pos=koord3d invalid tool_id=8224 defpar=Right now 0 clients are connected. init=1 flags=0
Warning: karte_t::interactive: server lagging by 6094
Warning: nwc_tool_t::clone: send sync_steps=1  tool_id=8224 init
Warning: nwc_tool_t::rdwr: rdwr id=8 client=0 plnr=255 pos=koord3d invalid tool_id=8224 defpar=Right now 0 clients are connected. init=1 flags=0
Warning: karte_t::interactive: server lagging by 5970
Warning: karte_t::interactive: server lagging by 5840
Warning: karte_t::interactive: server lagging by 5721
Warning: karte_t::interactive: server lagging by 5591
Warning: karte_t::interactive: server lagging by 5472
Warning: karte_t::interactive: server lagging by 5354
Warning: karte_t::interactive: server lagging by 5230
Warning: karte_t::interactive: server lagging by 5107
Warning: karte_t::interactive: server lagging by 4981
Warning: karte_t::interactive: server lagging by 4866
Warning: karte_t::interactive: server lagging by 4745
Warning: karte_t::interactive: server lagging by 4643
Warning: karte_t::interactive: server lagging by 4533
Warning: karte_t::interactive: server lagging by 4412
Warning: karte_t::interactive: server lagging by 4289
Warning: karte_t::interactive: server lagging by 4158
Warning: karte_t::interactive: server lagging by 4025
Warning: karte_t::interactive: server lagging by 3903
Warning: karte_t::interactive: server lagging by 3769
Warning: karte_t::interactive: server lagging by 3641
Warning: karte_t::interactive: server lagging by 3518
Warning: karte_t::interactive: server lagging by 3389
Warning: karte_t::interactive: server lagging by 3251
Warning: karte_t::interactive: server lagging by 3118
Warning: karte_t::interactive: server lagging by 2988
Warning: karte_t::interactive: server lagging by 2860
Warning: karte_t::interactive: server lagging by 2724
Warning: karte_t::interactive: server lagging by 2599
Warning: karte_t::interactive: server lagging by 2471
Warning: karte_t::interactive: server lagging by 2343
Warning: karte_t::interactive: server lagging by 2215
Warning: karte_t::interactive: server lagging by 2080
Warning: karte_t::interactive: server lagging by 1956
Warning: karte_t::interactive: server lagging by 1828
Warning: karte_t::interactive: server lagging by 1702
Warning: karte_t::interactive: server lagging by 1569
Warning: karte_t::interactive: server lagging by 1435
Warning: karte_t::interactive: server lagging by 1307
Warning: karte_t::interactive: server lagging by 1180
Warning: karte_t::interactive: server lagging by 1055
Warning: karte_t::interactive: server lagging by 929
Warning: karte_t::interactive: server lagging by 803
Warning: karte_t::interactive: server lagging by 672
Warning: karte_t::interactive: server lagging by 545
Warning: karte_t::interactive: server lagging by 414
Warning: karte_t::interactive: server lagging by 283
Warning: karte_t::laden: disconnecting all clients
World destroyed.
Warning: karte_t::laden: Fileversion: 120002
Warning: karte_t::laden(): loaded savegame from 0/1930, next month=1048576, ticks=50999 (per month=1<<20)
Warning: network_check_activity(): received cmd id=1 nwc_gameinfo_t from socket[13]
« Last Edit: September 17, 2016, 10:47:13 AM by Dwachs »

Offline Yona-TYT

Re: Simutrans closes in server mode
« Reply #1 on: September 07, 2016, 10:15:15 AM »
Backtrace:



Code: [Select]

Thread 1 "sim" received signal SIGSEGV, Segmentation fault.
0x082769f1 in SQObjectPtr::Null (this=0xb9f8ba8) at squirrel/squirrel/sqobject.h:294
294   squirrel/squirrel/sqobject.h: Permission denied.
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.6-20.fc24.i686
(gdb)
(gdb) where
#0  0x082769f1 in SQObjectPtr::Null (this=0xb9f8ba8) at squirrel/squirrel/sqobject.h:294
#1  0x0829c336 in SQVM::Pop (this=0xb1b4550, n=4) at squirrel/squirrel/sqvm.cc:1729
#2  0x08274cc1 in sq_call (v=0xb1b4550, params=4, retval=1, raiseerror=1)
    at squirrel/squirrel/sqapi.cc:1173
#3  0x082713f3 in sq_call_restricted (v=0xb1b4550, params=4, retval=1, throw_if_no_ops=1,
    ops=10000) at squirrel/sq_extensions.cc:36
#4  0x0826f011 in script_vm_t::intern_call_function (job=0xb1b4550, ct=script_vm_t::FORCE,
    nparams=4, retvalue=true) at script/script.cc:274
#5  0x0826ef5c in script_vm_t::intern_finish_call (this=0xb1a3fe8, job=0xb1b4550,
    ct=script_vm_t::FORCE, nparams=4, retvalue=true) at script/script.cc:257
#6  0x080bd128 in script_vm_t::call_function<bool, unsigned char, unsigned short, short> (
    this=0xb1a3fe8, ct=script_vm_t::FORCE, function=0x836bc7a "is_tool_allowed",
    ret=@0xbfffd1ce: true, arg1=5 '\005', arg2=4115, arg3=1)
    at dataobj/../script/script.h:135
#7  0x080baa5b in scenario_t::is_tool_allowed (this=0x9d55b98, player=0xb9fb250,
    tool_id=4115, wt=1) at dataobj/scenario.cc:483
#8  0x081c20e8 in nwc_tool_t::clone (this=0xa544328, welt=0x858f580)
    at network/network_cmd_ingame.cc:1097
#9  0x081c1041 in network_broadcast_world_command_t::execute (this=0xa544328, welt=0x858f580)
    at network/network_cmd_ingame.cc:816
#10 0x0833d8ed in karte_t::process_network_commands (this=0x858f580,
    ms_difference=0xbfffd434) at simworld.cc:6393
#11 0x0833e263 in karte_t::interactive (this=0x858f580, quit_month=2147483647)




I leave this here also:
the server has crashed twice now.https://www.dropbox.com/s/6ybdnf3tc0167cg/simu-server13358-crash-7-9%20%282%29.log?dl=1https://www.dropbox.com/s/u2xsostth2tktza/simu-server13358-crash-7-9.log?dl=1i don't have more infor for now.River
« Last Edit: September 07, 2016, 12:42:06 PM by Yona-TYT »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4252
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Simutrans closes in server mode
« Reply #2 on: September 07, 2016, 09:29:09 PM »
The log and the backtrace are from the same crash?

The log tells that you started the server, which loaded automatically a savegame with scenario. However loading it failed, since the script was not available. Then another savegame was loaded. And now there is a crash in the squirrel virtual machine, which is strange, since at this point no virtual machine should be active anymore. Is this description of events correct?

As for the crashes of River's server: Can you provide a savegame and the script, then I could try to reproduce this.
Parsley, sage, rosemary, and maggikraut.

Offline River


Offline Yona-TYT

Re: Simutrans closes in server mode
« Reply #4 on: September 07, 2016, 10:00:09 PM »
@Dwachs, It would be good to announce a server to reproduce the error personally.  ;)


By the way, the error occurs when it runs (scenario.nut 839):


Code: [Select]
if (pos.x+1 >= plregions[pl-2].x1 && pos.x <= plregions[pl-2].x2+1 && pos.y+1 >= plregions[pl-2].y2 && pos.y<= plregions[pl-2].y1+1 )


                  {


                     result = null


                     if (get_removercoord(pl)!=null && removercoord[pl-2].x >= plregions[pl-2].x1 && removercoord[pl-2].x <= plregions[pl-2].x2 && removercoord[pl-2].y >= plregions[pl-2].y2 && removercoord[pl-2].y <= plregions[pl-2].y1)


                        {


                           if (tile_x(removercoord[pl-2].x, removercoord[pl-2].y, removercoord[pl-2].z).get_halt() != null)


                              {


                                 tile_x(removercoord[pl-2].x, removercoord[pl-2].y, removercoord[pl-2].z).remove_object(player_x(1),mo_building)


                                 player_x(pl).book_cash(-2000000)   


                              }                           


                        }


                                               


                  }



The log and the backtrace are from the same crash?

I think they are two different errors, simutrans closed every time I tried to create a server.




« Last Edit: September 07, 2016, 10:14:46 PM by Yona-TYT »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4252
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Simutrans closes in server mode
« Reply #5 on: September 08, 2016, 07:29:58 AM »
@Yona can you please also upload the server-13xxx-network.sve from your local maching? This file is loaded automatically if you start simutrans in server mode. You can try to delete/move this file, such that the server starts with a clean map.
Parsley, sage, rosemary, and maggikraut.

Offline Yona-TYT

Re: Simutrans closes in server mode
« Reply #6 on: September 08, 2016, 10:28:42 AM »

@Yona can you please also upload the server-13xxx-network.sve from your local maching? This file is loaded automatically if you start simutrans in server mode. You can try to delete/move this file, such that the server starts with a clean map.
simutrans-error.zip

Backtrace:
Code: [Select]
(gdb) where
#0  0xb7fdabc8 in __kernel_vsyscall ()
#1  0xb7b585c9 in __GI_raise (sig=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#2  0xb7b59ca7 in __GI_abort () at abort.c:89
#3  0x083440cb in log_t::fatal (this=0x853dba8,
    who=0x837f753 "network_init_server()",
    format=0x837f874 "Unable to bind socket to IP address: \"%s\"")
    at utils/log.cc:346
#4  0x081bbfde in network_init_server (port=13353) at network/network.cc:446
#5  0x082f015c in simu_main (argc=14, argv=0xbffff054) at simmain.cc:695
#6  0x08301202 in sysmain (argc=14, argv=0xbffff054) at simsys.cc:805
#7  0x08360338 in main (argc=14, argv=0xbffff054) at simsys_s.cc:714
(gdb)





It also fails when attempting to save the map.
Code: [Select]

Thread 1 "sim" received signal SIGSEGV, Segmentation fault.
0x082769f1 in SQObjectPtr::Null (this=0x944a870)
    at squirrel/squirrel/sqobject.h:294
294   squirrel/squirrel/sqobject.h: Permission denied.
(gdb) where
#0  0x082769f1 in SQObjectPtr::Null (this=0x944a870)
    at squirrel/squirrel/sqobject.h:294
#1  0x0829c336 in SQVM::Pop (this=0x9f38ab8, n=1)
    at squirrel/squirrel/sqvm.cc:1729
#2  0x08274cc1 in sq_call (v=0x9f38ab8, params=1, retval=1, raiseerror=1)
    at squirrel/squirrel/sqapi.cc:1173
#3  0x082713f3 in sq_call_restricted (v=0x9f38ab8, params=1, retval=1,
    throw_if_no_ops=1, ops=10000) at squirrel/sq_extensions.cc:36
#4  0x0826f011 in script_vm_t::intern_call_function (job=0x9f38ab8,
    ct=script_vm_t::FORCE, nparams=1, retvalue=true) at script/script.cc:274
#5  0x0826ef5c in script_vm_t::intern_finish_call (this=0x9170290,
    job=0x9f38ab8, ct=script_vm_t::FORCE, nparams=1, retvalue=true)
    at script/script.cc:257
#6  0x080bccc5 in script_vm_t::call_function<plainstring> (this=0x9170290,
    ct=script_vm_t::FORCE, function=0x836bd73 "save", ret=...)
    at dataobj/../script/script.h:103
#7  0x080bbe66 in scenario_t::rdwr (this=0x9b71940, file=0xbfffd170)
    at dataobj/scenario.cc:829
#8  0x08336fb1 in karte_t::save (this=0x858fe40, file=0xbfffd170, silent=false)
    at simworld.cc:4774
#9  0x083360d4 in karte_t::save (this=0x858fe40,
    filename=0x9f979ec "autosave-pak.sve", savemode=loadsave_t::zipped,
    version_str=0x839224b "0.120.2", silent=false) at simworld.cc:4565
« Last Edit: September 08, 2016, 10:50:19 AM by Yona-TYT »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4252
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Simutrans closes in server mode
« Reply #7 on: September 08, 2016, 07:57:40 PM »
@Yona first crash happens if you close/crash your server and then immediately start a new one. Sometimes the OS is waiting for some time-out and a new server cannot be started.

second crash: which game crashes? Does the crash happen with the empty map in the zip file?
Parsley, sage, rosemary, and maggikraut.

Offline Yona-TYT

Re: Simutrans closes in server mode
« Reply #8 on: September 08, 2016, 08:32:00 PM »
second crash: which game crashes? Does the crash happen with the empty map in the zip file?



Just after using this:
Code: [Select]
if (pos.x+1 >= plregions[pl-2].x1 && pos.x <= plregions[pl-2].x2+1 && pos.y+1 >= plregions[pl-2].y2 && pos.y<= plregions[pl-2].y1+1 )


                  {


                     result = null


                     if (get_removercoord(pl)!=null && removercoord[pl-2].x >= plregions[pl-2].x1 && removercoord[pl-2].x <= plregions[pl-2].x2 && removercoord[pl-2].y >= plregions[pl-2].y2 && removercoord[pl-2].y <= plregions[pl-2].y1)


                        {


                           if (tile_x(removercoord[pl-2].x, removercoord[pl-2].y, removercoord[pl-2].z).get_halt() != null)


                              {


                                 tile_x(removercoord[pl-2].x, removercoord[pl-2].y, removercoord[pl-2].z).remove_object(player_x(1),mo_building)


                                 player_x(pl).book_cash(-2000000)   


                              }                           


                        }


                                               


                  }


It has to do with this:
Backtrace:



Code: [Select]

Thread 1 "sim" received signal SIGSEGV, Segmentation fault.
0x082769f1 in SQObjectPtr::Null (this=0xb9f8ba8) at squirrel/squirrel/sqobject.h:294
294   squirrel/squirrel/sqobject.h: Permission denied.
Missing separate debuginfos, use: dnf debuginfo-install bzip2-libs-1.0.6-20.fc24.i686
(gdb)
(gdb) where
#0  0x082769f1 in SQObjectPtr::Null (this=0xb9f8ba8) at squirrel/squirrel/sqobject.h:294
#1  0x0829c336 in SQVM::Pop (this=0xb1b4550, n=4) at squirrel/squirrel/sqvm.cc:1729
#2  0x08274cc1 in sq_call (v=0xb1b4550, params=4, retval=1, raiseerror=1)
    at squirrel/squirrel/sqapi.cc:1173
#3  0x082713f3 in sq_call_restricted (v=0xb1b4550, params=4, retval=1, throw_if_no_ops=1,
    ops=10000) at squirrel/sq_extensions.cc:36
#4  0x0826f011 in script_vm_t::intern_call_function (job=0xb1b4550, ct=script_vm_t::FORCE,
    nparams=4, retvalue=true) at script/script.cc:274
#5  0x0826ef5c in script_vm_t::intern_finish_call (this=0xb1a3fe8, job=0xb1b4550,
    ct=script_vm_t::FORCE, nparams=4, retvalue=true) at script/script.cc:257
#6  0x080bd128 in script_vm_t::call_function<bool, unsigned char, unsigned short, short> (
    this=0xb1a3fe8, ct=script_vm_t::FORCE, function=0x836bc7a "is_tool_allowed",
    ret=@0xbfffd1ce: true, arg1=5 '\005', arg2=4115, arg3=1)
    at dataobj/../script/script.h:135
#7  0x080baa5b in scenario_t::is_tool_allowed (this=0x9d55b98, player=0xb9fb250,
    tool_id=4115, wt=1) at dataobj/scenario.cc:483
#8  0x081c20e8 in nwc_tool_t::clone (this=0xa544328, welt=0x858f580)
    at network/network_cmd_ingame.cc:1097
#9  0x081c1041 in network_broadcast_world_command_t::execute (this=0xa544328, welt=0x858f580)
    at network/network_cmd_ingame.cc:816
#10 0x0833d8ed in karte_t::process_network_commands (this=0x858f580,
    ms_difference=0xbfffd434) at simworld.cc:6393
#11 0x0833e263 in karte_t::interactive (this=0x858f580, quit_month=2147483647)




I leave this here also:
« Last Edit: September 08, 2016, 09:30:29 PM by Yona-TYT »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4252
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Simutrans closes in server mode
« Reply #9 on: September 09, 2016, 07:26:41 AM »
what should I do to reproduce the crash? Which savegame to use?
Parsley, sage, rosemary, and maggikraut.

Offline Yona-TYT

Re: Simutrans closes in server mode
« Reply #10 on: September 09, 2016, 08:39:47 AM »
You need a server and a client connected  to reproduce this, you only need the savegame that provides the scenario.



Using the clienete, you must remove a station anyone using "remove_object(player_x(1), mo_building)"


This is accomplished using the stop at (0.769), there must enter the coordinates of the station you are deleting, then you use the tool to remove where is the placeholder (use remove tool here).





« Last Edit: September 10, 2016, 01:41:08 AM by Yona-TYT »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4252
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Simutrans closes in server mode
« Reply #11 on: September 10, 2016, 03:10:34 PM »
Could reproduce this. There is indeed something fishy going on. Thanks for the report.

Edit: you should not call remove_obj (or any map-modifying tool) in call is_work_allowed. Will see, how to forbid that program-wise.
« Last Edit: September 10, 2016, 04:46:16 PM by Dwachs »
Parsley, sage, rosemary, and maggikraut.

Offline Yona-TYT

Re: Simutrans closes in server mode
« Reply #12 on: September 10, 2016, 08:04:51 PM »
Edit: you should not call remove_obj (or any map-modifying tool) in call is_work_allowed. Will see, how to forbid that program-wise.
There are some other function to use this? ???

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4252
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Simutrans closes in server mode
« Reply #13 on: September 11, 2016, 08:40:13 AM »
There are some other function to use this? ???
You can store the necessary information somewhere, then call the tool within is_scenario_completed.
Parsley, sage, rosemary, and maggikraut.

Offline Yona-TYT

Re: Simutrans closes in server mode
« Reply #14 on: September 11, 2016, 12:37:42 PM »

OK, I resolved.
Now there is a small detail with "player_x(pl).book_cash(-2000000)", the changes are not displayed with clients but if they look on the server, it is strange.



Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4252
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Simutrans closes in server mode
« Reply #15 on: September 11, 2016, 12:56:07 PM »
The crash should be prevented with r7867, where the script will issue an error message.
Parsley, sage, rosemary, and maggikraut.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4252
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Simutrans closes in server mode
« Reply #16 on: September 11, 2016, 04:03:53 PM »
Now there is a small detail with "player_x(pl).book_cash(-2000000)", the changes are not displayed with clients but if they look on the server, it is strange.
As of r7868 this command should work in network mode, too. It was not a bug, as the documentation said: warning - not working in network mode ;)
Parsley, sage, rosemary, and maggikraut.

Offline jameskuyper

Re: Simutrans closes in server mode
« Reply #17 on: September 11, 2016, 09:30:57 PM »
Edit: you should not call remove_obj (or any map-modifying tool) in call is_work_allowed.

I've no objection to that restriction, but I would not have guessed it from the documentation I've read so far. Are there any other similar restrictions we should keep in mind? Could the documentation be upgraded to mention these restrictions?

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4252
  • Total likes: 177
  • Helpful: 149
  • Languages: EN, DE, AT
Re: Simutrans closes in server mode
« Reply #18 on: September 12, 2016, 06:23:18 AM »
I did not know this before as well ;) The documentation is up-to-date, check the `Modules' section

http://dwachs.github.io/simutrans-sqapi-doc/modules.html
Parsley, sage, rosemary, and maggikraut.