[CRASH] Delegate->Unbind() entails an access violation

I just unbind the delegate declared with DECLARE_DELEGATE.

And call stack goes here (to DelegateBase.h):

/**
 * Unbinds this delegate
 */
inline void Unbind( )
{
	if (IDelegateInstance* Ptr = GetDelegateInstanceProtected())
	{
		Ptr->~IDelegateInstance();  // HERE ACCESS VIOLATION (READ OF ADDRESS 0xFFFFFFFFFFFFFFFF)
		DelegateAllocator.ResizeAllocation(0, 0, sizeof(AlignedInlineDelegateType));
		DelegateSize = 0;
	}
}

Hello broly,

Could you please post the entire callstack that you’re given when this crash occurs? Also, have you tried testing this in 4.12 to see if you get the same result? Is this something new to 4.11 or is it something that you’re trying for the first time? In what kind of function are you unbinding this delegate?

Hi, !

I can post callstack later, but it goes from my code, not from UE4 engine code. Or this need for something else?
I tested only in 4.11, but can test in 4.12 soon.
I used this for the first time. Bound function is lambda (used as delegate.BindLambda) with three params (FString, FString, bool - I do not remember exactly, I have many similar delegates. Maybe also delegate is empty already at the moment).
I’ll post more details later. But if this above helps for something…

We haven’t heard from you in a while Broly. Are you still experiencing these issues? If so, can you provide the information we discussed? In the meantime, I’ll be marking this issue as resolved for tracking purposes.