When using the code below I get a hard crash in game and workbench. It seems to have to do with me passing in the typename directly. If I first save the typename inside DependsOn as a variable and pass that to the next function there is no crash. There also is no crash if I pass it directly but do not have this array parameter behind it. I believe I encountered this with different argument types following the typename. It might be some strange edge case, but I would still like to see it fixed.
sealed class TAG_MyComponentClass : ScriptComponentClass { //------------------------------------------------------------------------------------------------ static override bool DependsOn(string className) { DoSomething(className.ToType(), {Class}); return false; } //------------------------------------------------------------------------------------------------ static void DoSomething(typename type, notnull array<typename> from) { Print(type); } }; class TAG_MyComponent : ScriptComponent { };
Unhandled exception
Program: Z:\SteamLibrary\steamapps\common\Arma Reforger Tools\Workbench\ArmaReforgerWorkbenchSteam.exe
Reason: Access violation. Illegal read by 0x7ff6d6c2ba30 at 0xe8da0cb0Function: 'DoSomething'
Stack trace:
Scripts/Game/MyFile.c:13 Function DoSomething
Scripts/Game/MyFile.c:6 Function DependsOn