Download

Pig of a crash

I’m having a real nightmare with this crash. Anyone else getting it?

Im trying out 4.26 with c++ and its happening all the time even though ive hardly written any code. I also used to get it in 4.25, but I discovered it was caused by programming my own destructors ( I was trying to trace the flow and creation of the UE framework and my own classes) and the crash went away after I removed the destructors, but I have no destructors in my 4.26 program and this crash is happening all the time. I dont claim to even know what it means, but I wish it would stop!

error.PNG

That error means it expects something to override a method, but nothing did. You’d need to post your logs / callstack if you want to know where the issue is.

So Im trying to think what I have done that triggers this.

Is it that I am supposed to be overriding a function when I extend a UE class but I have not done?

Or could it be that I am not making a call to the Super:: when I have overriden a class?

I am primarily making subclasses of the basic UE frameworks such as GameInstance, GameModeBase, GameState, PlayerController and PlayerState at the moment

So Ive caught the first of todays many! Not sure if this useful for anything,

Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Windows/WindowsPlatformMisc.cpp] [Line: 475] Pure virtual function being called

UE4Editor_Core
VCRUNTIME140
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
kernel32
ntdll

And the second - same of the first, occurred when I pressed ESCAPE to end PIE
Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Windows/WindowsPlatformMisc.cpp] [Line: 475] Pure virtual function being called

UE4Editor_Core
VCRUNTIME140
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_CoreUObject
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
UE4Editor_Core
kernel32
ntdll



Pure virtual function being called


There’s the problem right there. You’ve defined a pure virtual function, which then hasn’t been implemented or overridden in a child class. It’s rare to need pure virtuals in UE4 generally.

The problem is I really have not made any functions virtual or pure virtual, nada.

I’ve only subclassed the GameInstance, GameState, GameModeBase, Player Controller and Player State and added no other functions than what comes in these when loaded into UE. Definitely nothing is pure virtual on my end.

Ive even had the editor crash with this when Im doing nothing and just looking at my code in VS. Something else is the reason for this

I have the same problem with Unreal Engine 4.26

I have created a new project from the 3d first person shooter C++ template, created a custom GameInstance class with no logic yet (so no custom made code involved in the game at this point).

And my Unreal Editor also crashed at random times (usually though when exiting PIE)

Crash Log:


Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Windows/WindowsPlatformMisc.cpp] [Line: 475] Pure virtual function being called

UE4Editor_Core!PureCallHandler() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformMisc.cpp:477]
VCRUNTIME140
UE4Editor_CoreUObject!UGCObjectReferencer::AddReferencedObjects() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Misc\GCObjectReferencer.cpp:27]
UE4Editor_CoreUObject!TFastReferenceCollector<FGCReferenceProcessor<1>,FGCCollector<1>,FGCArrayPool,1>::ProcessObjectArray() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\FastReferenceCollector.h:881]
UE4Editor_CoreUObject!TFastReferenceCollector<FGCReferenceProcessor<1>,FGCCollector<1>,FGCArrayPool,1>::FCollectorTaskQueue::DoTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\FastReferenceCollector.h:403]
UE4Editor_CoreUObject!TGraphTask<TFastReferenceCollector<FGCReferenceProcessor<1>,FGCCollector<1>,FGCArrayPool,1>::FCollectorTaskProcessorTask>::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasks() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:1065]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:888]
UE4Editor_Core!FTaskThreadAnyThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:965]
UE4Editor_Core!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]

I have had it happen to me too. I’m on engine source build 4.25.1
I’ve made a custom game instance but also added steam multiplayer into the mix.

Though, this has also happened to me on a seperate project, which was made through launcher 4.25.3. It also had steam multiplayer (although most of it was rewritten) and custom GI.

Mostly crash when pressing PIE or exiting PIE, or even random clicking on stuff after being in editor for a while. Happens only sometimes and have not figured out a way to reproduce this consistently. I’ve also never been able to crash during debug editor mode. Which makes it extra hard to figure out what is happening. I have neither been able to crash in game through launch. Which makes me think this mostly has to do with PIE or development editor mode.



Fatal error: [File:C:/IsakStream/Engine/Source/Runtime/Core/Private/Windows/WindowsPlatformMisc.cpp] [Line: 475] Pure virtual function being called

UE4Editor_Core!PureCallHandler() [C:\IsakStream\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformMisc.cpp:477]
VCRUNTIME140
UE4Editor_CoreUObject!UGCObjectReferencer::AddReferencedObjects() [C:\IsakStream\Engine\Source\Runtime\CoreUObject\Private\Misc\GCObjectReferencer.cpp:27]
UE4Editor_CoreUObject!TFastReferenceCollector<1,FGCReferenceProcessor<1,0>,FGCCollector<1,0>,FGCArrayPool,0,1>::ProcessObjectArray() [C:\IsakStream\Engine\Source\Runtime\CoreUObject\Public\UObject\FastReferenceCollector.h:635]
UE4Editor_CoreUObject!TFastReferenceCollector<1,FGCReferenceProcessor<1,0>,FGCCollector<1,0>,FGCArrayPool,0,1>::FCollectorTaskQueue::D
https:\/\/forums.unrealengine.com\/core\/image\/gif;base64
​oTask() [C:\IsakStream\Engine\Source\Runtime\CoreUObject\Public\UObject\FastReferenceCollector.h:383]
UE4Editor_CoreUObject!TGraphTask<TFastReferenceCollector<1,FGCReferenceProcessor<1,0>,FGCCollector<1,0>,FGCArrayPool,0,1>::FCollectorTaskProcessorTask>::ExecuteTask() [C:\IsakStream\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:849]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasks() [C:\IsakStream\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:1039]
UE4Editor_Core!FTaskThreadAnyThread::ProcessTasksUntilQuit() [C:\IsakStream\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:863]
UE4Editor_Core!FTaskThreadAnyThread::Run() [C:\IsakStream\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:940]
UE4Editor_Core!FRunnableThreadWin::Run() [C:\IsakStream\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]


I’m not sure but I have not overriden the Initialize and Deinitialize Methods in my custom GameInstance. Did you guys override them? @MarcusRivers @Ballerunni

Since I have swapped back to the default GameInstance the crashes are gone. Maybe thats the problem?

I have overriden Shutdown and Init and also called super on both of them. Although my case might differ, as I also have a lot of code in my game instance such as online stuff.

I am currently just trying to double check and cleanup everything in my overriden shutdown, and also adding failsafes. If I dont get pure virtual are being called again after this, then it might just be that you have to override these two functions, call super and make sure everything is properly taken care of before it destroys itself. :stuck_out_tongue:
I will reply back if I do not crash anymore after this.

Though, this issue seems to only really be related to when you PIE and do stuff in editor.
I have not crashed in game yet (with right click on uproject and click “launch game”), what about you guys?

Well I just got GIsRunning again…

This time I commented out everything in my custom game instance class, except for overriding Init and Shutdown and calling their Supers.

I also do UAbilitySystemGlobals::Get().InitGlobalData(); in init for GAS.
and this in shutdown (ReferencedObjects in an array in UGameInstance)



for (auto it : ReferencedObjects)
{
    UE_LOG(LogTemp, Error, TEXT("object still referenced by gameInstance %s"), *it->GetName());
}


So seems like it is just a bug you get with having a custom game instance i guess :frowning:

Anybody figured out a fix?

Overriding



virtual void Init() override;
virtual void Shutdown() override;
virtual void StartGameInstance() override;


in my custom UGameInstance fixed it for me

Just Coming back to UE after a few months away, decided to convert a blueprint project to C++, this ‘bug’ or whatever is popping up every 10 minutes, driving me mad. I will try the fix above.

I noticed that this bug mainly appears if I compile a C++ project in the Visual Studio, and not in the unreal editor. If I compiled in the editor, this bug does not appear. I haven’t tested that much yet, but it looks like it’s a hot reload problem.

Additionally: this bug appears in the development build, and almost never in the debug build.

Having this happen, it’s definitely related to using a custom game instance class + PIE. I’m not even overriding anything.

Stack trace:

[2021.07.23-11.47.32:207][169]LogThreadingWindows: Error: Runnable thread TaskGraphThreadNP 5 crashed.
[2021.07.23-11.47.32:207][169]LogWindows: Error: === Critical error: ===
[2021.07.23-11.47.32:207][169]LogWindows: Error: 
[2021.07.23-11.47.32:207][169]LogWindows: Error: Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Core/Private/Windows/WindowsPlatformMisc.cpp] [Line: 475] 
[2021.07.23-11.47.32:207][169]LogWindows: Error: Pure virtual function being called
[2021.07.23-11.47.32:207][169]LogWindows: Error: 
[2021.07.23-11.47.32:208][169]LogWindows: Error: 
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffead374ed9 KERNELBASE.dll!UnknownFunction []
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe6045d066 UE4Editor-Core.dll!ReportAssert() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformCrashContext.cpp:1616]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe604607a8 UE4Editor-Core.dll!FWindowsErrorOutputDevice::Serialize() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsErrorOutputDevice.cpp:78]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe6016e8cd UE4Editor-Core.dll!FOutputDevice::LogfImpl() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Misc\OutputDevice.cpp:61]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe60477360 UE4Editor-Core.dll!PureCallHandler() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformMisc.cpp:477]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe9cfc6bf4 VCRUNTIME140.dll!UnknownFunction []
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe5f7b04b4 UE4Editor-CoreUObject.dll!UGCObjectReferencer::AddReferencedObjects() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Private\Misc\GCObjectReferencer.cpp:27]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe5f9f635b UE4Editor-CoreUObject.dll!TFastReferenceCollector<FGCReferenceProcessor<1>,FGCCollector<1>,FGCArrayPool,1>::ProcessObjectArray() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\FastReferenceCollector.h:881]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe5f9b6c61 UE4Editor-CoreUObject.dll!TFastReferenceCollector<FGCReferenceProcessor<1>,FGCCollector<1>,FGCArrayPool,1>::FCollectorTaskQueue::DoTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\CoreUObject\Public\UObject\FastReferenceCollector.h:403]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe5f9bfb18 UE4Editor-CoreUObject.dll!TGraphTask<TFastReferenceCollector<FGCReferenceProcessor<1>,FGCCollector<1>,FGCArrayPool,1>::FCollectorTaskProcessorTask>::ExecuteTask() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:886]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe5ff1df05 UE4Editor-Core.dll!FTaskThreadAnyThread::ProcessTasks() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:1065]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe5ff1f160 UE4Editor-Core.dll!FTaskThreadAnyThread::ProcessTasksUntilQuit() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:888]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe5ff26495 UE4Editor-Core.dll!FTaskThreadAnyThread::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:965]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe6047898b UE4Editor-Core.dll!FRunnableThreadWin::Run() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:86]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffe60471620 UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() [D:\Build\++UE4\Sync\Engine\Source\Runtime\Core\Private\Windows\WindowsRunnableThread.cpp:35]
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffeadcd7034 KERNEL32.DLL!UnknownFunction []
[2021.07.23-11.47.32:208][169]LogWindows: Error: [Callstack] 0x00007ffeaf8e2651 ntdll.dll!UnknownFunction []
[2021.07.23-11.47.32:208][169]LogWindows: Error: 
[2021.07.23-11.47.32:208][169]LogWindows: Error: Crash in runnable thread TaskGraphThreadNP 5

No idea how to fix it.

edit:
as a workaround, I switched back to the default GameInstance and am now using a game instance submodule. Haven’t had crashes for a few hours, so I assume that was the issue.

When you’re crashing out and don’t know why, run in debugger, and cause it to happen. That will either give you a lot more information, or send you on a wild goose hunt :slight_smile:

However, this also points to the problem:

Having this happen, it’s definitely related to using a custom game instance class + PIE. I’m not even overriding anything.

Well, that’s what the error means – it’s expecting you to override functions.

virtual void Init() override;
virtual void Shutdown() override;
virtual void StartGameInstance() override;

Those are virtual override, so if they are called, an implementation must be found, or you will have a crash.

Understanding the error messages is key to locating the problems :slight_smile: But also so is using your debugger. :slight_smile: