Page MenuHomeFeedback Tracker

test_EmptyObjectForBubbles - Suspending not allowed in this context
Confirmed Internally, NormalPublic

Description

When you try to create this vehicle you start getting a lot errors in client RPT and the game get stuck for a while.

Details

Severity
Block
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Operating System Version
Latest to until the date
Category
General
Steps To Reproduce

Run the next code in the debug console:

[] spawn {
    "test_EmptyObjectForBubbles" createVehicle [0,0,0];
};
Additional Information

Error thrown:

Suspending not allowed in this context
Error in expression <1s;
_object setVariable ["effects",[]];
sleep (4 + random 20);
};>
Error position: <sleep (4 + random 20);
};>
Error Generic error in expression

Event Timeline

Yeiij created this task.Sep 23 2018, 9:31 AM
Wulf changed the task status from New to Confirmed Internally.Sep 24 2018, 4:27 PM
Wulf added a subscriber: Wulf.

Hello.

Thank you for the report. We will have a look at it.

JiriWainar added a subscriber: JiriWainar.EditedSep 24 2018, 4:59 PM

Hi, the issue is in the test object itself. Code that throws the error comes from init event handler which doesn't allow code suspension and the code is called, so it doesn't changes and still doesn't allow code suspension.

init = "(_this select 0) call compile preprocessFile ""\A3\weapons_f\data\scripts\bubbles.sqf"";";

The test code doesn't need to be in spawn, it doesn't effect anything. You need to change either the init code itself to:

init = "(_this select 0) spawn compile preprocessFile ""\A3\weapons_f\data\scripts\bubbles.sqf"";";

... or wrap the code inside bubbles.sqf into spawn.

And one last thing, it is not advisable to create anything on [0,0,0] coords.

dedmen added a subscriber: dedmen.EditedSep 27 2018, 9:29 AM

"spawn compile preprocessFile"
is the same as execVM.

Should be fixed on latest dev-branch update https://forums.bohemia.net/forums/topic/140837-development-branch-changelog/?page=54&tab=comments#comment-3316350