Page MenuHomeFeedback Tracker

callExtension freezes game until .dll fully exit
Closed, ResolvedPublic

Description

And it doesn't matter if it is executed directly or inside spawn {} construct and if the data returned immediately or at the end.

This video shows what happens if extension "test" is spawn called. All extension does is it delays dll thread completion for 5 seconds.

http://www.youtube.com/watch?v=tUi747pPyZ4 {F19838}

Details

Legacy ID
2302395248
Severity
None
Resolution
Not A Bug
Reproducibility
Always
Category
Scripting
Steps To Reproduce

How to reproduce.

download extension test.dll (attached)

This is the insides of test.cpp:

#include "stdafx.h"

extern "C"
{
declspec (dllexport) void stdcall RVExtension(char *output, int outputSize, const char *function);
}

void __stdcall RVExtension(char *output, int outputSize, const char *function)
{
immediate return
strncpy_s(output, outputSize, "ok", _TRUNCATE);
sleep for 5 sec
Sleep (5000);
}

Place it in Arma 3 root directory
Open up the Editor
Place a unit on the map and hit preview
Press Esc and copy paste this code into debug console

_null = [] spawn {
sleep 2;
hint "BEFORE";
sleep 0.1;
"test" callExtension "whatever";
hint "AFTER";
};

Execute
Now move around. In 2 seconds the extension will be called from inside spawned code (which supposed to start a parallel process) and the game will freeze for 5 seconds.

Event Timeline

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to Scripting.
Killzone_Kid set Reproducibility to Always.
Killzone_Kid set Severity to None.
Killzone_Kid set Resolution to Not A Bug.
Killzone_Kid set Legacy ID to 2302395248.May 7 2016, 2:32 PM
Killzone_Kid added a subscriber: Killzone_Kid.

Thanks MadDogX for closing the other thread, it failed to upload bear .dll in the other thread, didn't realise it actually submitted the thread.

This ticket can be closed now. It appears that callExtension executes blocking calls just like call command so this behaviour should be expected.

Closing on request.