Crash On Create User Widget

MachineId:08E41F174E9856FB0790F9B830BA5760
EpicAccountId:40dd2988f279471f82aefa4031bd2e82

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

Ensure condition failed: MyWidgetPath.IsValid() [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.6\Engine\Source\Runtime\Slate\Private\Widgets\Input\SMenuAnchor.cpp] [Line: 256] 

UE4Editor_UMG + 658745 bytes
UE4Editor_UMG + 89984 bytes
UE4Editor_UMG + 503448 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]

Looking at your error print out the part that catches my eye is:

Ensure condition failed: MyWidgetPath.IsValid() [File:D:\BuildFarm\buildmachine_++depot+UE4-Releases+4.6\Engine\Source\Runtime\Slate\Private\Widgets\Input\SMenuAnchor.cpp] [Line: 256]

It would seem that one of two things have happened.

A. Somehow the path to your user Widget has been corrupted when moved

B. You changed the name of your User Widget and some reason it did not update that in the blueprint or (User Widget is the default setting “none” setting and is invalid anyway).

Either way it looks like the actual creation is failing. Try putting a IsValid check after you create the widget. Then Debug the Blueprint and see if it gets past the IsValid Check. If this does not work I’ve a feeling it is something else buried in your code. Not sure if you have done some of this in C++ or are using exclusively blueprints. This kind of thing happens to me often because I use C++, but I think it could happen if the compilation of another blueprint fails (such as your user widget) and you try to create that failed compiled widget… maybe…

Only the widget creation crashes, I use only engine content. And I was just trying out something.
But i look at the engine source and here is the problem:

FWidgetPath MyWidgetPath;
				

FSlateApplication::Get().GeneratePathToWidgetUnchecked(AsShared(), MyWidgetPath);
if (ensure(MyWidgetPath.IsValid()))
{
// ..
}

I have to think this is can’t be a bug in the engine itself, it’s never that easy (and I’d think more people would be complaining). My theory is that something in wrong with the widget you created… it doesn’t seem to be finding it or something within it (I see the bug specifically references SMenuAnchor) which is a slate widget if I remember the Prefixes correctly. Try creating a brand new widget blueprint with just a text widget in it. Then create it and see if it still explodes. This will at least narrow down the problem. If it still explodes then their may be something wrong with your build (what engine version are you using and did you build it yourself from C++). If it does not then you know their is something specifically wrong with your user widget. (and make sure you compile the blueprint… call me captain obvious but in my experience as a long time programmer most bugs come down to something really stupid (and these are MY own bugs I’m talking about))

Hey Azarus-

I noticed the same behavior on 4.6.1 however this only occurred if “User Widget” was selected under the class. If a custom widget is created and used in place the crash did not occur. Additionally the crash mentioned has been fixed and included in the 4.7 preview 7 and will be fixed in the final release of 4.7.

Cheers

well… what do you know it is a bug in the engine :slight_smile: