LordKay32 / Allied_Liberation.Altis

0 stars 0 forks source link

Game sometimes doesn't finish loading initserver.sqf file #6

Open LordKay32 opened 1 year ago

LordKay32 commented 1 year ago

Isolated down to line 75 of fn_initserver.sqf - "call A3A_fnc_initFuncs". Unsure why code in this file fails to progress on occasion.

MarkBennett12 commented 1 year ago

Ran the mission a couple of times. The first time it didn't finish loading and the screen was dark. I had to restart the game. I think this was what we saw before too. The second time it started OK. I put some diag_log calls just before and after the call to fn_initFuncs and the output looked like this:

19:29:29 "before call A3A_fnc_initFuncs" 19:29:29 2023-09-04 18:29:29:971 | Antistasi | Info | File: initFuncs.sqf | initFuncs started 19:29:30 2023-09-04 18:29:30:150 | Antistasi | Info | File: initClient.sqf | initClient started 19:29:30 2023-09-04 18:29:30:151 | Antistasi | Info | File: initClient.sqf | Discord Rich Presence: false 19:29:30 "Gaming/BIS_fnc_log: [BIS_fnc_preload] ----- Scripts initialized at 161935 ms -----" 19:29:30 "Gaming/BIS_fnc_log: [BIS_fnc_selectRespawnTemplate] onPlayerRespawn template 'Counter' executed from function 'BIS_fnc_respawnCounter'" 19:29:30 "Gaming/log: ERROR: [BIS_fnc_activateAddons] The function can be activated only during the mission init." 19:29:31 "Gaming/log: ERROR: [BIS_fnc_activateAddons] The function can be activated only during the mission init."

It ends there and the "after call A3A_fnc_initFuncs" was never reached. When it loaded successfully the second time "after call A3A_fnc_initFuncs" was printed showing it had finished the call to fn_initFuncs. The log file output for the second (successful) load:

19:35:41 "****before call A3A_fnc_initFuncs**" 19:35:41 2023-09-04 18:35:41:533 | Antistasi | Info | File: initFuncs.sqf | initFuncs started 19:35:41 2023-09-04 18:35:41:615 | Antistasi | Info | File: initClient.sqf | initClient started 19:35:41 2023-09-04 18:35:41:615 | Antistasi | Info | File: initClient.sqf | Discord Rich Presence: false 19:36:08 2023-09-04 18:36:08:466 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA init started 19:36:14 2023-09-04 18:36:14:630 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA server detected 19:36:14 2023-09-04 18:36:14:630 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA loading player data 19:36:14 2023-09-04 18:36:14:631 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA init completed 19:36:14 2023-09-04 18:36:14:631 | Antistasi | Info | File: initFuncs.sqf | initFuncs completed 19:36:14 "****after call A3A_fnc_initFuncs****"

Here it shows it completed successfully (the stars are because I couldn't find the output the first time).

The problem happens between 'initClient.sqf | Discord Rich Presence: false' and 'fn_arsenal_init.sqf | JNA init started'.

19:35:41 "****before call A3A_fnc_initFuncs**" 19:35:41 2023-09-04 18:35:41:533 | Antistasi | Info | File: initFuncs.sqf | initFuncs started 19:35:41 2023-09-04 18:35:41:615 | Antistasi | Info | File: initClient.sqf | initClient started 19:35:41 2023-09-04 18:35:41:615 | Antistasi | Info | File: initClient.sqf | Discord Rich Presence: false ????????????????????????????PROBLEM HERE??????????????????????????????????????????????????? 19:36:08 2023-09-04 18:36:08:466 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA init started 19:36:14 2023-09-04 18:36:14:630 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA server detected 19:36:14 2023-09-04 18:36:14:630 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA loading player data 19:36:14 2023-09-04 18:36:14:631 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA init completed 19:36:14 2023-09-04 18:36:14:631 | Antistasi | Info | File: initFuncs.sqf | initFuncs completed 19:36:14 "****after call A3A_fnc_initFuncs****"

MarkBennett12 commented 1 year ago

Locked up again, this time the output was different

21:41:10 2023-09-04 20:41:10:902 | Antistasi | Info | File: fn_initParams | Param setup completed 21:41:10 "===========before call A3A_fnc_initFuncs**" 21:41:10 2023-09-04 20:41:10:903 | Antistasi | Info | File: initFuncs.sqf | initFuncs started 21:41:10 "<<<<<<<<<<<<<<<<<< before UPSMON" 21:41:11 "Gaming/BIS_fnc_log: [BIS_fnc_selectRespawnTemplate] onPlayerRespawn template 'Counter' executed from function 'BIS_fnc_respawnCounter'" 21:41:11 "Gaming/BIS_fnc_log: [BIS_fnc_preload] ----- Scripts initialized at 418725 ms -----" 21:41:26 "Gaming/log: ERROR: [BIS_fnc_activateAddons] The function can be activated only during the mission init."

LordKay32 commented 1 year ago

Hi, thanks for looking into this. Is there a way you can analyse how far through the initClient (the one in the functions/init folder) file the code goes? I note that the black in code on line 11 runs (hence the screen is black on startup), but it seems it doesn't reach line 69 where the code calls for the black out to be removed. Maybe the problem is between these two lines?

Cheers,

Jon

On Tue, 5 Sept 2023 at 07:00, MarkBennett12 @.***> wrote:

Ran the mission a couple of times. The first time it didn't finish loading and the screen was dark. I had to restart the game. I think this was what we saw before too. The second time it started OK. I put some diag_log calls just before and after the call to fn_initFuncs and the output looked like this:

19:29:29 "before call A3A_fnc_initFuncs" 19:29:29 2023-09-04 18:29:29:971 | Antistasi | Info | File: initFuncs.sqf | initFuncs started 19:29:30 2023-09-04 18:29:30:150 | Antistasi | Info | File: initClient.sqf | initClient started 19:29:30 2023-09-04 18:29:30:151 | Antistasi | Info | File: initClient.sqf | Discord Rich Presence: false 19:29:30 "Gaming/BIS_fnc_log: [BIS_fnc_preload] ----- Scripts initialized at 161935 ms -----" 19:29:30 "Gaming/BIS_fnc_log: [BIS_fnc_selectRespawnTemplate] onPlayerRespawn template 'Counter' executed from function 'BIS_fnc_respawnCounter'" 19:29:30 "Gaming/log: ERROR: [BIS_fnc_activateAddons] The function can be activated only during the mission init." 19:29:31 "Gaming/log: ERROR: [BIS_fnc_activateAddons] The function can be activated only during the mission init."

It ends there and the "after call A3A_fnc_initFuncs" was never reached. When it loaded successfully the second time "after call A3A_fnc_initFuncs" was printed showing it had finished the call to fn_initFuncs. The log file output for the second (successful) load:

19:35:41 "*before call A3A_fnc_initFuncs***" 19:35:41 2023-09-04 18:35:41:533 | Antistasi | Info | File: initFuncs.sqf | initFuncs started 19:35:41 2023-09-04 18:35:41:615 | Antistasi | Info | File: initClient.sqf | initClient started 19:35:41 2023-09-04 18:35:41:615 | Antistasi | Info | File: initClient.sqf | Discord Rich Presence: false 19:36:08 2023-09-04 18:36:08:466 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA init started 19:36:14 2023-09-04 18:36:14:630 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA server detected 19:36:14 2023-09-04 18:36:14:630 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA loading player data 19:36:14 2023-09-04 18:36:14:631 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA init completed 19:36:14 2023-09-04 18:36:14:631 | Antistasi | Info | File: initFuncs.sqf | initFuncs completed 19:36:14 "*after call A3A_fnc_initFuncs*****"

Here it shows it completed successfully (the stars are because I couldn't find the output the first time).

The problem happens between 'initClient.sqf | Discord Rich Presence: false' and 'fn_arsenal_init.sqf | JNA init started'. It's possible there's a problem in the arsenal.

19:35:41 "*before call A3A_fnc_initFuncs***" 19:35:41 2023-09-04 18:35:41:533 | Antistasi | Info | File: initFuncs.sqf | initFuncs started 19:35:41 2023-09-04 18:35:41:615 | Antistasi | Info | File: initClient.sqf | initClient started 19:35:41 2023-09-04 18:35:41:615 | Antistasi | Info | File: initClient.sqf | Discord Rich Presence: false ????????????????????????????PROBLEM HERE??????????????????????????????????????????????????? 19:36:08 2023-09-04 18:36:08:466 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA init started 19:36:14 2023-09-04 18:36:14:630 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA server detected 19:36:14 2023-09-04 18:36:14:630 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA loading player data 19:36:14 2023-09-04 18:36:14:631 | Antistasi | Info | File: fn_arsenal_init.sqf | JNA init completed 19:36:14 2023-09-04 18:36:14:631 | Antistasi | Info | File: initFuncs.sqf | initFuncs completed 19:36:14 "*after call A3A_fnc_initFuncs*****"

— Reply to this email directly, view it on GitHub https://github.com/LordKay32/Allied_Liberation.Altis/issues/6#issuecomment-1705624055, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3YJCYWPUZB4LJWTJ4YVLA3XYYQLZANCNFSM6AAAAAA4IA25C4 . You are receiving this because you authored the thread.Message ID: @.***>

MarkBennett12 commented 1 year ago

I've narrowed the problem down to this line of code here. This only breaks when Arma itself has been restarted, all subsequent loads of the mission file succeed. It consistently breaks when the engine is restarted. A next step might be to disable UPS, it seems to be a sqaud AI thing, and see if the issue persists.

MarkBennett12 commented 11 months ago

Further update on this bug. I've narrowed the problem down further to this line of code. As this code is now purely Arma functions this line is the root cause. A nearby line using the same logic but only getting CfgMineTriggers from the config files works fine so there's a problem with CfgVehicles somewhere.

LordKay32 commented 9 months ago

Hi, I've had a look at this. I disabled the code you isolated, it's inconsequential for the scenario. I still got the problem, but suggesting the issue was now further on. What I've found is that given enough time, the scenario will load eventually, either from the intro or once within the scenario (ie the black screen will clear and the scenario loads). Thereafter if you back out to the choosing your role screen, as you said it loads quickly, as long you don't back out from said screen. Something seems to be taking a long time to compile the first time as you said. Will try and isolate where the problem is.

LordKay32 commented 9 months ago

If you try it and leave it running, is there a way to see where the bulk of the time its taking to load is? By the way the code is much upodated, you will need to reupload from github.

LordKay32 commented 9 months ago

Also I can't reproduce the problem with the map script removed, so maybe thats the issue.

LordKay32 commented 9 months ago

Think I may have fixed it. Can you try it at some point, see how it works for you.