Page MenuHomeFeedback Tracker

missionConfigFile class saving/loading causes crash
Feedback, NormalPublic

Description

Something goes wrong when saving/loading missionConfigFile classes in array and trying to do + copy

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Scripting
Steps To Reproduce

Step 1) Start the mission and run this code from the console:

_testCfg = missionconfigfile >> "CfgSavingTest" >> "InnerClass";


profilenamespace setVariable ["cfgTestSave",[123,_testCfg]];
saveprofilenamespace;

Step 2) Exit mission to the editor
Step 3) Start the mission again

Finally) Run this code from the console:

_load = (profilenamespace getVariable "cfgTestSave");


_data = +_load; // This line crashes arma
Additional Information

Event Timeline

gc8 created this task.Aug 12 2021, 6:05 PM
gc8 edited Additional Information. (Show Details)
gc8 updated the task description. (Show Details)
gc8 edited Steps To Reproduce. (Show Details)Aug 12 2021, 6:08 PM
gc8 renamed this task from Config class saving/loading to missionConfigFile causes crash to missionConfigFile class saving/loading causes crash.Aug 12 2021, 6:14 PM
gc8 updated the task description. (Show Details)

rev 148073

Also, what you are doing makes no sense, I mean saving mission config in profile namespace, same as saving display for use later. Mission config exists only while mission is running. New mission, new config instance. On top profile namespace is serialized and loaded on game start. way before any mission is started, so mission config saved to profile namespace will give you exactly nothing after you left mission.

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Aug 13 2021, 9:25 PM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
gc8 added a comment.EditedAug 14 2021, 10:53 AM

rev 148073

Also, what you are doing makes no sense, I mean saving mission config in profile namespace, same as saving display for use later. Mission config exists only while mission is running. New mission, new config instance. On top profile namespace is serialized and loaded on game start. way before any mission is started, so mission config saved to profile namespace will give you exactly nothing after you left mission.

Yes this is the understanding which I also had. I faced this problem when making a savegame in the profileNamespace and it crashed on load because of the reference to mission config class (which I wanted to save for further use). So I fixed it by removing the reference. But I decided to still report this because of the crashing.
So it's fixed now?

crash should be fixed, yes, and thanks for reporting