Assert failed at animation state transition blueprint

Hi. I have an assertion failed issue ReferenceController->SharedReferenceCount > 0 at animation state transition blueprint (Debug Editor, source build 4.11.0). I have added Get references to boolean variables of the animation blueprint multiple times (my own vars). This issue is from 4.10 too. I did a simple manipulation of variables, such as logical operators AND, OR and remove them all after.

 	UE4Editor-SlateCore-Win64-Debug.dll!TSharedPtr<IToolTip,0>::~TSharedPtr<IToolTip,0>()	C++
 	UE4Editor-SlateCore-Win64-Debug.dll!SWidget::~SWidget() Line 60	C++
 	[External Code]	
 	UE4Editor-GraphEditor-Win64-Debug.dll!SharedPointerInternals::TReferenceControllerWithDeleter<SGraphNodeK2Sequence,SharedPointerInternals::DefaultDeleter<SGraphNodeK2Sequence> >::DestroyObject() Line 104	C++
 	[External Code]	
 	UE4Editor-SlateCore-Win64-Debug.dll!FDelegateBase::Unbind() Line 139	C++
 	UE4Editor-SlateCore-Win64-Debug.dll!SWidget::~SWidget() Line 60	C++
 	[External Code]	
 	UE4Editor-GraphEditor-Win64-Debug.dll!SharedPointerInternals::TReferenceControllerWithDeleter<SToolTip,SharedPointerInternals::DefaultDeleter<SToolTip> >::DestroyObject() Line 104	C++
 	UE4Editor-SlateCore-Win64-Debug.dll!SharedPointerInternals::FSharedReferencer<0>::operator=(const SharedPointerInternals::FSharedReferencer<0> & InSharedReference) Line 410	C++
 	UE4Editor-SlateCore-Win64-Debug.dll!SWidget::SetToolTip(const TSharedPtr<IToolTip,0> & InToolTip) Line 597	C++
>	UE4Editor-GraphEditor-Win64-Debug.dll!SGraphNode::OnToolTipClosing() Line 411	C++
 	UE4Editor-Slate-Win64-Debug.dll!FSlateApplication::CloseToolTip() Line 3066	C++
 	UE4Editor-Slate-Win64-Debug.dll!FSlateApplication::UpdateToolTip(bool AllowSpawningOfNewToolTips) Line 3250	C++
 	UE4Editor-Slate-Win64-Debug.dll!FSlateApplication::ProcessMouseMoveEvent(FPointerEvent & MouseEvent, bool bIsSynthetic) Line 5103	C++
 	UE4Editor-Slate-Win64-Debug.dll!FSlateApplication::OnMouseMove() Line 5060	C++
 	UE4Editor-Core-Win64-Debug.dll!FWindowsApplication::ProcessDeferredMessage(const FDeferredWindowsMessage & DeferredMessage) Line 1462	C++
 	UE4Editor-Core-Win64-Debug.dll!FWindowsApplication::DeferMessage(TSharedPtr<FWindowsWindow,0> & NativeWindow, HWND__ * InHWnd, unsigned int InMessage, unsigned __int64 InWParam, __int64 InLParam, int MouseX, int MouseY, unsigned int RawInputFlags) Line 1732	C++
 	UE4Editor-Core-Win64-Debug.dll!FWindowsApplication::ProcessMessage(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 754	C++
 	UE4Editor-Core-Win64-Debug.dll!FWindowsApplication::AppWndProc(HWND__ * hwnd, unsigned int msg, unsigned __int64 wParam, __int64 lParam) Line 618	C++
 	[External Code]	
 	UE4Editor-Core-Win64-Debug.dll!WinPumpMessages() Line 862	C++
 	UE4Editor-Core-Win64-Debug.dll!FWindowsPlatformMisc::PumpMessages(bool bFromMainLoop) Line 887	C++
 	UE4Editor-Win64-Debug.exe!FEngineLoop::Tick() Line 2610	C++
 	UE4Editor-Win64-Debug.exe!EngineTick() Line 52	C++
 	UE4Editor-Win64-Debug.exe!GuardedMain(const wchar_t * CmdLine, HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, int nCmdShow) Line 145	C++
 	UE4Editor-Win64-Debug.exe!WinMain(HINSTANCE__ * hInInstance, HINSTANCE__ * hPrevInstance, char * __formal, int nCmdShow) Line 189	C++

Assertion failed:
ReferenceController->SharedReferenceCount > 0 [File:d:\myprojects\unrealengine4\unrealengine4\unrealengine\engine\source\runtime\core\public\templates\SharedPointerInternals.h]
[Line: 290]

UE4Editor-Win64-Debug.exe has
triggered a breakpoint.

where ReferenceController->WeakReferenceCount == 2

86040-bug.png

Hey vs,

I’m having trouble reproducing this on my end. Is this only occurring in debug editor for you? Could you provide some more info to help reproduce this or possibly an example project?

If you want to send an example project privately, you can PM me on the forums. Please include a link to this Answerhub page in your message.

-.

I can not persistently reproduce the problem, I will try to understand what exactly is going in my project. I’m trying to reproduce it in a standard third person example project but unsuccessfully.

It is for Debug Editor build only

The causer is the SGraphNode, Get boolean variable value node’s tooltip.

There is a copy of PM to .Williams

  1. Open ThirdPerson_AnimBP
  2. Open animation Graph editor
  3. Go to New State Machine
  4. Go to State to State1 transition blueprint

Remove getter node for any boolean (I test boolean). For example New Var 1. Remove node then Undo (Ctrl+Z) and drag selection frame from right to left. Do it multiple times. Remove - undo - drag from right to left.

Example project:

Hey v.s.,

A couple of us have been trying for a while and absolutely cannot reproduce this crash. Are you trying to do your development in Debug Editor?

-.

I am working in Debug Editor from time to time because I am programmer. This assertion failure is for Debug Editor ONLY (no assertions in Development build) but it presents in Development too but without assertion. This problem is the lack of release of shared pointer to complex tooltip of the SGraphNode (+ mouse move event).

Hello v.s.,

I’ve attempting reproducing this issue in Debug while built for Debug Editor but haven’t had much success. Just to ensure that I’m doing it correctly, I decided to record the process:

86913-animation.gif

Does this match up with what you’re doing? If not, is there a part that I’m missing?

I do several operations of selection and deletion of the node but the exception does not always work in 1 or 2 cases. Sometimes it is necessary to do this 5-6 times or more.
Try to experiment with code:

void SWidget::SetToolTip( const TSharedPtr & InToolTip )
{
	if (!InToolTip.IsValid())
		ToolTip.Reset(); // no assertion
	else
		ToolTip = InToolTip; // assertion
}

This assertion does not require editing of source code. Bug is unstable. I’m doing the following steps, their order does not always lead to the reproduction of the error, the exact amount of action is unknown to me. Select multiple nodes or one and remove them then Undo. Do a combinations of these actions multiple times. Do selections of empty space.

I guess I will have to record a video

https://drive.google.com/file/d/0B6VhapqQv3c4NjhvSHQycmJvOFk/view?usp=sharing

https://drive.google.com/open?id=0B6VhapqQv3c4UWhhUmRNT05kMmM

While the gif is quite repetitive, that is a gif of me attempting the reproduction 6 times before it loops. When you say experiment with code, do you mean editing the source code? Does this assertion require editing source code to occur?

Thank you for that information. It seems like the repro requires being quite a bit more erratic than I expected. I’ve reproduced the problem in the project you provided and am currently in the process of trying to reproduce it in a fresh project based off the Third Person template, to make sure the problem isn’t project specific. If I can do that, I’ll be putting a bug report in for the problem so it can get on the track to be fixed.

I was able to get the crash to happen in a blank project with just an animation blueprint, so at this point it is fairly easy to reproduce. Thank you for working with me on getting the reproduction case down. I’ve placed a bug in for the issue under the number UE-29695. I’ll be sure to update you here whenever a fix goes in.

Have a nice day!