[BUG] Create UserWidget Widget crashes Editor when PIE

I created a project based on the Blueprint First Person template.

I was experimenting with UMG Widgets, and wanted to not have any widgets added to screen but not remove my Blueprint nodes to create a Widget. I did this by setting the Class variable in a Create UserWidget Widget node to “User Widget”. When this is set, the Editor crashes when trying to Play In Editor.

I believe the key portion of the error message in the Crash Reporter is: “Class which was marked abstract was trying to be loaded. It will be null”

This error is repeatable. It will crash the Editor everytime you Play, or Simulate.

This is the callstack from the crash reporter:

Access violation - code c0000005 (first/second chance not available)

Ensure condition failed: false [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.6\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 1597]
Class which was marked abstract was trying to be loaded. It will be null

UE4Editor_UMG + 658745 bytes
UE4Editor_UMG + 90249 bytes
UE4Editor_UMG + 503384 bytes
UE4Editor_UMG + 1533434 bytes
UE4Editor_CoreUObject + 563956 bytes
UE4Editor_CoreUObject + 1348671 bytes
UE4Editor_CoreUObject + 1471421 bytes
UE4Editor_CoreUObject + 1615878 bytes
UE4Editor_CoreUObject + 1477214 bytes
UE4Editor_CoreUObject + 1350042 bytes
UE4Editor_CoreUObject + 1621364 bytes
UE4Editor_CoreUObject + 1477214 bytes
UE4Editor_CoreUObject + 563956 bytes
UE4Editor_CoreUObject + 1475014 bytes
UE4Editor_Engine + 1640529 bytes
UE4Editor_Engine + 9918747 bytes
UE4Editor_Engine + 3683489 bytes
UE4Editor_Engine + 3792845 bytes
UE4Editor_Engine + 3803171 bytes
UE4Editor_Engine + 3805342 bytes
UE4Editor_UnrealEd + 4271756 bytes
UE4Editor_UnrealEd + 4561611 bytes
UE4Editor_UnrealEd + 4660963 bytes
UE4Editor_UnrealEd + 1801811 bytes
UE4Editor_UnrealEd + 6686342 bytes
UE4Editor!FEngineLoop::Tick() + 3876 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.6\engine\source\runtime\launch\private\launchengineloop.cpp:2214]
UE4Editor!GuardedMain() + 479 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.6\engine\source\runtime\launch\private\launch.cpp:131]
UE4Editor!GuardedMainWrapper() + 26 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.6\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() + 249 bytes [d:\buildfarm\buildmachine_++depot+ue4-releases+4.6\engine\source\runtime\launch\private\windows\launchwindows.cpp:202]
UE4Editor!__tmainCRTStartup() + 329 bytes [f:\dd\vctools\crt\crtw32\dllstuff\crtexe.c:618]

Trying to instantiate an abstract class is not the purpose of an abstract class, this is why it crashes.

Abstract class only describe of what its children are able to do. F.e. You have an abstract class Vehicle, there cant be no kind of object of a Vehicle in practice, but a car or an airplane which derives from this vehicle class are real object which can exists. The purpose is to set up same behaviour within Vehicle class, which both (Car and Airplane) have too. Even if the behaviour is not completely equals to each other. Example of example: ( :slight_smile: ) A Vehicle has a function StartEngine.
So do a car as well as an airplane, even if they do it not in the same way.

However i dont quite get what you want to achieve.

Anyways this is not a bug from epic but a bug user-created^^

This directly causes the Editor to crash, and is reproducible. I’d call that a bug. There should at least be a warning, if not a compilation failure in a Blueprint trying to instantiate the UserWidget base class.

I only stumbled upon this bug when I wanted to not have any UMG widgets I’d created added to the screen, and also didn’t want to delete the Create a Widget node.

then i would recommend to create them when they are needed, or create them were you do it right now, without an abstract class for sure, and set those widgets to be hidden by default. Keep in mind that if you use UMG somewhere does not mean that your other UI elements like Canvas or whatever will be invisible, they can stay parallel on your screen.

best regards.

I agree with you with your bug explanation in its origin meaning. And considering this telling epic this to implement the catch of wrong user input in this case makes sense to me, so forgot i said something about that :wink:

Hello JonathanADaley,

I was able to reproduce this issue. I have written up a report (UE-6170) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your information and time.

Make it a great day