- David Jefferies
- Posts: 27
- Joined:
DECLARE_DYNAMIC_MULTICAST_DELEGATE
In Unreal I have some code where I have a DECLARE_DYNAMIC_MULTICAST_DELEGATE in a base class and then use it multiple times in a derived class.
This works OK if I only declare a few (sometimes 3, sometimes 4) delegates but any more than that and there's an exception on exiting PIE in Remove() in Delegate.Inl
Is it possible to reuse the same delegate for multiple DataTriggers or do I need to make a new declaration for each one?
Code: Select all
UCLASS(Blueprintable)
class UBaseDataModel : public UObject
{
GENERATED_BODY()
protected:
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FNoesisDataEventDelegate);
};
UCLASS(Blueprintable)
class UMyDataModel : public UBaseDataModel
{
GENERATED_BODY()
public:
UPROPERTY()
FNoesisDataEventDelegate PlayAnim1;
UPROPERTY()
FNoesisDataEventDelegate PlayAnim2;
UPROPERTY()
FNoesisDataEventDelegate PlayAnim3;
};
Code: Select all
/// Remove delegate
void Remove(const Delegate& d)
{
GetImpl()->Remove(d);
}
Re: DECLARE_DYNAMIC_MULTICAST_DELEGATE
Yes, that should be possible. Could you post the whole crash stack?
- David Jefferies
- Posts: 27
- Joined:
Re: DECLARE_DYNAMIC_MULTICAST_DELEGATE
Code: Select all
[Inlined] Noesis::Delegate<void __cdecl(Noesis::BaseComponent *,Noesis::EventArgs const &)>::Remove(const Noesis::Delegate<void __cdecl(Noesis::BaseComponent *,Noesis::EventArgs const &)> &) Delegate.inl:154
[Inlined] Noesis::Delegate<void __cdecl(Noesis::BaseComponent *,Noesis::EventArgs const &)>::operator-=(const Noesis::Delegate<void __cdecl(Noesis::BaseComponent *,Noesis::EventArgs const &)> &) Delegate.inl:160
NoesisApp::DataEventTrigger::UnregisterEvent() DataEventTrigger.cpp:101
[Inlined] NoesisApp::DataEventTrigger::StaticFillClassType::__l2::<lambda_c59d3410317593f84bf83ddc37dcc710>::operator()(Noesis::DependencyObject *,const Noesis::DependencyPropertyChangedEventArgs &) DataEventTrigger.cpp:124
Noesis::Delegate<void __cdecl(Noesis::DependencyObject *,Noesis::DependencyPropertyChangedEventArgs const &)>::FunctorStub<<lambda_c59d3410317593f84bf83ddc37dcc710> >::Invoke(Noesis::DependencyObject *,const Noesis::DependencyPropertyChangedEventArgs &) Delegate.inl:431
<unknown> 0x00007ffbd1d7fb54
<unknown> 0x00007ffbd1d7baed
<unknown> 0x00007ffbd1d7ae70
Noesis::ValueStorageManagerImpl<Noesis::Ptr<Noesis::BaseComponent> >::SetValue(Noesis::DependencyObject *,const Noesis::DependencyProperty *,const void *,unsigned char,Noesis::Expression *,const Noesis::PropertyMetadata *,Destination) ValueStorageManagerImpl.inl:230
<unknown> 0x00007ffbd1d7a67b
<unknown> 0x00007ffbd1d7b491
<unknown> 0x00007ffbd1da3be5
<unknown> 0x00007ffbd1d8e5d3
<unknown> 0x00007ffbd1e16389
<unknown> 0x00007ffbd1f0c7e4
<unknown> 0x00007ffbd1ef4db0
<unknown> 0x00007ffbd1e0dce1
<unknown> 0x00007ffbd1e74cf5
<unknown> 0x00007ffbd1e12599
<unknown> 0x00007ffbd1e12d30
<unknown> 0x00007ffbd1e0dd06
<unknown> 0x00007ffbd1dc6205
<unknown> 0x00007ffbd1d7baed
<unknown> 0x00007ffbd1d7ae70
<unknown> 0x00007ffbd1d9224d
<unknown> 0x00007ffbd1d91add
<unknown> 0x00007ffbd1e4b27d
<unknown> 0x00007ffbd1e4a126
<unknown> 0x00007ffbd1e4a3b3
<unknown> 0x00007ffbd1d8e5d3
<unknown> 0x00007ffbd1e47bf1
<unknown> 0x00007ffbd1e4d4de
<unknown> 0x00007ffbd1d7baed
<unknown> 0x00007ffbd1d7ae70
<unknown> 0x00007ffbd1d92850
<unknown> 0x00007ffbd1d7a67b
<unknown> 0x00007ffbd1d7b491
<unknown> 0x00007ffbd1da3be5
<unknown> 0x00007ffbd1e16389
<unknown> 0x00007ffbd1f0c7e4
<unknown> 0x00007ffbd1ef4db0
<unknown> 0x00007ffbd1e0dce1
<unknown> 0x00007ffbd1dcc84a
<unknown> 0x00007ffbd1e4d044
<unknown> 0x00007ffbd1e12599
<unknown> 0x00007ffbd1e12c91
<unknown> 0x00007ffbd1e0dd06
<unknown> 0x00007ffbd1e74cf5
<unknown> 0x00007ffbd1e12599
<unknown> 0x00007ffbd1e12c91
<unknown> 0x00007ffbd1e0dd06
<unknown> 0x00007ffbd1e74cf5
<unknown> 0x00007ffbd1e12599
<unknown> 0x00007ffbd1e12c91
<unknown> 0x00007ffbd1e0dd06
<unknown> 0x00007ffbd1e12599
<unknown> 0x00007ffbd1e12c91
<unknown> 0x00007ffbd1e0dd06
<unknown> 0x00007ffbd1dcc84a
<unknown> 0x00007ffbd1dc54c5
<unknown> 0x00007ffbd1d7baed
<unknown> 0x00007ffbd1d7ae70
<unknown> 0x00007ffbd1d9224d
<unknown> 0x00007ffbd1d91add
[Inlined] Noesis::FControls::FViewLoader::UpdateContentData() ViewLoader.cpp:77
Noesis::FControls::FViewLoader::OnPropertyChanged(const Noesis::DependencyPropertyChangedEventArgs &) ViewLoader.cpp:61
<unknown> 0x00007ffbd1d7baed
<unknown> 0x00007ffbd1d7ae70
Noesis::ValueStorageManagerImpl<Noesis::Ptr<Noesis::BaseComponent> >::SetValue(Noesis::DependencyObject *,const Noesis::DependencyProperty *,const void *,unsigned char,Noesis::Expression *,const Noesis::PropertyMetadata *,Destination) ValueStorageManagerImpl.inl:230
<unknown> 0x00007ffbd1d7a67b
<unknown> 0x00007ffbd1d7b647
<unknown> 0x00007ffbd1da3be5
<unknown> 0x00007ffbd1d8e5d3
<unknown> 0x00007ffbd1e16389
<unknown> 0x00007ffbd1f0c7e4
<unknown> 0x00007ffbd1ef4db0
<unknown> 0x00007ffbd1e0dce1
<unknown> 0x00007ffbd1dcc84a
<unknown> 0x00007ffbd1dc54c5
<unknown> 0x00007ffbd1e12599
<unknown> 0x00007ffbd1e12d30
<unknown> 0x00007ffbd1e0dd06
<unknown> 0x00007ffbd1dc6205
<unknown> 0x00007ffbd1d7baed
<unknown> 0x00007ffbd1d7ae70
<unknown> 0x00007ffbd1d9224d
<unknown> 0x00007ffbd1d91add
<unknown> 0x00007ffbd1e4b27d
<unknown> 0x00007ffbd1e4a126
<unknown> 0x00007ffbd1e4a3b3
<unknown> 0x00007ffbd1d8e5d3
<unknown> 0x00007ffbd1e47bf1
<unknown> 0x00007ffbd1e4d4de
<unknown> 0x00007ffbd1d7baed
<unknown> 0x00007ffbd1d7ae70
<unknown> 0x00007ffbd1d92850
<unknown> 0x00007ffbd1d7a67b
<unknown> 0x00007ffbd1d7b491
<unknown> 0x00007ffbd1da3be5
<unknown> 0x00007ffbd1d8e5d3
<unknown> 0x00007ffbd1e16389
<unknown> 0x00007ffbd1f0c7e4
<unknown> 0x00007ffbd1ef4db0
<unknown> 0x00007ffbd1e0dce1
<unknown> 0x00007ffbd1dcc84a
<unknown> 0x00007ffbd1e4d044
<unknown> 0x00007ffbd1e12599
<unknown> 0x00007ffbd1e123c3
<unknown> 0x00007ffbd1e12a4e
<unknown> 0x00007ffbd1e0d1f9
<unknown> 0x00007ffbd1dc540e
<unknown> 0x00007ffbd1dc54fb
<unknown> 0x00007ffbd1d7baed
<unknown> 0x00007ffbd1d7ae70
<unknown> 0x00007ffbd1d9224d
<unknown> 0x00007ffbd1d91add
<unknown> 0x00007ffbd1dc5488
<unknown> 0x00007ffbd1dd74d7
<unknown> 0x00007ffbd1d86929
<unknown> 0x00007ffbd1effa89
<unknown> 0x00007ffbd1f002c4
<unknown> 0x00007ffbd1d7a38c
<unknown> 0x00007ffbd1f00bdc
<unknown> 0x00007ffbd1f00a14
<unknown> 0x00007ffbd1d61c93
[Inlined] Noesis::Ptr<Noesis::IView>::Reset() Ptr.inl:156
UNoesisInstance::TermInstance() NoesisInstance.cpp:1098
UNoesisInstance::NativeDestruct() NoesisInstance.cpp:1771
SObjectWidget::ResetWidget() SObjectWidget.cpp:57
SObjectWidget::~SObjectWidget() SObjectWidget.cpp:48
[Inlined] SharedPointerInternals::TReferenceControllerBase<1>::ReleaseSharedReference() SharedPointerInternals.h:223
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:586
FSlotBase::~FSlotBase() SlotBase.cpp:111
SConstraintCanvas::FSlot::`vector deleting destructor'(unsigned int) 0x00007ffc5cb9c23d
[Inlined] TDefaultDelete<SConstraintCanvas::FSlot>::operator()(SConstraintCanvas::FSlot *) UniquePtr.h:64
[Inlined] TUniquePtr<SConstraintCanvas::FSlot,TDefaultDelete<SConstraintCanvas::FSlot> >::{dtor}() UniquePtr.h:266
[Inlined] DestructItems(TUniquePtr<SConstraintCanvas::FSlot,TDefaultDelete<SConstraintCanvas::FSlot> > *,int) MemoryOps.h:97
[Inlined] TArray<TUniquePtr<SConstraintCanvas::FSlot,TDefaultDelete<SConstraintCanvas::FSlot> >,TSizedDefaultAllocator<32> >::{dtor}() Array.h:684
TPanelChildren<SConstraintCanvas::FSlot>::~TPanelChildren<SConstraintCanvas::FSlot>() 0x00007ffc5cb93cb0
SConstraintCanvas::~SConstraintCanvas() 0x00007ffc5cb98965
[Inlined] SharedPointerInternals::TReferenceControllerBase<1>::ReleaseSharedReference() SharedPointerInternals.h:223
[Inlined] SharedPointerInternals::FSharedReferencer<1>::{dtor}() SharedPointerInternals.h:586
UGameViewportSubsystem::RemoveWidgetInternal(UWidget *,const TWeakPtr<SConstraintCanvas,1> &,const TWeakObjectPtr<ULocalPlayer,FWeakObjectPtr> &) GameViewportSubsystem.cpp:213
UGameViewportSubsystem::RemoveWidget(UWidget *) GameViewportSubsystem.cpp:190
UWidget::RemoveFromParent() Widget.cpp:853
AViewHUD::EndPlay(Type) ViewHUD.cpp:309
[Inlined] AActor::RouteEndPlay(Type) Actor.cpp:2610
AActor::Destroyed() Actor.cpp:2692
UWorld::DestroyActor(AActor *,bool,bool) LevelActor.cpp:872
AActor::Destroy(bool,bool) Actor.cpp:4594
APlayerController::Destroyed() PlayerController.cpp:1569
UWorld::DestroyActor(AActor *,bool,bool) LevelActor.cpp:872
AActor::Destroy(bool,bool) Actor.cpp:4594
UGameInstance::RemoveLocalPlayer(ULocalPlayer *) GameInstance.cpp:902
UGameInstance::CleanupGameViewport() GameInstance.cpp:1154
UEngine::CleanupGameViewport() UnrealEngine.cpp:3491
UEditorEngine::EndPlayMap() PlayLevel.cpp:313
UEditorEngine::Tick(float,bool) EditorEngine.cpp:2207
UUnrealEdEngine::Tick(float,bool) UnrealEdEngine.cpp:514
FEngineLoop::Tick() LaunchEngineLoop.cpp:5363
[Inlined] EngineTick() Launch.cpp:66
GuardedMain(const wchar_t *) Launch.cpp:204
LaunchWindowsStartup(HINSTANCE__ *,HINSTANCE__ *,char *,int,const wchar_t *) LaunchWindows.cpp:233
WinMain(HINSTANCE__ *,HINSTANCE__ *,char *,int) LaunchWindows.cpp:282
[Inlined] invoke_main() 0x00007ff636a7a566
__scrt_common_main_seh() 0x00007ff636a7a545
<unknown> 0x00007ffcdd227614
<unknown> 0x00007ffcdd3626f1
Re: DECLARE_DYNAMIC_MULTICAST_DELEGATE
Ok, I see what the problem is. I've created a ticket for it, will provide you with a patch as soon as I can.
Here's the link to the ticket: https://www.noesisengine.com/bugs/view.php?id=2649
Here's the link to the ticket: https://www.noesisengine.com/bugs/view.php?id=2649
Re: DECLARE_DYNAMIC_MULTICAST_DELEGATE
Hi,
I've attached a patch to the ticket linked above. Could you give it a try and let us know if the issue is resolved?
Thanks!
I've attached a patch to the ticket linked above. Could you give it a try and let us know if the issue is resolved?
Thanks!
- David Jefferies
- Posts: 27
- Joined:
Re: DECLARE_DYNAMIC_MULTICAST_DELEGATE
Hi, thanks for confirming and fixing the issue, we'll try the patch and report back - it might be a week or two after an upcoming deadline
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 12 guests