Crash when stopping the game

So i got this:

Critical Error Package /Game/Maps/UEDPIE_0_NodeTest Object from PIE level still referenced. Shortest path from root: (Object is not currently rooted)

Address = 0xfd8e940d (filename not found) [in C:\Windows\system32\KERNELBASE.dll]
FOutputDeviceWindowsError::Serialize() 0xed9836fc + 0 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\runtime\core\private\windows\windowsplatformoutputdevices.cpp:113] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor-Core.dll]
FMsg::Logf__VA() 0xed825aca + 0 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\runtime\core\private\misc\outputdevice.cpp:547] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor-Core.dll]
FMessageLogListingModel::AddMessageInternal() 0xe0d95fe6 + 149 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\developer\messagelog\private\model\messageloglistingmodel.cpp:70] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor-MessageLog.dll]
FMessageLogListingModel::AddMessages() 0xe0d960df + 79 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\developer\messagelog\private\model\messageloglistingmodel.cpp:89] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor-MessageLog.dll]
FMessageLog::~FMessageLog() 0xed7ffb15 + 58 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\runtime\core\private\misc\messagelog.cpp:91] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor-Core.dll]
UEditorEngine::EndPlayMap() 0xe9491bb3 + 409 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\editor\unrealed\private\playlevel.cpp:218] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
UEditorEngine::Tick() 0xe927bb21 + 0 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\editor\unrealed\private\editor.cpp:1445] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
UUnrealEdEngine::Tick() 0xe9666826 + 0 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\editor\unrealed\private\unrealedengine.cpp:252] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor-UnrealEd.dll]
FEngineLoop::Tick() 0x3f3a7c1e + 0 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\runtime\launch\private\launchengineloop.cpp:2098] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor.exe]
GuardedMain() 0x3f39d22c + 0 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\runtime\launch\private\launch.cpp:133] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor.exe]
GuardedMainWrapper() 0x3f39d29a + 5 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:125] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor.exe]
WinMain() 0x3f3a91c9 + 17 bytes [File=c:\users\illusive\documents\github\unrealengine\engine\source\runtime\launch\private\windows\launchwindows.cpp:201] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor.exe]
__tmainCRTStartup() 0x3f3aa089 + 21 bytes [File=f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618] [in C:\Users\Illusive\Documents\GitHub\UnrealEngine\Engine\Binaries\Win64\UE4Editor.exe]
Address = 0x776859ed (filename not found) [in C:\Windows\system32\kernel32.dll]
Address = 0x777bc541 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]
Address = 0x777bc541 (filename not found) [in C:\Windows\SYSTEM32\ntdll.dll]

Hey Illusive_S-

What template was this project based on (a blank project, blueprint first person, etc.) and do you get this same crash when working in a fresh project? Also, what exactly were you doing when this crash happened? Were you running play in editor or was it a standalone? If you could post your logs and dump file from the crash it will help us determine where to look for the cause. This link shows where inside your Project folder you can find the Log files: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

Cheers

As i remember that is a blank code template, i played in editor
And i cant seem to be able to attach a rar file? Its not supported here?

For now i guess ill post here last lines

[2014.09.30-16.38.32:602][284]LogReferenceChain: (root) UnrealEdEngine /Engine/Transient.UnrealEdEngine_0->GameSingleton
[2014.09.30-16.38.32:602][284]LogReferenceChain:   AStarData_C /Engine/Transient.UnrealEdEngine_0:AStarData_C_0->AllTheNodes
[2014.09.30-16.38.32:602][284]LogReferenceChain:     Node_C /Game/Maps/UEDPIE_0_NodeTest.NodeTest:PersistentLevel.Node_C_0->Property
[2014.09.30-16.38.32:602][284]LogReferenceChain:       Level /Game/Maps/UEDPIE_0_NodeTest.NodeTest:PersistentLevel->OwningWorld
[2014.09.30-16.38.32:602][284]LogReferenceChain:         (target) World /Game/Maps/UEDPIE_0_NodeTest.NodeTest
[2014.09.30-16.38.32:662][284]LogWindows:Error: appError called: Critical Error Package /Game/Maps/UEDPIE_0_NodeTest Object from PIE level still referenced. Shortest path from root:    (Object is not currently rooted)

[2014.09.30-16.38.32:662][284]LogWindows:Error: Windows GetLastError: Operacja ukoDczona pomy[lnie. (0)
[2014.09.30-16.38.32:662][284]LogCrashTracker:

If you add .txt to the end of the file name then you should be able to upload to AnswerHub without an issue. Also, what version of the engine are you working in? Did you get the same get the same crash in a new project?

Still can’t upload the log also im having trouble moving the code to another template

You should be able to just take the log file from the Logs folder of the project and add .txt to it (so it looks like "FileName.log.txt). As for the other template you shouldn’t have to move any code. The process of checking a fresh project is to see if the error occurs in a project that hasn’t had anything added to it.

I did that and i still cant attach it
New template works just fine
EDIT:
best idea i had was to put the log on pastebin D: Log - Pastebin.com

The crash indicated that you have a reference to the level within your GameSingleton. This will crash in development but result in a memory leak in shipping because the previous level could not be unloaded completely. It is not a good idea to hold level references (spawned actors for example) within the GameSingleton, or classes that are not within the real of a level (any global stuff that won’t get GC’ed automatically basically). The strange thing is that AStartData is handled by the engine and should get cleared in both cases, when you travel to a new level and when you close the PIE.

I guess as a work around you could clear the AllNodes list before the PIE gets closed and before you load a new level.

It does seam to be an engine bug though.

Cheers,
Moss

So how to clear this before PIE gets closed? And while youre at it whats a PIE?
And how better can i store references to all the fields on the map that i have? I need some way to deactivate them when im generating a new route.

Hey Illusive_S-

In order to narrow down where this crash is occurring could you do the following. Starting with a new project could you copy over small portions of your code, testing the game with each import until the crash occurs. This will help determine where the crash is coming from and where to start looking to fix it.

Cheers

Hi Illusive_S,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.

I had the same issue, fixed it by implementing EndPlay(const EEndPlayReason::Type EndPlayReason) for my actor where I removed all actor references from my game singleton when the level exits.

For my understanding, is holding actor references in a (custom) game mode class is a better choice than the game singleton? The only reason I chose the singleton as opposed to the game mode is that getting the game mode object needs access to a UWorld instance, so my static BlueprintFunctionLibrary functions need one extra parameter (the ‘world’) passed explicitly form blueprints so I thought using a singleton was more concise. Assuming that I ensure to clean up all references properly on ‘end play’ is it still a bad idea to use the singleton for storing references to important actors?

I think it is bad practice to store references in the game singleton or game instance classes, it can just lead to crashes if someone forgets to cleanup on a travel. I’m also not sure if ‘EndPlay’ is getting called when you have a disconnection in a network game for example, a disconnect or any other network error will travel you back to your default level but will it call ‘EndPlay’?

Hey -

Thanks for your concern however your question (Is using singleton good/bad?) does not relate to the original error Illusive_S posted about. If you feel you are experiencing a bug then feel free to create a new post so that it can receive proper recognition, otherwise a question of “best practice” would receive a more in depth conversation on the forums (https://forums.unrealengine.com/forum.php).