View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002649 | NoesisGUI | Unreal | public | 2023-07-12 09:22 | 2023-09-06 13:46 |
| Reporter | hcpizzi | Assigned To | hcpizzi | ||
| Priority | normal | Severity | crash | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.2.1 | ||||
| Target Version | 3.2.2 | Fixed in Version | 3.2.2 | ||
| Summary | 0002649: Crash when multiple delegates are used | ||||
| Description | When multiple delegates are used in the same object there's a crash in DataEventTrigger::UnregisterEvent with the following stack: [Inlined] Noesis::Delegate<void cdecl(Noesis::BaseComponent *,Noesis::EventArgs const &)>::Remove(const Noesis::Delegate<void cdecl(Noesis::BaseComponent ,Noesis::EventArgs const &)> &) Delegate.inl:154 | ||||
| Platform | Any | ||||
|
Here's a patch that should fix this issue. Could you let us know if it fixes it for you? 2649.patch (983 bytes)
Index: Source/NoesisRuntime/Private/NoesisTypeClass.cpp
===================================================================
--- Source/NoesisRuntime/Private/NoesisTypeClass.cpp (revision 12615)
+++ Source/NoesisRuntime/Private/NoesisTypeClass.cpp (revision 12616)
@@ -2148,6 +2148,11 @@
{
ObjectMap.Remove(Object);
}
+
+ for (auto Pairs : EventMap)
+ {
+ check(Pairs.Value.Empty());
+ }
}
class NoesisMaterialWrapper
@@ -2503,6 +2508,21 @@
return nullptr;
}
+ auto CountEvents = [](const Noesis::TypeClass* TypeClass)
+ {
+ int32 Count = 0;
+ do
+ {
+ Count += (int32)TypeClass->GetNumEvents();
+ TypeClass = TypeClass->GetBase();
+ } while (TypeClass != nullptr);
+ return Count;
+ };
+
+ const Noesis::TypeClass* TypeClass = Wrapper->GetClassType();
+ int32 EventCount = CountEvents(TypeClass);
+ Wrapper->EventMap.Reserve(EventCount);
+
auto Found = Wrapper->EventMap.Find(Property);
if (Found == nullptr)
{
|
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-07-12 09:22 | hcpizzi | New Issue | |
| 2023-07-12 09:22 | hcpizzi | Assigned To | => hcpizzi |
| 2023-07-12 09:22 | hcpizzi | Status | new => assigned |
| 2023-07-12 11:05 | sfernandez | Product Version | => 3.2.1 |
| 2023-07-12 11:05 | sfernandez | Target Version | => 3.2.2 |
| 2023-07-13 19:15 | hcpizzi | Note Added: 0008605 | |
| 2023-07-13 19:15 | hcpizzi | File Added: 2649.patch | |
| 2023-07-13 21:00 | jsantos | Status | assigned => feedback |
| 2023-09-06 13:46 | hcpizzi | Status | feedback => resolved |
| 2023-09-06 13:46 | hcpizzi | Resolution | open => fixed |
| 2023-09-06 13:46 | hcpizzi | Fixed in Version | => 3.2.2 |