UE4Editor crashes after declaring FString in BullCowCartridge.h

I’m using Unreal Engine 4.25. The game compiles and runs normal, but when I add the line “FString HiddenWord;” after “private:”, the game can compile fine, but when I run the game, UE4Editor crashes. The crash only occurs when I added any declaration of FString in that header file. I tried to declare other types like “int VarA” and the game runs normal. I also tried decalring “FString HiddenWord” inside BullCowCartridge.cpp globally and it works fine, declaring it locally inside each functions also works fine.

ps: in my vs code most of the header files have red line beneath it, with messages like:
#include errors detected. Consider updating your compile_commands.json or includePath.”

“cannot open source file “UBT_COMPILED_PLATFORM/UBT_COMPILED_PLATFORMPlatformTime.h” (dependency of “Console/Cartridge.h”)”

pss: the same header file “CoreMinimal.h” has an error message in “BullCowCartridge.h” but is not red lined in “Cartridge.h”.

Here’s the crash report:
LoginId:2018cef6b08e430fa1e415b9cd5ec47d-000003e8
EpicAccountId:

Caught signal

libUE4Editor-Core.so!FMallocBinned2::Free(void*) [/home/serdan/UnrealEngine/Engine/Source/Runtime/Core/Public/HAL/MallocBinned2.h:616]
libUE4Editor-BullCowGame-7866.so!UBullCowCartridge::~UBullCowCartridge() [/home/serdan/Documents/Unreal Projects/BullCowGame-starter-kit/Source/BullCowGame/BullCowCartridge.h:10]
libUE4Editor-CoreUObject.so!FAsyncPurge::TickDestroyObjects(bool, float, double) [/home/serdan/UnrealEngine/Engine/Source/Runtime/CoreUObject/Private/UObject/GarbageCollection.cpp:307]
libUE4Editor-CoreUObject.so!IncrementalPurgeGarbage(bool, float) [/home/serdan/UnrealEngine/Engine/Source/Runtime/CoreUObject/Private/UObject/GarbageCollection.cpp:1418]
libUE4Editor-CoreUObject.so!CollectGarbageInternal(EObjectFlags, bool) [/home/serdan/UnrealEngine/Engine/Source/Runtime/CoreUObject/Private/UObject/GarbageCollection.cpp:1965]
libUE4Editor-CoreUObject.so!CollectGarbage(EObjectFlags, bool) [/home/serdan/UnrealEngine/Engine/Source/Runtime/CoreUObject/Private/UObject/GarbageCollection.cpp:2060]
libUE4Editor-Engine.so!UGameInstance::InitializeForPlayInEditor(int, FGameInstancePIEParameters const&) [/home/serdan/UnrealEngine/Engine/Source/Runtime/Engine/Private/GameInstance.cpp:314]
libUE4Editor-UnrealEd.so!UEditorEngine::CreateInnerProcessPIEGameInstance(FRequestPlaySessionParams&, FGameInstancePIEParameters const&, int) [/home/serdan/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/PlayLevel.cpp:2651]
libUE4Editor-UnrealEd.so!UEditorEngine::OnLoginPIEComplete_Deferred(int, bool, FString, FPieLoginStruct) [/home/serdan/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/PlayLevel.cpp:1471]
libUE4Editor-UnrealEd.so!UEditorEngine::CreateNewPlayInEditorInstance(FRequestPlaySessionParams&, bool, EPlayNetMode) [/home/serdan/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/PlayLevel.cpp:1703]
libUE4Editor-UnrealEd.so!UEditorEngine::StartPlayInEditorSession(FRequestPlaySessionParams&) [/home/serdan/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/PlayLevel.cpp:2575]
libUE4Editor-UnrealEd.so!UEditorEngine::StartQueuedPlaySessionRequestImpl() [/home/serdan/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/PlayLevel.cpp:1076]
libUE4Editor-UnrealEd.so!UEditorEngine::StartQueuedPlaySessionRequest() [/home/serdan/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/PlayLevel.cpp:1012]
libUE4Editor-UnrealEd.so!UEditorEngine::Tick(float, bool) [/home/serdan/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/EditorEngine.cpp:1610]
libUE4Editor-UnrealEd.so!UUnrealEdEngine::Tick(float, bool) [/home/serdan/UnrealEngine/Engine/Source/Editor/UnrealEd/Private/UnrealEdEngine.cpp:411]
UE4Editor!FEngineLoop::Tick() [/home/serdan/UnrealEngine/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp:4844]
UE4Editor!GuardedMain(char16_t const*) [/home/serdan/UnrealEngine/Engine/Source/Runtime/Launch/Private/Launch.cpp:171]
libUE4Editor-UnixCommonStartup.so!CommonUnixMain(int, char**, int ()(char16_t const), void (*)()) [/home/serdan/UnrealEngine/Engine/Source/Runtime/Unix/UnixCommonStartup/Private/UnixCommonStartup.cpp:264]
libc.so.6!__libc_start_main(+0xe6)
UE4Editor!_start()

Thanks for any tips!

Could you try rebuilding by deleting the Binaries and Intermediate folders?

Thanks for the tip, I tried that but still had the same issue. Now I deleted unreal engine 4.25 and installed 4.22, the problem is gone :slight_smile:

1 Like

Privacy & Terms