Page MenuHomeFeedback Tracker

Initialisation process of BIS Module Framework broken on clients in MP
Reviewed, WishlistPublic

Description

There have been changes to the initialsation process of the BIS Module Framework. Now it seems to be broken on clients in MP since latest stable release - at least it can be called more than only "unstable". The issues below affect clients, that are connected at the start of a MP session to a dedicated server and JIP clients!

It is working correctly on the dedicated server itself, on MP host, SP and editor! The outcomes are severe though.

There are actually 2 visible initialisation issues:

  1. Init order is not matching the functionPriority value defined in cfgVehicles!

It is kept on dedicated server, host, SP and editor correctly - likely to some isServer somewhere - havent tested HC but its very likely affected too, as its a client. Setting isGlobal to 1 or 2 didnt make any difference.

  1. If the init is taking "longer" than an (undefined ?) period of time, modules start to initialise twice (!!) on the clients (again, not on server - only on clients in MP environment). somewhere in the middle, long after preInit "Attempt to override final function - bis_fnc_preload_server" pops up in clientside RPT (funnily not the server RPT, havent checked what the function does but may be related).

Impact:
Ad. 1. will lead to race conditions and other weird issues, as the order is completely random.
Ad. 2. leads to duplicated UIs, buttons, menu items, code running twice etc. on the client. Simply there are several instances running then, which may in some cases be intended but not in all, and its again purley random - depending on the init time, i think it becomes visible between 20-30 seconds.
There is no (simple) Workaround for these 2 problems.

Details

Legacy ID
1424635478
Severity
None
Resolution
Open
Reproducibility
Always
Category
Multiplayer
Steps To Reproduce

Replication:
Its taking me too long to build custom addons for you, but you should be able to replicate with your own modules.

The issue described is best visible on a freshly started local dedicated server

Ensure you have several modules with different functionPriority values in your mission.sqm.
Ensure some modules run clientside (isGlobal 1/2) and serverside.
Ensure init takes longer than 25-30 seconds overall
Startup local dedi instance, connect a local client to it
Login as admin and and start your mission (ofc. with several different modules based upon BIS module framework in it).

Additional Information

Outcome examples, from our ALiVE modules (i only used a few of them, to not spam RPT):


This is how an init looks like in clientside RPT, on a freshly started mission on a freshly started dedicated server.
Modules start to initialised twice after init hasnt been finished after 27 seconds as described in point 2.
Modules have random init order, not matching the functionPriority value as described in point 1.
Also watch the Attempt to overwrite BIS_fnc_preLoadServer message.
f.e. "ALiVE [m_0|4] Module ALiVE_mil_placement INIT" --> the number 4 is the functionpriority value read from the modules config.

[207970,3548.37,0,"XEH: PreInit Started. v1.0.5.208. MISSINIT: missionName=TUPLICATION_REPRO, worldName=Altis, isMultiplayer=true, isServer=false, isDedicated=false"]
"No params given for ALIVE_fnc_BUS - exiting..."
[207970,3548.84,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_cache_disable.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
[207971,3549.08,0,"XEH: PostInit Started"]
[207971,3549.1,0,"CBA_VERSIONING: cba=1.0.5.208, alive_main=0.0.0.0, "]
[207971,3549.11,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=true, _isServer=false, _isDedServer=false, _playerCheckDone=true, _sp=false, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=2, _sessionId=12, _level=0, _timeOut=false, _game=3, BIS_functions=L Alpha 1-1:1 REMOTE, group=L Alpha 1-1, player=B Alpha 1-1:1 (Sepp), _playerType="B_Soldier_F", _playerGroup=B Alpha 1-1"]
[207971,3549.11,0,"CBA_VERSIONING_SERVER: cba=1.0.5.208, alive_main=0.0.0.0, "]



_______ _____   __ ___ ___ _______

__ | _ | |_|| | | _| __
__ | | | | | | ___| __
__ |___|___|_______||\___/|_______| __



ALiVE Global INIT
ALiVE Global Init Timer Started
ALiVE [m_0|4] Module ALiVE_mil_placement INIT
ALiVE [m_0|4] Module ALiVE_mil_placement INIT COMPLETE TIME: 0.00195313
ALiVE [m_1|19] Module ALiVE_sys_adminactions INIT
ALiVE [m_2|26] Module ALiVE_sys_viewdistance INIT
ALiVE [m_3|1] Module ALiVE_sys_data INIT
"FlexiMenu ADD: ALiVE_ui_display"
ALiVE [m_3|1] Module ALiVE_sys_data INIT COMPLETE TIME: 0.000976563
ALiVE [m_4|2] Module ALiVE_sys_profile INIT
ALiVE [m_4|2] Module ALiVE_sys_profile INIT COMPLETE TIME: 0
ALiVE [m_5|4] Module ALiVE_mil_placement INIT
ALiVE [m_5|4] Module ALiVE_mil_placement INIT COMPLETE TIME: 0.000976563
"FlexiMenu ADD: ALiVE_ui_display"
ALiVE [m_1|19] Module ALiVE_sys_adminactions INIT COMPLETE TIME: 27.8391
"FlexiMenu ADD: ALiVE_ui_display"
ALiVE [m_2|26] Module ALiVE_sys_viewdistance INIT COMPLETE TIME: 27.8391
ALiVE [m_6|26] Module ALiVE_sys_viewdistance INIT
"FlexiMenu ADD: ALiVE_ui_display"
ALiVE [m_6|26] Module ALiVE_sys_viewdistance INIT COMPLETE TIME: 0.000976563
Attempt to override final function - bis_fnc_preload_server
ALiVE [m_7|19] Module ALiVE_sys_adminactions INIT
"FlexiMenu ADD: ALiVE_ui_display"

ALiVE [m_7|19] Module ALiVE_sys_adminactions INIT COMPLETE TIME: 0.000976563


This is how it looks like in clientside RPT, on mission restart, on the same dedi - but server is not restarted inbetween.
Init is now much quicker (probably because much data is in RAM already), and its finishing within some seconds.
All modules are initialised only once on the client, though the order is again random as described in 1.
No preloadServer message in this one.

[231430,4067.04,0,"XEH: PreInit Started. v1.0.5.208. MISSINIT: missionName=TUPLICATION_REPRO, worldName=Altis, isMultiplayer=true, isServer=false, isDedicated=false"]
"No params given for ALIVE_fnc_BUS - exiting..."
[231430,4067.13,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_cache_disable.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
[231431,4067.36,0,"XEH: PostInit Started"]
[231431,4067.38,0,"CBA_VERSIONING: cba=1.0.5.208, alive_main=0.0.0.0, "]
[231431,4067.39,0,"XEH: PostInit Finished. State: _isClient=true, _isJip=false, _isDedClient=true, _isServer=false, _isDedServer=false, _playerCheckDone=true, _sp=false, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=2, _sessionId=13, _level=0, _timeOut=false, _game=3, BIS_functions=L Alpha 1-1:1 REMOTE, group=L Alpha 1-1, player=B Alpha 1-1:1 (Sepp), _playerType="B_Soldier_F", _playerGroup=B Alpha 1-1"]
[231431,4067.39,0,"CBA_VERSIONING_SERVER: cba=1.0.5.208, alive_main=0.0.0.0, "]



_______ _____   __ ___ ___ _______

__ | _ | |_|| | | _| __
__ | | | | | | ___| __
__ |___|___|_______||\___/|_______| __



ALiVE Global INIT
ALiVE Global Init Timer Started
ALiVE [m_0|2] Module ALiVE_sys_profile INIT
ALiVE [m_0|2] Module ALiVE_sys_profile INIT COMPLETE TIME: 0
ALiVE [m_1|4] Module ALiVE_mil_placement INIT
ALiVE [m_1|4] Module ALiVE_mil_placement INIT COMPLETE TIME: 0.00195313
ALiVE [m_2|19] Module ALiVE_sys_adminactions INIT
"FlexiMenu ADD: ALiVE_ui_display"
ALiVE [m_2|19] Module ALiVE_sys_adminactions INIT COMPLETE TIME: 0
ALiVE [m_3|26] Module ALiVE_sys_viewdistance INIT
"FlexiMenu ADD: ALiVE_ui_display"
ALiVE [m_3|26] Module ALiVE_sys_viewdistance INIT COMPLETE TIME: 0
ALiVE [m_4|1] Module ALiVE_sys_data INIT
"FlexiMenu ADD: ALiVE_ui_display"
ALiVE [m_4|1] Module ALiVE_sys_data INIT COMPLETE TIME: 0.000976563

Event Timeline

highhead edited Steps To Reproduce. (Show Details)Mar 17 2014, 8:03 PM
highhead edited Additional Information. (Show Details)
highhead set Category to Multiplayer.
highhead set Reproducibility to Always.
highhead set Severity to None.
highhead set Resolution to Open.
highhead set Legacy ID to 1424635478.May 7 2016, 6:12 PM