Editor crashes on play after compiling

Hello,

I am currently having an issue where I am working on a pawn class in C++. When I make changes to the class and compile the code through the editor it says that the compile is fine. When I press play after that the editor crashes. The strange thing is that when I restart the project and press play, it works just fine and the changes to the class are there. The error I get when the editor crashes says:

Fatal error!

Unhandled Exception: EXCEPTION_ACCESS_VIOLATION reading address 0x00000268

UE4Editor-OrthoTestFlex-1576.dll!b2World::DestroyParticleSystem() [d:\git\fluidanimations\source\orthotestflex\box2d\dynamics\b2world.cpp:387]
UE4Editor-OrthoTestFlex-1576.dll!AGameplayPawn::BeginDestroy() [d:\git\fluidanimations\source\orthotestflex\gameplaypawn.cpp:42]
UE4Editor-CoreUObject.dll!UObject::ConditionalBeginDestroy() [d:\unrealengine-flex\engine\source\runtime\coreuobject\private\uobject\obj.cpp:659]
UE4Editor-CoreUObject.dll!CollectGarbageInternal() [d:\unrealengine-flex\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1362]
UE4Editor-CoreUObject.dll!CollectGarbage() [d:\unrealengine-flex\engine\source\runtime\coreuobject\private\uobject\garbagecollection.cpp:1400]
UE4Editor-Engine.dll!UGameInstance::InitializePIE() [d:\unrealengine-flex\engine\source\runtime\engine\private\gameinstance.cpp:174]
UE4Editor-UnrealEd.dll!UEditorEngine::CreatePIEGameInstance() [d:\unrealengine-flex\engine\source\editor\unrealed\private\playlevel.cpp:2676]
UE4Editor-UnrealEd.dll!UEditorEngine::PlayInEditor() [d:\unrealengine-flex\engine\source\editor\unrealed\private\playlevel.cpp:2259]
UE4Editor-UnrealEd.dll!UEditorEngine::StartQueuedPlayMapRequest() [d:\unrealengine-flex\engine\source\editor\unrealed\private\playlevel.cpp:1048]
UE4Editor-UnrealEd.dll!UEditorEngine::Tick() [d:\unrealengine-flex\engine\source\editor\unrealed\private\editorengine.cpp:1245]
UE4Editor-UnrealEd.dll!UUnrealEdEngine::Tick() [d:\unrealengine-flex\engine\source\editor\unrealed\private\unrealedengine.cpp:361]
UE4Editor.exe!FEngineLoop::Tick() [d:\unrealengine-flex\engine\source\runtime\launch\private\launchengineloop.cpp:2427]
UE4Editor.exe!GuardedMain() [d:\unrealengine-flex\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor.exe!GuardedMainWrapper() [d:\unrealengine-flex\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor.exe!WinMain() [d:\unrealengine-flex\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]
UE4Editor.exe!__scrt_common_main_seh() [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:264]
KERNEL32.DLL
ntdll.dll
ntdll.dll

I have no idea what could cause this, and when searching for the same error I couldn’t really find anyone with the same issue as me.

Best regards

Hey-

According to the callstack it appears the crash is occurring when trying to destroy a particle system though I don’t recognize the b2World class it is calling from. Since the crash seems to happen on occasion with no solid reproduction, could you provide a copy of your project for me to investigate directly? If you can zip the project you can either attache it to a post here or, for privacy, upload it to google drive / Dropbox and then send me a PM on the forums with a download link. Additionally, can you post the log files from the crash as well for more information.

Cheers

Hi ,

Thank you for your reply. Thanks to it I realised what was the issue. I am currently using Google’s LiquidFun instead of the built in 2D physics engine, and this seems to have messed a bit with the garbage collection and additional stuff in Unreal Engine. I believe I have managed to fix the issue, and I can now compile and run the game without it crashing. If you still want to see the project I could upload it so that you could try to resolve the crashing issue.

Best regards