Description

This is a trending crash coming out of 4.18 and may be a regression. Users have not provided any descriptions of their actions when the crash occurred.

Source Context

 72       	/**
   73       	 * Removes all functions from this multi-cast delegate's invocation list that are bound to the specified UserObject.
   74       	 * Note that the order of the delegates may not be preserved!
   75       	 *
   76       	 * @param InUserObject The object to remove all delegates for.
   77       	 */
   78       	void RemoveAll( const void* InUserObject )
   79       	{
   80 ***** 		if (InvocationListLockCount > 0)
   81       		{
   82       			bool NeedsCompacted = false;
   83       			for (FDelegateBase& DelegateBaseRef : InvocationList)
   84       			{
   85       				IDelegateInstance* DelegateInstance = DelegateBaseRef.GetDelegateInstanceProtected();
   86       				if ((DelegateInstance != nullptr) && DelegateInstance->HasSameObject(InUserObject))
   87       				{
   88       					// Manually unbind the delegate here so the compaction will find and remove it.
   89       					DelegateBaseRef.Unbind();
   90       					NeedsCompacted = true;
   91       				}
   92       			}
Steps to Reproduce

repro steps currently unknown

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

UE4Editor_WorldBrowser!FMulticastDelegateBase<FWeakObjectPtr>::RemoveAll() [multicastdelegatebase.h:81]
UE4Editor_WorldBrowser!FLevelCollectionModel::OnLevelRemovedFromWorld() [levelcollectionmodel.cpp:1889]
UE4Editor_WorldBrowser!TBaseSPMethodDelegateInstance<0,FLevelCollectionModel,0,TTypeWrapper<void> __cdecl() [delegateinstancesimpl.h:327]
UE4Editor_WorldBrowser!TBaseSPMethodDelegateInstance<0,FLevelCollectionModel,0,void __cdecl() [delegateinstancesimpl.h:434]
UE4Editor_Engine!TBaseMulticastDelegate<void,ULevel * __ptr64,UWorld * __ptr64>::Broadcast() [delegatesignatureimpl.inl:937]
UE4Editor_Engine!UWorld::RemoveFromWorld() [world.cpp:2397]
UE4Editor_Engine!UWorld::UpdateLevelStreamingInner() [world.cpp:2875]
UE4Editor_Engine!UWorld::UpdateLevelStreaming() [world.cpp:2918]
UE4Editor_Engine!UWorld::FlushLevelStreaming() [world.cpp:2952]
UE4Editor_WorldBrowser!FWorldTileModel::LoadLevel() [worldtilemodel.cpp:615]
UE4Editor_WorldBrowser!FLevelCollectionModel::LoadLevels() [levelcollectionmodel.cpp:591]
UE4Editor_WorldBrowser!FLevelModel::MakeLevelCurrent() [levelmodel.cpp:307]
UE4Editor_WorldBrowser!WorldHierarchy::FLevelModelTreeItem::MakeCurrent() [worldtreeitemtypes.cpp:257]
UE4Editor_WorldBrowser!SWorldHierarchyImpl::OnTreeViewMouseButtonDoubleClick() [sworldhierarchyimpl.cpp:783]
UE4Editor_WorldBrowser!TBaseSPMethodDelegateInstance<0,SWorldHierarchyImpl,0,TTypeWrapper<void> __cdecl() [delegateinstancesimpl.h:327]
UE4Editor_WorldBrowser!TBaseSPMethodDelegateInstance<0,SWorldHierarchyImpl,0,void __cdecl() [delegateinstancesimpl.h:434]
UE4Editor_WorldBrowser!TBaseDelegate<void,TSharedPtr<WorldHierarchy::IWorldTreeItem,0> >::ExecuteIfBound() [delegatesignatureimpl.inl:624]
UE4Editor_WorldBrowser!SListView<TSharedPtr<WorldHierarchy::IWorldTreeItem,0> >::Private_OnItemDoubleClicked() [slistview.h:805]
UE4Editor_WorldBrowser!STableRow<TSharedPtr<WorldHierarchy::IWorldTreeItem,0> >::OnMouseButtonDoubleClick() [stablerow.h:288]
UE4Editor_Slate!<lambda_eeb33fd1b480e3cad58a1531d90d2e14>::operator() [slateapplication.cpp:5695]
UE4Editor_Slate!FEventRouter::Route<FReply,FEventRouter::FBubblePolicy,FPointerEvent,<lambda_eeb33fd1b480e3cad58a1531d90d2e14> >() [slateapplication.cpp:234]
UE4Editor_Slate!FSlateApplication::RoutePointerDoubleClickEvent() [slateapplication.cpp:5693]
UE4Editor_Slate!FSlateApplication::ProcessMouseButtonDoubleClickEvent() [slateapplication.cpp:5680]
UE4Editor_Slate!FSlateApplication::OnMouseDoubleClick() [slateapplication.cpp:5656]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessDeferredMessage() [windowsapplication.cpp:1729]
UE4Editor_ApplicationCore!FWindowsApplication::DeferMessage() [windowsapplication.cpp:2171]
UE4Editor_ApplicationCore!FWindowsApplication::ProcessMessage() [windowsapplication.cpp:888]
UE4Editor_ApplicationCore!FWindowsApplication::AppWndProc() [windowsapplication.cpp:725]
user32!UserCallWinProcCheckWow()
user32!DispatchMessageWorker()
UE4Editor_ApplicationCore!FWindowsPlatformApplicationMisc::PumpMessages() [windowsplatformapplicationmisc.cpp:129]
UE4Editor!FEngineLoop::Tick() [launchengineloop.cpp:3220]
UE4Editor!GuardedMain() [launch.cpp:166]
UE4Editor!GuardedMainWrapper() [launchwindows.cpp:134]
UE4Editor!WinMain() [launchwindows.cpp:210]
UE4Editor!__scrt_common_main_seh() [exe_common.inl:253]
kernel32!BaseThreadInitThunk()
ntdll!RtlUserThreadStart()

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-51933 in the post.

0
Login to Vote

Fixed
Fix Commit3737791
CreatedNov 2, 2017
ResolvedNov 6, 2017
UpdatedApr 27, 2018
Pull Requests
4447 - klorberg