View Issue Details

IDProjectCategoryView StatusLast Update
0002384NoesisGUIC++ SDKpublic2022-07-18 11:50
Reportersteveh Assigned Tosfernandez  
PrioritynormalSeveritycrashReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.2 
Target Version3.1.6Fixed in Version3.1.6 
Summary0002384: Itemspresenter stomp
DescriptionHi guys,

After grabbing r11503 from the Arabic branch we've found that it triggers our memory stomp detection. The issue is coming from the following code:

void ItemsPresenter::OnPresenterDestroyed(DependencyObject*)
{
    mScrollPresenter = 0; // the this pointer is null
}


This is because the destroyed delegate is not unbound when ItemsPresenter::OnTemplatedParentChanged is triggered.

I'm attaching a patch of the fix.

Cheers!

-Steven
TagsNo tags attached.
PlatformAny

Activities

steveh

steveh

2022-07-15 20:01

reporter  

items_presenter_stomp_fix.diff (807 bytes)   
Index: ItemsPresenter.cpp
===================================================================
--- ItemsPresenter.cpp	(revision 11505)
+++ ItemsPresenter.cpp	(working copy)
@@ -24,10 +24,7 @@
 ////////////////////////////////////////////////////////////////////////////////////////////////////
 ItemsPresenter::~ItemsPresenter()
 {
-    if (mScrollPresenter != 0)
-    {
-        mScrollPresenter->Destroyed() -= MakeDelegate(this, &ItemsPresenter::OnPresenterDestroyed);
-    }
+    SetScrollPresenter(0);
 }
 
 ////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -44,7 +41,7 @@
     if (newParent == 0)
     {
         InvalidateItemsHost();
-        mScrollPresenter = 0;
+        SetScrollPresenter(0);
     }
     else
     {
sfernandez

sfernandez

2022-07-18 11:50

manager   ~0008026

Thanks a lot for reporting this. I fixed it in our trunk and merged it to the Arabic branch (r11509).

Issue History

Date Modified Username Field Change
2022-07-15 20:01 steveh New Issue
2022-07-15 20:01 steveh File Added: items_presenter_stomp_fix.diff
2022-07-16 17:13 jsantos Assigned To => sfernandez
2022-07-16 17:13 jsantos Status new => assigned
2022-07-16 17:13 jsantos Target Version => 3.2
2022-07-18 11:50 sfernandez Status assigned => resolved
2022-07-18 11:50 sfernandez Resolution open => fixed
2022-07-18 11:50 sfernandez Fixed in Version => 3.1.6
2022-07-18 11:50 sfernandez Target Version 3.2 => 3.1.6
2022-07-18 11:50 sfernandez Note Added: 0008026