View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002426 | NoesisGUI | C++ SDK | public | 2022-09-20 18:51 | 2022-09-26 14:14 |
Reporter | steveh | Assigned To | sfernandez | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | 3.1 | ||||
Target Version | 3.1.6 | Fixed in Version | 3.1.6 | ||
Summary | 0002426: Inifnite recursion causing be self binding in VisualTreeInspector.cpp | ||||
Description | Hi guys, One of our coders has identified an issue in the Visual Inspector tool caused by a "relative self" binding. "Prevent self-referential infinite recursion causing stack overflow and game crash when a <custom control> is clicked on in the visual tree in the NoesisInspector. This is caused by "<custom event>" event on "<custom control>" style, which has "Self" as CommandParameter." This is the fix (between the comments). I've also uploaded a patch. void NodeProperties_FromDependencyObject(Ptr<DependencyObject> depObject) { Vector<const DependencyProperty*, 64> localProperties; VisualTreeInspectorHelper::RecursiveEnumerateProperties(depObject, [depObject, &localProperties](const DependencyProperty* property) { // SUMO:MT prevent self-referential infinite recursion if (property->GetValueObject(depObject) == depObject) return; // end The crash was caused by adding a custom event into a style which has a binding to the self for the command parameter <Setter Property="Noesis:StyleInteraction.Triggers"> <Setter.Value> <Noesis:StyleTriggerCollection> <i:EventTrigger EventName="..."> <i:InvokeCommandAction Command="{Binding ...}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self}}" /> </i:EventTrigger> </Noesis:StyleTriggerCollection> </Setter.Value> </Setter> | ||||
Tags | No tags attached. | ||||
Platform | Any | ||||
fix_recursive_overflow.diff (375 bytes)
--- C:/Users/steveh/AppData/Local/Temp/VisualTreeInspector.cpp-revBASE.svn000.tmp.cpp Wed Jul 13 19:32:24 2022 +++ Z:/NoesisArabic/Native/Src/Packages/Gui/Core/Src/VisualTreeInspector.cpp Tue Sep 20 17:47:59 2022 @@ -1815,0 +1816,2 @@ void NodeProperties_FromDependencyObject(Ptr<Depen + if (property->GetValueObject(depObject) == depObject) + return; |
|
Thanks for the report Steve! | |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-09-20 18:51 | steveh | New Issue | |
2022-09-20 18:51 | steveh | File Added: fix_recursive_overflow.diff | |
2022-09-21 13:55 | jsantos | Assigned To | => sfernandez |
2022-09-21 13:55 | jsantos | Status | new => assigned |
2022-09-21 13:55 | jsantos | Product Version | 3.2 => 3.1 |
2022-09-21 13:55 | jsantos | Target Version | => 3.1.6 |
2022-09-21 13:56 | jsantos | Note Added: 0008076 | |
2022-09-26 14:14 | sfernandez | Status | assigned => resolved |
2022-09-26 14:14 | sfernandez | Resolution | open => fixed |
2022-09-26 14:14 | sfernandez | Fixed in Version | => 3.1.6 |