Crash after migration from 4.21 to UE4.22

I have some blueprint widgets (classes which is inherited from UserWidget) in my project. And there are no issues with these widgets in UE4.21. But behaviour in UE4.22 is pretty strange. I can open, edit and save any of them. I don’t see any warnings or errors. But after each attempt to compile any of my blueprint widgets I get crash of UE4 Editor with the following stack trace:

LoginId:c0fa6c0f7c4f16874904ae83f30f612d
EpicAccountId:e0d09450f0ea45f383a6cb4183d3c7ce

Assertion failed: Existing.Linker->ExportMap[Existing.LinkerIndex].Object==this [File:/Users/build/Build/++UE4/Sync/Engine/Source/Runtime/CoreUObject/Private/UObject/UObjectLinker.cpp] [Line: 107]

FGenericPlatformMisc::RaiseException(unsigned int) Address = 0x101fcd35b (filename not found) [in UE4Editor-Core.dylib]
FMacErrorOutputDevice::Serialize(wchar_t const*, ELogVerbosity::Type, FName const&) Address = 0x10210d87d (filename not found) [in UE4Editor-Core.dylib]
FOutputDevice::LogfImpl(wchar_t const*, ...) Address = 0x1021e1019 (filename not found) [in UE4Editor-Core.dylib]
FDebug::AssertFailed(char const*, char const*, int, wchar_t const*, ...) Address = 0x102175a53 (filename not found) [in UE4Editor-Core.dylib]
FDebug::CheckVerifyFailedImpl(char const*, char const*, int, wchar_t const*, ...) Address = 0x102175867 (filename not found) [in UE4Editor-Core.dylib]
UObject::SetLinker(FLinkerLoad*, int, bool) Address = 0x1030b7906 (filename not found) [in UE4Editor-CoreUObject.dylib]
UObject::BeginDestroy() Address = 0x102f9285e (filename not found) [in UE4Editor-CoreUObject.dylib]
UObject::ConditionalBeginDestroy() Address = 0x102fa1dc7 (filename not found) [in UE4Editor-CoreUObject.dylib]
UnhashUnreachableObjects(bool, float) Address = 0x102f2008a (filename not found) [in UE4Editor-CoreUObject.dylib]
CollectGarbageInternal(EObjectFlags, bool) Address = 0x102f2255b (filename not found) [in UE4Editor-CoreUObject.dylib]
CollectGarbage(EObjectFlags, bool) Address = 0x102f2465f (filename not found) [in UE4Editor-CoreUObject.dylib]
FBlueprintCompilationManagerImpl::CompileSynchronouslyImpl(FBPCompileRequest const&) Address = 0x111fa080e (filename not found) [in UE4Editor-Kismet.dylib]
FKismetEditorUtilities::CompileBlueprint(UBlueprint*, EBlueprintCompileOptions, FCompilerResultsLog*) Address = 0x10c1e22c8 (filename not found) [in UE4Editor-UnrealEd.dylib]
FBlueprintEditor::Compile() Address = 0x11210b5ee (filename not found) [in UE4Editor-Kismet.dylib]
TBaseSPMethodDelegateInstance<false, FBlueprintEditor, (ESPMode)0, TTypeWrapper<void> ()>::Execute() const Address = 0x112163f2d (filename not found) [in UE4Editor-Kismet.dylib]
TBaseSPMethodDelegateInstance<false, FBlueprintEditor, (ESPMode)0, void ()>::ExecuteIfSafe() const Address = 0x112163fcb (filename not found) [in UE4Editor-Kismet.dylib]
FUICommandList::ExecuteAction(TSharedRef<FUICommandInfo const, (ESPMode)0>) const Address = 0x103d915f4 (filename not found) [in UE4Editor-Slate.dylib]
SToolBarButtonBlock::OnClicked() Address = 0x103e71a2a (filename not found) [in UE4Editor-Slate.dylib]
TBaseSPMethodDelegateInstance<false, SToolBarButtonBlock, (ESPMode)0, FReply ()>::Execute() const Address = 0x103ec5093 (filename not found) [in UE4Editor-Slate.dylib]
SButton::OnMouseButtonUp(FGeometry const&, FPointerEvent const&) Address = 0x103f1389c (filename not found) [in UE4Editor-Slate.dylib]
FSlateApplication::RoutePointerUpEvent(FWidgetPath const&, FPointerEvent const&) Address = 0x103d6ce26 (filename not found) [in UE4Editor-Slate.dylib]
FSlateApplication::ProcessMouseButtonUpEvent(FPointerEvent const&) Address = 0x103d26d44 (filename not found) [in UE4Editor-Slate.dylib]
FSlateApplication::OnMouseUp(EMouseButtons::Type, FVector2D) Address = 0x103d75066 (filename not found) [in UE4Editor-Slate.dylib]
FMacApplication::ProcessMouseUpEvent(FDeferredMacEvent const&, TSharedPtr<FMacWindow, (ESPMode)0>) Address = 0x103c9084a (filename not found) [in UE4Editor-ApplicationCore.dylib]
FMacApplication::ProcessEvent(FDeferredMacEvent const&) Address = 0x103c8a208 (filename not found) [in UE4Editor-ApplicationCore.dylib]
FMacApplication::ProcessDeferredEvents(float) Address = 0x103c89f5f (filename not found) [in UE4Editor-ApplicationCore.dylib]
FSlateApplication::TickPlatform(float) Address = 0x103d46665 (filename not found) [in UE4Editor-Slate.dylib]
FSlateApplication::Tick(ESlateTickType) Address = 0x103d45f5b (filename not found) [in UE4Editor-Slate.dylib]
FEngineLoop::Tick() Address = 0x101e91ec0 (filename not found) [in UE4Editor]
GuardedMain(wchar_t const*) Address = 0x101e9ab48 (filename not found) [in UE4Editor]
-[UE4AppDelegate runGameThread:] Address = 0x101ea4c8e (filename not found) [in UE4Editor]
-[FCocoaGameThread main] Address = 0x10210c891 (filename not found) [in UE4Editor-Core.dylib]
Unknown() Address = 0x7fff41a8987e (filename not found) [in Foundation]
_pthread_body Address = 0x7fff6bea42eb (filename not found) [in libsystem_pthread.dylib]
_pthread_start Address = 0x7fff6bea7249 (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7fff6bea340d (filename not found) [in libsystem_pthread.dylib]

The same here…

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

https://epicsupport.force.com/unrealengine/s/

Thanks

UE4 callstack is useless (it’s not possible to understand what really happens and why it happens), your support is absolutely useless too. It’s not a first time when answer from your support is just “I can’t reproduce that” and after hours of research I can confirm that it’s a problem of your editor (not of my own blueprints). Oh my god, it’s a worst editor ever (believe me, I saw much of them - some of them was really uncomfortable and ugly, but they at least didn’t have so many bugs).

Well, for me it was a problem of Canvas Panel with 5 buttons (every button has text).
I don’t know which parts are significant here. The only way to fix the problem was to remove all children from Canvas Panel, save and compile blueprint, and finally add buttons back. More interesting thing here is that after UE4 editor relaunch the problem come back.

My current solution is avoid of Canvas Panel using. Replacing a panel with a grid helps me. And I hope my answer helps someone else. Support still can’t reproduce the problem even with my assets.

Thanks for the answer! I’ll try

I have many widgets with Canvas panel as a parent widget, but I found a problem only in one of them. This is strange.
Anyway, thank you very much! You save a lot of my time. But UE4 support is useless.

So i’m running into a similar issue, however when I try to compile or delete the suspect widget, the engine crashes. When I replace the canvas with a grid, then save, then compile, it crashes. Any ideas?

Update*
So I manually went into the windows folder structure and deleted the UASSET file for the widget. This fixed the issue. I should mention that for me, I did not upgrade from 4.21 → 4.22 for my project. This was probably a result of the recent upgrade from 4.22.1 → 4.22.2.

It might not even be related to upgrading as the widget was created after upgrading. This might just be a bug that occurs under very specific conditions (of which I have no clue).

We are having the same problem here. Seems to be a regression in the way UE4 deals with circular blueprint class references. We worked around the issue by cleaning up our reference graphs by using blueprint interfaces and splitting some manager-type classes into base/implementation.

same for me too, have some canvas panel too, on play the main menu / canvas panel is showing.
then moving to next map crashes in preview. Opening any map will crash the editor.
No clue how to fix that :frowning:

We are running into same issue in 4.22.3. 4.21 was working fine. It this bug already reported? Seems like issue with compilation manager and compilation manager toggle in project settings says that bugs should be immediately reported :slight_smile:

This is indeed caused by some 4.22 change. Quick search in release notes will find multiple changes about circular dependencies. Compilation manager thinks it is able to compile all circularly dependant blueprints okay, so Cook is successful and packaged game crashes on GC or game end with stack:

Game end crash stack:

Assertion failed: (Index >= 0) &
(Index < ArrayNum)
[File:d:\ue_4.22_source\engine\source\runtime\core\public\Containers/Array.h]
[Line: 611] Array index out of
bounds: 87 from an array of size
-572662307

Game-Win64-DebugGame.exe!UObject::SetLinker(FLinkerLoad * LinkerLoad, int LinkerIndex, bool bShouldDetachExisting) Line 106 C++
Game-Win64-DebugGame.exe!UObject::BeginDestroy() Line 783 C++
Game-Win64-DebugGame.exe!UObject::ConditionalBeginDestroy() Line 975 C++
Game-Win64-DebugGame.exe!StaticExit() Line 4365 C++
[Inline Frame] Game-Win64-DebugGame.exe!UE4Tuple_Private::TTupleImpl<TIntegerSequence >::ApplyAfter(void(*)() &) Line 498 C++
[Inline Frame] Game-Win64-DebugGame.exe!TBaseStaticDelegateInstance<TTypeWrapper cdecl(void)>::Execute() Line 760 C++
Game-Win64-DebugGame.exe!TBaseStaticDelegateInstance<void cdecl(void)>::ExecuteIfSafe() Line 813 C++
Game-Win64-DebugGame.exe!TBaseMulticastDelegate::Broadcast() Line 977 C++
Game-Win64-DebugGame.exe!FEngineLoop::AppPreExit() Line 4739 C++
Game-Win64-DebugGame.exe!FEngineLoop::Exit() Line 3448 C++
[Inline Frame] Game-Win64-DebugGame.exe!EngineExit() Line 73 C++
[Inline Frame] Game-Win64-DebugGame.exe!GuardedMain::l2::EngineLoopCleanupGuard::{dtor}() Line 115 C++
Game-Win64-DebugGame.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE
* hInInstance, HINSTANCE
* hPrevInstance, int nCmdShow) Line 179 C++
Game-Win64-DebugGame.exe!WinMain(HINSTANCE
* hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 261 C++
[External Code]

GC crash stack is similar, however it is coming from CollectGarbage() and UnhashUnreachableObjects()

I modified engine to log name of currently being GCed object into console. It is always name in this format: PLACEHOLDER-INST_of_WBP_BattleResults_C_0

Our project has UI powered by UMG, so it is happening only for some widget blueprints (not sure if it can happen for normal blueprints too). Here is the interesting thing. If you disable compilation manager using DEPRECATED checkbox in project settings and enable LogCook logging, then Cook will fail on exactly same broken asset. This way you can easily identify problematic assets.

I learned about nice workaround from eXi which had similar crash.

Set bForceSlowConstructionPath to true for ALL widgets in your project! Finally it is not crashing.

My uproject kept crashing upon being opened, same error as listed above.

In the end, I removed my ui.uasset from the project directory, created a duplicate of it so that it was renamed to ui2.uasset and brought it back in. Project then opened and would compile with that previously erroneous widget. Still not sure what the problem was because this project functioned fine yesterday and there haven’t been any updates to anything since then.

Anyway, I readded the new copy to my existing blueprints (create widget and add to viewport basically was the only thing that needed fixing) and now my project closes and opens again successfully.

If you have this problem; find your widget UI in your project directory in file explorer, remove it from your project directory (just stick it on your desktop), duplicate it and rename it (make sure .uasset is at the end) and then put that copy back into your project directory. You’ll have to re-hook up any references to the widget.

Upgrading to 4.23 fixed the problem for me.