Editor crash on Play If Blueprint is not recompiled every launch

Hello,

We are having an issue where one of our NPC’s are causing a crash. After some debugging we realised every time that we opened up the project, if we did not open up the Blueprint of the NPC and recompile it without changing anything, the editor would crash with the following error:

*> MachineId:C879FE7244FF690B3E59F79A254CE0CD

EpicAccountId:836dbd1febcb45009669ac7dd7a4f948

Unknown exception - code 00000001
(first/second chance not available)

Assertion failed: ((UObject*)ContainerPtr)->IsA((UClass*)GetOuter() [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.7\Engine\Source\Runtime\CoreUObject\Public\UObject\UnrealType.h] [Line: 357] ‘3rdSpiderPawn_44’ is of class '3rdSpiderPa

KERNELBASE + 37901 bytes
UE4Editor_Core!FOutputDeviceWindowsError::Serialize()

  • 292 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:95]
    UE4Editor_Core!FOutputDevice::Logf__VA()
  • 248 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:144]
    UE4Editor_Core!FDebug::AssertFailed()
  • 1079 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\misc\outputdevice.cpp:224]
    UE4Editor_CoreUObject!UObject::execInstanceVariable()
  • 488 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:975]
    UE4Editor_Engine!UKismetMathLibrary::execLessEqual_IntInt()
  • 51 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\classes\kismet\kismetmathlibrary.h:61]
    UE4Editor_CoreUObject!UFunction::Invoke()
  • 180 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\class.cpp:3684]
    UE4Editor_CoreUObject!UObject::CallFunction()
  • 1112 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:395]
    UE4Editor_CoreUObject!UObject::ProcessContextOpcode()
  • 141 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1451]
    UE4Editor_CoreUObject!UObject::execLetBool()
  • 334 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1370]
    UE4Editor_CoreUObject!UObject::ProcessInternal()
  • 1644 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:602]
    UE4Editor_CoreUObject!UObject::CallFunction()
  • 2707 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:516]
    UE4Editor_CoreUObject!UObject::ProcessInternal()
  • 1644 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:602]
    UE4Editor_CoreUObject!UFunction::Invoke()
  • 180 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\class.cpp:3684]
    UE4Editor_CoreUObject!UObject::ProcessEvent()
  • 3036 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:924]
    UE4Editor_Engine!AActor::ProcessEvent()
  • 259 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actor.cpp:529]
    UE4Editor_Engine!AActor::ReceiveTick()
  • 74 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\intermediate\build\win64\inc\engine\engine.generated.1.cpp:1121]
    UE4Editor_Engine!AActor::Tick() + 121
    bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actor.cpp:672]
    UE4Editor_Engine!APawn::Tick() + 14
    bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\pawn.cpp:712]
    UE4Editor_Engine!AActor::TickActor() +
    78 bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actor.cpp:660]
    UE4Editor_Engine!FActorTickFunction::ExecuteTick()
  • 580 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\actor.cpp:119]
    UE4Editor_Engine!FTickTaskSequencer::FTickFunctionTask::DoTask()
  • 214 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\ticktaskmanager.cpp:322]
    UE4Editor_Engine!TGraphTask::ExecuteTask()
  • 445 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\async\taskgraphinterfaces.h:671]
    UE4Editor_Core!FTaskThread::ProcessTasks()
  • 3125 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\async\taskgraph.cpp:428]
    UE4Editor_Core!FTaskThread::ProcessTasksUntilQuit()
  • 77 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\async\taskgraph.cpp:271]
    UE4Editor_Core!FTaskGraphImplementation::WaitUntilTasksComplete()
  • 511 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\private\async\taskgraph.cpp:984]
    UE4Editor_Engine!FTaskGraphInterface::WaitUntilTaskCompletes()
  • 367 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\core\public\async\taskgraphinterfaces.h:188]
    UE4Editor_Engine!FTickTaskSequencer::ReleaseTickGroup()
  • 432 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\ticktaskmanager.cpp:187]
    UE4Editor_Engine!FTickTaskManager::RunTickGroup()
  • 1182 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\ticktaskmanager.cpp:722]
    UE4Editor_Engine!UWorld::RunTickGroup()
  • 102 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\leveltick.cpp:696]
    UE4Editor_Engine!UWorld::Tick() + 2971
    bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\engine\private\leveltick.cpp:1114]
    UE4Editor_UnrealEd!UEditorEngine::Tick()
  • 5618 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\editor.cpp:1329]
    UE4Editor_UnrealEd!UUnrealEdEngine::Tick()
  • 22 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\editor\unrealed\private\unrealedengine.cpp:347]
    UE4Editor!FEngineLoop::Tick() + 4179
    bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launchengineloop.cpp:2257]
    UE4Editor!GuardedMain() + 1404 bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\launch.cpp:142]
    UE4Editor!GuardedMainWrapper() + 26
    bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
    UE4Editor!WinMain() + 249 bytes
    [d:\buildfarm\buildmachine_++depot+ue4-releases+4.7\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
    UE4Editor!__tmainCRTStartup() + 329
    bytes
    [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]*

We take it this is a problem with the order in which the instances of our NPC’s are created but we are unsure on why and how to fix it.

Can you post your crash log here? You can find this at \Unreal Projects\PROJECTNAME\saved\logs.

link text

Update on the issue: We thought we had fixed it. We just re-parented it to character and then back to base enemy and it ran fine. But when we tried to access the health variable in ‘Event Tick’ for the base enemy we got the crash again. It says "Variable not in scope’ but it is a local variable. Re-compiling the blueprint still fixes it, but we have to do it every time we open the project.

Can you show me a screenshot of your blueprint, specifically 3rdSpiderPawn. It seems the Spider pawn is trying to access a property that belongs to BaseEnemy, but Spiderpawn is not registering as a child of BaseEnemy. If I can see what is going on with the health variable I might get a better idea of what is occurring.

There is alot of information in 3rdSpiderPawn, do you want anything specifically or just the entire blueprint?

For now, lets stick with what information is accessing the BaseEnemy variable, if I can’t see what is going on from there we can see what else is needed.

Hi ,

We have not heard from you in several days. I am marking this thread as answered for tracking purposes. If you are still experiencing this error, please comment with the requested information.

Sorry i havnt been at the office in a few days. Here is a SS of where we are using the varialble. Its in ‘Event Tick’.

If you open the “Class Settings” on your spider, what is the “Parent Class” set to?

Base Enemy. Also we have fixed the issue by just putting all the things to do with health in the base enemy class.

If you are still able to help us determine why it was crashing it would be nice, for curiosity’s sake. If not that is fine :slight_smile:

In your BaseEnemy class, is the Health variable set to editable?

Yep it is.

What event dispatchers are you using? I just noticed that you have two dropdown menus for them in your pawn. Do any of these affect the health variable?

I dont have the project on me but from memory neither are using the health variable.

Do you have a copy of the project that is still crashing? I’d be happy to take a look and see what is occurring so we can get a bug report in for the crash. This could help other users who may be experiencing the same type of crash.

Yes i do, how would you like it?

If small enough you can post a . here, if not you can upload it to a trusted FTP server and send me a link either here or in a PM on the forums.

I just private messaged you on the forums with the link.

Hi ,

While I was able to reproduce the crash, I could not discover the cause. I have entered a bug report, UE-13859 to be assessed by the development staff. I noticed that in almost all of your blueprints that I looked at you had objects casting to themselves. For instance, 3rdSpiderPawn casts to 3rdSpiderPawn several times. This is unnecessary and can cause errors other than the crash you are experiencing. I tested without these casts and it seems that the functionality you had worked without the casts, so I highly recommend removing them.