The call to SaveStringToFile
in HUD BeginPlay event is causing immediate crash in Linux. The file doesn’t exist at the time of call and I verified that there are no perm issues (writing to home directory anyway).
Code
FFileHelper::SaveStringToFile(json_fstring, * settings_filename);
Callstack
This from .log file in Saved/Crashes folder:
[Callstack] 00 0x00007ff28f30cf7f FLinuxPlatformStackWalk::CaptureStackBackTrace(unsigned long long*, unsigned int, void*)
[Callstack] 01 0x00007ff28f1f5f65 FGenericPlatformStackWalk::StackWalkAndDump(char*, unsigned long, int, void*)
[Callstack] 02 0x00007ff28f2ce361 FLinuxCrashContext::CaptureStackTrace()
[Callstack] 03 0x00007ff28550b1c0 CommonLinuxCrashHandler(FGenericCrashContext const&)
[Callstack] 04 0x00007ff28f2d24da PlatformCrashHandler(int, siginfo_t*, void*)
[Callstack] 05 0x00007ff294fcb390 /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7ff294fcb390]
[Callstack] 06 0x00007ff2848c7428 /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7ff2848c7428]
[Callstack] 07 0x00007ff2848c902a /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7ff2848c902a]
[Callstack] 08 0x00007ff2849097ea /lib/x86_64-linux-gnu/libc.so.6(+0x777ea) [0x7ff2849097ea]
[Callstack] 09 0x00007ff28491237a /lib/x86_64-linux-gnu/libc.so.6(+0x8037a) [0x7ff28491237a]
[Callstack] 10 0x00007ff28491653c /lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c) [0x7ff28491653c]
[Callstack] 11 0x00007ff21a30c219 ASimHUD::initializeSettings()
[Callstack] 12 0x00007ff21a30b56c ASimHUD::BeginPlay()
[Callstack] 13 0x00007ff28b2cad1c AActor::DispatchBeginPlay()
[Callstack] 14 0x00007ff28c381e47 AWorldSettings::NotifyBeginPlay()
[Callstack] 15 0x00007ff28b95426c AGameStateBase::HandleBeginPlay()
[Callstack] 16 0x00007ff28c36f879 UWorld::BeginPlay()