Description

Attempting to add the same widget to the viewport twice will result in an assertion and crash.

Steps to Reproduce
  1. Create a new project using the Blueprint first person template.
  2. Create a new UMG widget.
  3. In the graph for the new widget, drag off of the Event Construct node's execution pin and add an Add To Viewport node.
  4. Compile and save the widget.
  5. Open the Level Blueprint.
  6. In the Event Graph, add an Event Begin Play node.
  7. Drag off of the execution pin and add a Create Widget node that creates an instance of the widget created in step 2.
  8. Drag off of the return value and add an Add To Viewport node.
  9. Save everything.
  10. Start PIE.

RESULT:
The Engine crashes with the following error message: "Assertion failed: !DelegateInstanceInterface->IsSameFunction(*InDelegateInstance)"

EXPECTED:
The user receives a warning letting them know that they cannot add the same widget to the viewport twice, and the Editor continues running.

Callstack

MachineId:926CC4CD4DE75FA30341E2895D619D6E
EpicAccountId:2c96fbce8ce344c99520cc9b8922f191

Unknown exception - code 00000001 (first/second chance not available)

"Assertion failed: !DelegateInstanceInterface->IsSameFunction(*InDelegateInstance) [File:d:\main-builds\ue4\engine\source\runtime\core\public\delegates\Delegat

UE4Editor_Core!FDebug::AssertFailed() [d:\main-builds\ue4\engine\source\runtime\core\private\misc\outputdevice.cpp:366]
UE4Editor_UMG!TBaseMulticastDelegate<void,ULevel * __ptr64,UWorld * __ptr64>::AddDelegateInstance() [d:\main-builds\ue4\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:775]
UE4Editor_UMG!TBaseMulticastDelegate<void,ULevel * __ptr64,UWorld * __ptr64>::AddUObject<UUserWidget>() [d:\main-builds\ue4\engine\source\runtime\core\public\delegates\delegatesignatureimpl_variadics.inl:696]
UE4Editor_UMG!UUserWidget::AddToScreen() [d:\main-builds\ue4\engine\source\runtime\umg\private\userwidget.cpp:525]
UE4Editor_UMG!UUserWidget::execAddToViewport() [d:\main-builds\ue4\engine\source\runtime\umg\public\blueprint\userwidget.h:143]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\class.cpp:4235]
UE4Editor_CoreUObject!UObject::CallFunction() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:484]
UE4Editor_CoreUObject!UObject::ProcessContextOpcode() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1755]
UE4Editor_CoreUObject!UObject::ProcessInternal() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:698]
UE4Editor_CoreUObject!UFunction::Invoke() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\class.cpp:4235]
UE4Editor_CoreUObject!UObject::ProcessEvent() [d:\main-builds\ue4\engine\source\runtime\coreuobject\private\uobject\scriptcore.cpp:1050]
UE4Editor_Engine!AActor::ProcessEvent() [d:\main-builds\ue4\engine\source\runtime\engine\private\actor.cpp:594]
UE4Editor_Engine!AActor::BeginPlay() [d:\main-builds\ue4\engine\source\runtime\engine\private\actor.cpp:2830]
UE4Editor_Engine!AWorldSettings::NotifyBeginPlay() [d:\main-builds\ue4\engine\source\runtime\engine\private\worldsettings.cpp:142]
UE4Editor_Engine!AGameMode::HandleMatchHasStarted() [d:\main-builds\ue4\engine\source\runtime\engine\private\gamemode.cpp:605]
UE4Editor_Engine!AGameMode::SetMatchState() [d:\main-builds\ue4\engine\source\runtime\engine\private\gamemode.cpp:721]
UE4Editor_Engine!AGameMode::StartMatch() [d:\main-builds\ue4\engine\source\runtime\engine\private\gamemode.cpp:582]
UE4Editor_Engine!UWorld::BeginPlay() [d:\main-builds\ue4\engine\source\runtime\engine\private\world.cpp:3155]
UE4Editor_Engine!UGameInstance::StartPIEGameInstance() [d:\main-builds\ue4\engine\source\runtime\engine\private\gameinstance.cpp:275]
UE4Editor_UnrealEd!UEditorEngine::CreatePIEGameInstance() [d:\main-builds\ue4\engine\source\editor\unrealed\private\playlevel.cpp:3141]
UE4Editor_UnrealEd!UEditorEngine::PlayInEditor() [d:\main-builds\ue4\engine\source\editor\unrealed\private\playlevel.cpp:2388]
UE4Editor_UnrealEd!UEditorEngine::StartQueuedPlayMapRequest() [d:\main-builds\ue4\engine\source\editor\unrealed\private\playlevel.cpp:1066]
UE4Editor_UnrealEd!UEditorEngine::Tick() [d:\main-builds\ue4\engine\source\editor\unrealed\private\editorengine.cpp:1240]
UE4Editor_UnrealEd!UUnrealEdEngine::Tick() [d:\main-builds\ue4\engine\source\editor\unrealed\private\unrealedengine.cpp:366]
UE4Editor!FEngineLoop::Tick() [d:\main-builds\ue4\engine\source\runtime\launch\private\launchengineloop.cpp:2450]
UE4Editor!GuardedMain() [d:\main-builds\ue4\engine\source\runtime\launch\private\launch.cpp:142]
UE4Editor!GuardedMainWrapper() [d:\main-builds\ue4\engine\source\runtime\launch\private\windows\launchwindows.cpp:126]
UE4Editor!WinMain() [d:\main-builds\ue4\engine\source\runtime\launch\private\windows\launchwindows.cpp:200]

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Fixed
ComponentUE - Editor - UI Systems
Affects Versions4.8.34.94.10
Target Fix4.10
Fix Commit2722084
Release Commit2722084
CreatedSep 8, 2015
ResolvedOct 8, 2015
UpdatedJun 9, 2016
View Jira Issue