Page MenuHomeFeedback Tracker

BIS_fnc_codePerformance - dialogue can become unreponsive if called during heavy script load
Assigned, WishlistPublic

Description

If the user calls BIS_fnc_codePerformance while the script engine is heavily loaded, the game can become unresponsive. The BIS_fnc_codePerformance dialogue opens and returns a result as expected and the game keeps running, but the dialogue can not be closed. When external script load ends, the dialogue becomes responsive (which can be up to several minutes)

The only input that works seems to be the Shift numpad cheats (although they can not end the mission) and alt+F4. {F22308}

Details

Legacy ID
3426565520
Severity
None
Resolution
Fixed
Reproducibility
Sometimes
Category
Scripting
Steps To Reproduce
  1. Unzip and load the attached demo mission "14963_unresponsive_dialogues.Stratis.zip" in the mission editor.
  2. Preview mission.
  3. Activate radio alpha trigger to start sqf load. Load will take about 15 seconds to complete, depending on FPS (createScriptLoad.sqf can be modified to increase/decrease the number of loops if required).
  4. During the script load, activate radio bravo trigger. BIS_fnc_codePerformance dialogue opens.
  5. Attempt to close dialogue by clicking OK, and or pressing escape. Notice nothing happens.
  6. Wait until the script load completes, then observe dialogue disappear.

This issue seems to affect other dialogues:

  1. Activate radio alpha trigger to start sqf load.
  2. Press escape to open pause menu.
  3. Click "Functions" button. Notice nothing happens.
  4. Wait until the script load completes, then observe functions viewer dialogue open.

Event Timeline

ceeeb edited Steps To Reproduce. (Show Details)Sep 27 2013, 5:08 AM
ceeeb edited Additional Information. (Show Details)
ceeeb set Category to Scripting.
ceeeb set Reproducibility to Sometimes.
ceeeb set Severity to None.
ceeeb set Resolution to Fixed.
ceeeb set Legacy ID to 3426565520.May 7 2016, 4:56 PM
ceeeb added a comment.Sep 27 2013, 5:57 AM

Seems to be caused by a high CPU load terrain metadata script which is running in parallel, but is unrelated to the BIS_fnc_codePerformance call. I can only guess the scripts are somehow sharing a local variable or the script engine is overloaded.

I will try to create a repro mision using a dummy script.

ceeeb added a comment.Apr 26 2015, 5:28 AM

This issue persists in dev build 1.43.103502

"Performance Test Result" dialogue opens, but cannot be closed. The only way to exit this state is wait until the external script load completes, or to force close Arma (alt+F4).

I think they should add an idiot proof feature. The first 1-10 times it runs through the code, if it notices it takes a long time it should not proceed or warn the user about proceeding to 1000 cycles. It could approximate how long the code takes in those 1-10 cycles and how long it would take to run the 1000 cycles.

Also, I see in the last 1-2 years you haven't managed to get that repro mission/video...

The function now quits early if the code is too heavy when used both from the speedometer button and as direct call to BIS_fnc_codePerformance. Going to resolve this unless someone has objection.

ceeeb added a comment.May 19 2015, 2:52 PM

The issue was caused by script load external to BIS_fnc_codePerformance, ie other scripts that happen to be running when BIS_fnc_codePerformance is called. The actual code being tested by BIS_fnc_codePerformance can be trivial (eg: random 1).

I will investigate if it is still an issue again...

Please re-open this issue and remove fixed status. Issue persists in Arma 1.44.130654. The BIS_fnc_codePerformance call completes and the result dialogue displays, but it is impossible to close the dialogue until the external script load completes.

The script load in my test mission is a large looping script execVM'd inside init.sqf. I will try to create a new test mission with a less exotic load script, then retest.

ceeeb added a comment.May 20 2015, 1:12 PM

Added a repro mission + steps.
This issue seems to also affect some of the buttons on the pause menu dialogue.

No change in dev build 1.63.137921