View Issue Details

IDProjectCategoryView StatusLast Update
0001315NoesisGUIC# SDKpublic2018-11-22 09:35
Reporterai_enabled Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status resolvedResolutionopen 
Product Version2.1.0f1 
Target Version2.2.0Fixed in Version2.2.0b3 
Summary0001315: "Binding failed" spam for ItemsSource items - possibly an item disposal issue
Description

Hi guys,

I've enabled NoesisGUI errors and was overwhelmed by "binding failed" errors spam.
I have no reasonable explanation why so many "binding failed" errors are displayed.

For example, we have a console log in the game. It's implemented as an ItemsControl with ItemsSource binding to the observable collection of the viewmodels. The ItemTemplate is using databinding to bind to the viewmodel.
But I have tons of "binding failed" exceptions:


Binding failed: Path=TextMessage, Source=null(''), Target=TextBlock(''), TargetProperty=TextBlock.Text
Binding failed: Path=ForegroundBrush, Source=null(''), Target=TextBlock(''), TargetProperty=TextElement.Foreground
Binding failed: Path=ColumnSpan, Source=null(''), Target=TextBlock(''), TargetProperty=Grid.ColumnSpan
Binding failed: Path=Column, Source=null(''), Target=TextBlock(''), TargetProperty=Grid.Column
Binding failed: Path=ForegroundBrush, Source=null(''), Target=TextBlock(''), TargetProperty=TextElement.Foreground

It seems these binding errors happens when NoesisGUI sets DataContext to null when disposing the item control (built from the ItemTemplate).

Regards!

Steps To Reproduce

You can use the latest game version from AtomicTorch.com (installed with our Game Launcher).
Enable "Developer mode" in the options and toggle the console (by default ~ key and we did something recently so it should work fine on most keyboard layouts now :-) ) and try to scroll it (so some console ItemsControl items will be disposed automatically by NoesisGUI). You can disable virtualization for this ItemsControl if needed - see key LogEntriesItemsControlStyle in the resource dictionary at "<game installation folder>\Core\Core.cpk\UI\Controls\Core\ConsoleControlResources.xaml".

If you need a debug game build I can provide it on the request.

PlatformAny

Activities

ai_enabled

ai_enabled

2018-06-27 08:24

updater   ~0005241

This also causes some noticeable micro-stuttering as all these string objects created and passed from C++ to C#.

Issue History

Date Modified Username Field Change
2018-06-27 07:12 ai_enabled New Issue
2018-06-27 08:24 ai_enabled Note Added: 0005241
2018-11-22 09:35 sfernandez Assigned To => sfernandez
2018-11-22 09:35 sfernandez Status new => resolved
2018-11-22 09:35 sfernandez Fixed in Version => 2.2.0b3
2018-11-22 09:35 sfernandez Target Version => 2.2.0
2018-11-22 09:35 sfernandez View Status private => public
2018-11-22 09:35 sfernandez Platform => Any