The problem when running the code

I have the following problem. Somewhere in 50% of cases, the project does not start, instead it freezes indefinitely, CrushReportClientEditor appears in the task manager and nothing else happens. Here is a clipping from the logs along the Saved\Crashes path

[2024.03.28-19.12.37:491][809]LogStats: FPlatformStackWalk::StackWalkAndDump -  1.986 s
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: === Handled ensure: ===
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: 
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: Ensure condition failed: Cast<APawn>(NewUpdatedComponent->GetOwner())  [File:D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\PawnMovementComponent.cpp] [Line: 22] 
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: FloatingPawnMovement must update a component owned by a Pawn
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: Stack: 
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd93012fb2 UnrealEditor-Engine.dll!UPawnMovementComponent::SetUpdatedComponent() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\PawnMovementComponent.cpp:22]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd92ff9843 UnrealEditor-Engine.dll!UMovementComponent::OnRegister() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\MovementComponent.cpp:173]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd92f08e41 UnrealEditor-Engine.dll!UActorComponent::ExecuteRegisterEvents() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\ActorComponent.cpp:1674]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd92f49dc6 UnrealEditor-Engine.dll!UActorComponent::RegisterComponentWithWorld() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\ActorComponent.cpp:1346]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd926fefd0 UnrealEditor-Engine.dll!AActor::IncrementalRegisterComponents() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:5453]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd93696d3f UnrealEditor-Engine.dll!ULevel::IncrementalUpdateComponents() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\Level.cpp:1633]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd949a4042 UnrealEditor-Engine.dll!UWorld::UpdateWorldComponents() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\World.cpp:2611]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd9496fd30 UnrealEditor-Engine.dll!UWorld::InitializeActorsForPlay() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\World.cpp:5105]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd947e8b58 UnrealEditor-Engine.dll!UEngine::LoadMap() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:15208]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd94776520 UnrealEditor-Engine.dll!UEngine::Browse() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:14390]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffd94818a98 UnrealEditor-Engine.dll!UEngine::TickWorldTravel() [D:\build\++UE5\Sync\Engine\Source\Runtime\Engine\Private\UnrealEngine.cpp:14588]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffda5255245 UnrealEditor-UnrealEd.dll!UEditorEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1898]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffda5eaea06 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick() [D:\build\++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:531]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ff73bac8af2 UnrealEditor.exe!FEngineLoop::Tick() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5825]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ff73baed28c UnrealEditor.exe!GuardedMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:188]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ff73baed37a UnrealEditor.exe!GuardedMainWrapper() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:118]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ff73baf0854 UnrealEditor.exe!LaunchWindowsStartup() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:258]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ff73bb06984 UnrealEditor.exe!WinMain() [D:\build\++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:298]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ff73bb09d7a UnrealEditor.exe!__scrt_common_main_seh() [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffe2e06257d KERNEL32.DLL!UnknownFunction []
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: [Callstack] 0x00007ffe2ebcaa58 ntdll.dll!UnknownFunction []
[2024.03.28-19.12.37:491][809]LogOutputDevice: Error: 

P.S. I don’t have any Pawns in the project.

If you are using FloatingPawnMovement then it uses a parameter PawnOwner that is of type APawn

TObjectPtr<class APawn> PawnOwner;

inside of it’s tick function it calls

const AController* Controller = PawnOwner->GetController();

So if you are trying to use this on a base AActor or UObject then sooner or later it will fail the APawn cast of the components owner.

You are using the component wrong. It is supposed to be used with classes that are either pawns or inherit from pawns.

1 Like

if the given Actor is implemented in C++ then you should be able to just change the inheritance in your .h file

#include "GameFramework/Actor.h"
//...
class AMyClass : public AAcotr

// change to
#include "GameFramework/Pawn.h"
//...
class AMyClass : public APawn

re-build and it “should work” especially if you are only going down the inheritance chain.


if this is implemented in blueprints then you will need to “re-parent” the class in the editor if this is happening when you are launching the project randomly, then you will need to “get lucky” to get into the project to do this.
(you might be able to modify the .uasset files directly but I would not advise this as it can have knock-on effects)

open the offending blueprint then go to File >> Reparent Blueprint this should give you a dialog box ‘asking you to confirm, and that it could break some references’;
this is usually only a problem if you are going up the inheritance hierarchy: changing something from a Pawn to an Actor, or changing an Actor to a UObject
Or changing it to something entirely different like changing a MyBulletBlueprint to a MyPlatformBlueprint though I am presuming these are very different classes)
hit the Accept button (which is often the red one) it might take a moment and show you another dialog box that the change was made

1 Like

If you encounter such an error, most likely the answers in this forum will help you.

In my case, the problem was solved by a blunt search of all the project files. The error turned out to have absolutely nothing to do with FloatingPawnMovement, unfortunately logs cannot always help.

What was the error and how did you fix it?
Could you show the changes you made to the code?

the “suggestion” 3DRaven and I mentioned will probably still need to be done, as that issue is extremely likely to lead to a crash, and in the case of the log you provided is still probably the cause, and in most cases the message before the CallStack is the one that “caused” the given crash in question.
The Unreal logs are very verbose for the specific reason that they help the developer catch most of the issues the application does or could have.

If there was some other issue then good that you fixed it, but where one of the big things of this forum is acting as a repository of helpful results to search for people that are having problems (to the point where if you were to Google “Unreal Engine problem running code” this will probably come up as a result), and as someone who has had issues in Unreal and other things in general it is extremely frustrating having the closest issue to my search being “I am having this problem” (that is kind of what I am looking at) … “fixed it myself” and then nothing to elaborate what the problem, or working solution actually was.

As to why the inheritance Will be a problem, if not now then in the future, has to do with the word “Ensure” these are Unreal’s implementation of what some languages call “Try-Catch” these are typically attempting to prevent “common” errors that are possible, but not desired (Type-mismatch, Null_Reference_Exception, Cache-Miss…) but for a few reasons these tests, and fail safes are stripped out for any Packaging that is not Debug
(not all platforms that Unreal supports have the ability to gracefully fail if these errors appear, the user would be presented with a very programmer focused error message which then they may think the program has “broken their system”)

When you go to Packaging only Debug will keep these Ensure tests, and in the case those errors happen it will just crash the application with a system level error.

1 Like