Page MenuHomeFeedback Tracker

finishMissionInit (and/or endLoadingScreen) not reliable
New, WishlistPublic

Description

Using finishMissionInit and startLoadingScreen, the initialization script is not supposed to go on and start the mission, until endLoadingScreen (or the end of the script) is reached. Yet - at some point, the mission prematurely starts while the initialization script is still running! It doesn't take too much imagination to see that this could lead to all sorts of unforseen problems with heavy initialization scripts.

If this (timeout?) is actually a feature, we need a way to make sure the initialization script can indeed take all the time it needs to, no matter what (IMHO: finishMissionInit should be enough and seems to be currently broken/unreliable at best). {F25978}

Details

Legacy ID
1750578699
Severity
None
Resolution
Open
Reproducibility
Always
Category
Scripting
Steps To Reproduce

Given and init.sqf (or initIntro.sqf) with the following structure:

 
	finishMissionInit;
	startLoadingScreen ["..."];

	// code that takes a while...

	endLoadingScreen;

...then the mission will start anyways, given that code takes long enough. With an init.sqf and previewing the mission from the editor, you're simply dropped into the game at some point. Using initIntro.sqf, you're prematurely dropped to the map-screen in a similar fashion.

Attached is a simple sort-algorithm benchmark, programmed to test implementations of two shell- and a heap-sort, up to lists with 15000 elements. On my system the mission starts (prematurely) after the lists with 8000 elements have been sorted (step size is 1000). The mission then starts, while the lists are still being sorted; note/observe the diag_log output (i.e. the initialization script is still running).

Additional Information
  • Don't mind the sorting stuff, but some *heavy* initialization script is needed to reproduce this bug.
  • Devel. Branch, Version 1.43.130192.

Event Timeline

ruebe edited Steps To Reproduce. (Show Details)Apr 7 2015, 8:44 PM
ruebe edited Additional Information. (Show Details)
ruebe set Category to Scripting.
ruebe set Reproducibility to Always.
ruebe set Severity to None.
ruebe set Resolution to Open.
ruebe set Legacy ID to 1750578699.May 8 2016, 11:51 AM