Hello! I am getting a strange freeing-memory exception for a function takes TSharedPtr<FJsonValue> provided by converting a JSON file using Unreal’s FJson- libraries. I don’t do any direct memory manipulation, just using the provided TSharedPtr and setting a Blueprint’s FProperty* to the TSharedPtr<>'s value. Here is the exception:
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000086df800070
0x00007ffbc8d52f7b UnrealEditor-Core.dll!mi_free() [D:\build\++UE5\Sync\Engine\Source\ThirdParty\mimalloc\src\alloc.c:486]
0x00007ffbc879a5cc UnrealEditor-Core.dll!FMemory::Free() [D:\build\++UE5\Sync\Engine\Source\Runtime\Core\Public\HAL\FMemory.inl:80]
0x00007ffc4a8e0598 UnrealEditor-Json.dll!FJsonValue::`vector deleting destructor'() []
0x00007ffb977c3703 UnrealEditor-UianaCPP.dll!UUianaImporter::SetBPSettings() [...\CustomJsonImporter.cpp:1393]
Why is it calling “vector deleting destructor” although I am using a FJsonValue of type EJson::Number and setting a float value to the FProperty*?
I am thinking that this might not even be the fault of the function I have, since it is used several times without issues setting FProperty* for other components such as static meshes - it only throws this exception for UActorComponent representing a Blueprint.