Page MenuHomeFeedback Tracker

typename argument edge case crash
Closed, ResolvedPublic

Description

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 0xe8da0cb0

Function: 'DoSomething'
Stack trace:
Scripts/Game/MyFile.c:13 Function DoSomething
Scripts/Game/MyFile.c:6 Function DependsOn

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General

Event Timeline

Arkensor created this task.May 26 2023, 8:05 AM
Geez changed the task status from New to Assigned.May 29 2023, 4:49 PM
Geez closed this task as Resolved.Jun 9 2023, 10:55 AM
Geez claimed this task.
Geez added a subscriber: Geez.

Resolved for one of the future updates.