Download

Random crashes

My unreal project get crashed randomly. And each time it is showing the same error and sometimes different, which I’ll be logging below. And when I used visual studio to debug it, it is showing Access violation error and is directing to compiled library codes.

I really don’t understand what could be the possible reason for these crashes. I wonder whether is it because of the garbage collector taking control of the system and collecting my pointer references, but I have used UPROPERTY() above my pointer references so to prevent this…? I really dont have any idea how to solve this memory issue. Please help…!

Crash log:
MachineId:A04B6B4A9F4FC86D86CBA0933018B239
EpicAccountId:5b5661b1bd2d45e5a8157bfdc486f59a

SEGV_MAPERR at 0x3

FGenericPlatformMisc::RaiseException(unsigned int) Address = 0x104694dab (filename not found) [in UE4Editor-Core.dylib]
FOutputDeviceMacError::Serialize(wchar_t const*, ELogVerbosity::Type, FName const&) Address = 0x10484d378 (filename not found) [in UE4Editor-Core.dylib]
FOutputDevice::Logf(wchar_t const*, …) Address = 0x10492ad17 (filename not found) [in UE4Editor-Core.dylib]
FDebug::AssertFailed(char const*, char const*, int, wchar_t const*, …) Address = 0x1048a9b7e (filename not found) [in UE4Editor-Core.dylib]
TFastReferenceCollector<FGCReferenceProcessor, FGCCollector, FGCArrayPool, false>::ProcessObjectArray(TArray<UObject*, FDefaultAllocator>&, TRefCountPtr<FGraphEvent>&) Address = 0x1053b6eb8 (filename not found) [in UE4Editor-CoreUObject.dylib]
TGraphTask<TFastReferenceCollector<FGCReferenceProcessor, FGCCollector, FGCArrayPool, false>::FCollectorTask>::ExecuteTask(TArray<FBaseGraphTask*, FDefaultAllocator>&, ENamedThreads::Type) Address = 0x1053d12f9 (filename not found) [in UE4Editor-CoreUObject.dylib]
FTaskThreadAnyThread::ProcessTasks() Address = 0x1046b5ca1 (filename not found) [in UE4Editor-Core.dylib]
FTaskThreadAnyThread::ProcessTasksUntilQuit(int) Address = 0x1046b4bbd (filename not found) [in UE4Editor-Core.dylib]
FTaskThreadBase::Run() Address = 0x1046b49bb (filename not found) [in UE4Editor-Core.dylib]
FRunnableThreadPThread::Run() Address = 0x10470c8a3 (filename not found) [in UE4Editor-Core.dylib]
FRunnableThreadPThread::_ThreadProc(void*) Address = 0x1046d12f1 (filename not found) [in UE4Editor-Core.dylib]
_pthread_body Address = 0x7fffd5859aab (filename not found) [in libsystem_pthread.dylib]
_pthread_body Address = 0x7fffd58599f7 (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7fffd5859221 (filename not found) [in libsystem_pthread.dylib]

Guys I have figured it out myself. The reason why this issue happened is because, the content inside widget were dynamically loaded based on a server response. And this response contained nodes with a valid key name but null value. And we were parsing and assigning it to the widgets without checking it.

i.e., JSData={“username”:“test”,“message”:null};

We were parsing data using GetStringField or GetArrayField, etc which will forcefully parse the data but to solve this unreal provides functions like TryGetStringField, TryGetArrayField, etc.

Also it is essential to use this UPROPERTY() above all pointer references.