Closing to desktop with no message

When running my compiled build, it starts on the main menu then loads your selected map on a button click. The problem is, perhaps 1 in 4 times at the end of loading it will just close to desktop without any message. It doesn’t matter which map I choose but some make it happen more than others. Reopening and trying again usually makes it work.

With no message I have absolutely no idea how to even begin debugging this. I have already enabled crash reporter tool but it does not trigger. I have checked system loads (cpu, gpu, memory) during loading but none seem to reach any limit. I have checked the log and it seems to just end suddenly with the last line being normal “map loaded in x seconds”. I have checked windows events and nothing useful there.

How do you go about debugging something like this? Thanks!

In your Project Settings search for these two options
Include Debug Files and Include Crash Reporter. I think they are under Packaging section.

Then you will have crash report logs that can help you with your crash.

Crash files location:

Windows: YourGameDirectory/YourGameName/Saved/Logs
Mac OS: Library/Logs/YourGameName/

2 Likes

Thankyou. I think I have found the first clue in one of the crash dumps. It says:

Ensure condition failed: InstanceSceneData.IsValidIndex(RenderInstanceIndex) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\InstancedStaticMesh.cpp] [Line: 1442]

Does anyone have any clue what this might mean?

Ensure is not necessarily a crash. Can you give us full log, so that we can check a bit better?

1 Like

The same message comes up in the crashdumps when the compiled app crashes. I am now able to make it happen in the editor too (but it doesn’t crash it there), the first time I load a map and press play, it comes up with the following in the output log. Any load after that has no errors.

LogNet: Created socket for bind address: 0.0.0.0 on port 0
PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
LogNet: Game client on port 17777, rate 500000
PIE: Client logged in
PIE: Play in editor total start time 0.364 seconds.
LogOutputDevice: Warning: Script Stack (0 frames):
LogStats: FPlatformStackWalk::StackWalkAndDump - 0.612 s
LogOutputDevice: Error: === Handled ensure: ===
LogOutputDevice: Error: Ensure condition failed: InstanceSceneData.IsValidIndex(RenderInstanceIndex) [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\InstancedStaticMesh.cpp] [Line: 1442]
LogOutputDevice: Error: Stack:
LogOutputDevice: Error: [Callstack] 0x00007ffcbca350f2 UnrealEditor-Engine.dll!FInstancedStaticMeshSceneProxy::SetupProxy() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\InstancedStaticMesh.cpp:1442]
LogOutputDevice: Error: [Callstack] 0x00007ffcbc94d9b5 UnrealEditor-Engine.dll!FInstancedStaticMeshSceneProxy::FInstancedStaticMeshSceneProxy() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Classes\Engine\InstancedStaticMesh.h:552]
LogOutputDevice: Error: [Callstack] 0x00007ffcbc94d2f9 UnrealEditor-Engine.dll!FHierarchicalStaticMeshSceneProxy::FHierarchicalStaticMeshSceneProxy() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\HierarchicalInstancedStaticMesh.cpp:885]
LogOutputDevice: Error: [Callstack] 0x00007ffcbc9677b8 UnrealEditor-Engine.dll!UHierarchicalInstancedStaticMeshComponent::CreateSceneProxy() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\HierarchicalInstancedStaticMesh.cpp:3210]
LogOutputDevice: Error: [Callstack] 0x00007ffcb55a7aa5 UnrealEditor-Renderer.dll!FScene::AddPrimitive() [D:\build++UE5\Sync\Engine\Source\Runtime\Renderer\Private\RendererScene.cpp:1324]
LogOutputDevice: Error: [Callstack] 0x00007ffcbc572143 UnrealEditor-Engine.dll!UPrimitiveComponent::CreateRenderState_Concurrent() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\PrimitiveComponent.cpp:609]
LogOutputDevice: Error: [Callstack] 0x00007ffcbc638cb2 UnrealEditor-Engine.dll!UStaticMeshComponent::CreateRenderState_Concurrent() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\StaticMeshComponent.cpp:739]
LogOutputDevice: Error: [Callstack] 0x00007ffcbc523f81 UnrealEditor-Engine.dll!UActorComponent::RecreateRenderState_Concurrent() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\ActorComponent.cpp:1689]
LogOutputDevice: Error: [Callstack] 0x00007ffcbc4f7291 UnrealEditor-Engine.dll!UActorComponent::DoDeferredRenderUpdates_Concurrent() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Components\ActorComponent.cpp:1762]
LogOutputDevice: Error: [Callstack] 0x00007ffcbcb288a8 UnrealEditor-Engine.dll!<lambda_31cab5b4bb9fc7374be1a9e5b20a35e7>::operator()() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1165]
LogOutputDevice: Error: [Callstack] 0x00007ffcbcb603b2 UnrealEditor-Engine.dll!UWorld::SendAllEndOfFrameUpdates() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1185]
LogOutputDevice: Error: [Callstack] 0x00007ffcdebaeb97 UnrealEditor-UnrealEd.dll!UEditorEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:1926]
LogOutputDevice: Error: [Callstack] 0x00007ffcdf53aac6 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:474]
LogOutputDevice: Error: [Callstack] 0x00007ff779b282f6 UnrealEditor.exe!FEngineLoop::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5215]
LogOutputDevice: Error: [Callstack] 0x00007ff779b40d9c UnrealEditor.exe!GuardedMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:183]
LogOutputDevice: Error: [Callstack] 0x00007ff779b40e8a UnrealEditor.exe!GuardedMainWrapper() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:147]
LogOutputDevice: Error: [Callstack] 0x00007ff779b43c4d UnrealEditor.exe!LaunchWindowsStartup() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:283]
LogOutputDevice: Error: [Callstack] 0x00007ff779b55564 UnrealEditor.exe!WinMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:330]
LogOutputDevice: Error: [Callstack] 0x00007ff779b58736 UnrealEditor.exe!__scrt_common_main_seh() [d:\a01_work\6\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
LogOutputDevice: Error: [Callstack] 0x00007ffd5b777034 KERNEL32.DLL!UnknownFunction
LogOutputDevice: Error: [Callstack] 0x00007ffd5bae2651 ntdll.dll!UnknownFunction
LogStats: SubmitErrorReport - 0.000 s
LogStats: SendNewReport - 1.007 s
LogStats: FDebug::EnsureFailed - 1.629 s
LogOnline: OSS: Created online subsystem instance for: :Context_3
LogNet: NotifyAcceptingConnection accepted from: 127.0.0.1:55906
LogHandshake: SendConnectChallenge. Timestamp: 2.131427, Cookie: 066119056121058238165222181237199013201031047129003229042153
LogHandshake: SendChallengeResponse. Timestamp: 2.131427, Cookie: 066119056121058238165222181237199013201031047129003229042153
LogNet: NotifyAcceptingConnection accepted from: 127.0.0.1:55906
LogHandshake: SendChallengeAck. InCookie: 066119056121058238165222181237199013201031047129003229042153
LogNet: Server accepting post-challenge connection from: 127.0.0.1:55906
PacketHandlerLog: Loaded PacketHandler component: Engine.EngineHandlerComponentFactory (StatelessConnectHandlerComponent)
LogNet: NotifyAcceptedConnection: Name: Castle, TimeStamp: 08/27/22 09:58:49, [UNetConnection] RemoteAddr: 127.0.0.1:55906, Name: IpConnection_3, Driver: GameNetDriver IpNetDriver_2, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
LogNet: AddClientConnection: Added client connection: [UNetConnection] RemoteAddr: 127.0.0.1:55906, Name: IpConnection_3, Driver: GameNetDriver IpNetDriver_2, IsServer: YES, PC: NULL, Owner: NULL, UniqueId: INVALID
LogNet: UPendingNetGame::SendInitialJoin: Sending hello. [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_2, Driver: PendingNetDriver IpNetDriver_3, IsServer: NO, PC: NULL, Owner: NULL, UniqueId: INVALID
LogNet: NotifyAcceptingChannel Control 0 server World /Game/Maps/UEDPIE_0_Castle.Castle: Accepted
LogNet: Remote platform little endian=1
LogNet: This platform little endian=1

Foliage parts of the maps essentially got corrupted during a transfer. Thanks for the guidance

1 Like