Page MenuHomeFeedback Tracker

ContainerSerializationSaveContext::WriteValue crash on nested array with weak references
Closed, ResolvedPublic

Description

array<int> intArray = {42, 1337};
Print(intArray);
array<array<int>> intArrayArray = {intArray};
Print(intArrayArray);

ContainerSerializationSaveContext writer();
JsonSaveContainer jsonContainer = new JsonSaveContainer();
jsonContainer.SetMaxDecimalPlaces(5);
writer.SetContainer(jsonContainer);
writer.WriteValue("", intArrayArray);
auto res = jsonContainer.ExportToString();
Print(res);

If I let him write array<array<int>> instead of array<ref array<int>> as you "normally" do it crashes with an access violation. I have my reason why the data array itself does not keep the reference. The inner array is held alive somewhere else to make my API more convenient to use.

Details

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

Event Timeline

Geez changed the task status from New to Assigned.Jul 14 2023, 11:22 AM
Geez closed this task as Resolved.Jul 17 2023, 11:23 AM
Geez claimed this task.
Geez added a subscriber: Geez.

Resolved for one of the future updates.