microsoft/accessibility-insights-windows

Lots of debug warnings when running in IDE

DaveTryon opened this issue · 2 comments

Describe the bug
When starting a debug build of AIWin in the IDE, it generates a series of error messages. Customers won't see these warnings, but each warning has the potential to represent a customer-impacting issue, so they deserve to be investigated.

To Reproduce
Steps to reproduce the behavior:

  1. Run a debug build from within Visual Studio
  2. Look at the Output window
  3. Notice the data errors

Expected behavior
Data errors generally shouldn't happen

Actual behavior
The following errors are displayed (this is a filtered list to get just the errors that appear to be directly attributable to our code, with duplicates removed):

System.Windows.Data Error: 40 : BindingExpression path error: 'SnippetLink' property not found on 'object' ''MainWindow' (Name='')'. BindingExpression:Path=DataContext.SnippetLink; DataItem='StackPanel' (Name='spHowToFix'); target element is 'TextBlock' (Name='tbSnippetLink'); target property is 'NoTarget' (type 'Object')
System.Windows.Data Error: 40 : BindingExpression path error: 'projects' property not found on 'object' ''ConfigurationViewModel' (HashCode=45834852)'. BindingExpression:Path=projects; DataItem='ConfigurationViewModel' (HashCode=45834852); target element is 'TreeView' (Name='serverTreeview'); target property is 'ItemsSource' (type 'IEnumerable')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='-4' BindingExpression:Path=ActualWidth; DataItem='LiveModeControl' (Name='ctrlLiveMode'); target element is 'ColumnDefinition' (HashCode=25265097); target property is 'MaxWidth' (type 'Double')
System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Double' and 'System.Windows.GridLength'. Consider using Converter property of Binding. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=5180964); target property is 'Width' (type 'GridLength')
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=5180964); target property is 'Width' (type 'GridLength') ArgumentException:'System.ArgumentException: '*' is not a valid value for property 'Width'.
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   at MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   at System.Windows.Data.BindingExpression.UpdateSource(Object value)'
System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Double' and 'System.Windows.GridLength'. Consider using Converter property of Binding. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=32772220); target property is 'Width' (type 'GridLength')
Exception thrown: 'System.ArgumentException' in WindowsBase.dll
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=32772220); target property is 'Width' (type 'GridLength') ArgumentException:'System.ArgumentException: '*' is not a valid value for property 'Width'.
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   at MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   at System.Windows.Data.BindingExpression.UpdateSource(Object value)'
System.Windows.Data Error: 40 : BindingExpression path error: 'HowToFixText' property not found on 'object' ''MainWindow' (Name='')'. BindingExpression:Path=HowToFixText; DataItem='MainWindow' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Error: 40 : BindingExpression path error: 'HyperlinkText' property not found on 'object' ''MainWindow' (Name='')'. BindingExpression:Path=HyperlinkText; DataItem='MainWindow' (Name=''); target element is 'Run' (HashCode=13871385); target property is 'Text' (type 'String')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='-4' BindingExpression:Path=ActualWidth; DataItem='SnapshotModeControl' (Name='ctrlSnapMode'); target element is 'ColumnDefinition' (HashCode=45960129); target property is 'MaxWidth' (type 'Double')
System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Double' and 'System.Windows.GridLength'. Consider using Converter property of Binding. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=24374351); target property is 'Width' (type 'GridLength')
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=24374351); target property is 'Width' (type 'GridLength') ArgumentException:'System.ArgumentException: '*' is not a valid value for property 'Width'.
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   at MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   at System.Windows.Data.BindingExpression.UpdateSource(Object value)'
System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Double' and 'System.Windows.GridLength'. Consider using Converter property of Binding. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=42716703); target property is 'Width' (type 'GridLength')
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=42716703); target property is 'Width' (type 'GridLength') ArgumentException:'System.ArgumentException: '*' is not a valid value for property 'Width'.
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   at MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   at System.Windows.Data.BindingExpression.UpdateSource(Object value)'
System.Windows.Data Error: 40 : BindingExpression path error: 'HyperlinkText' property not found on 'object' ''MainWindow' (Name='')'. BindingExpression:Path=HyperlinkText; DataItem='MainWindow' (Name=''); target element is 'Run' (HashCode=49526440); target property is 'Text' (type 'String')
System.Windows.Data Error: 5 : Value produced by BindingExpression is not valid for target property.; Value='-4' BindingExpression:Path=ActualWidth; DataItem='EventModeControl' (Name='ctrlEventMode'); target element is 'ColumnDefinition' (HashCode=41640866); target property is 'MaxWidth' (type 'Double')
System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Double' and 'System.Windows.GridLength'. Consider using Converter property of Binding. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=14274382); target property is 'Width' (type 'GridLength')
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=14274382); target property is 'Width' (type 'GridLength') ArgumentException:'System.ArgumentException: '*' is not a valid value for property 'Width'.
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   at MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   at System.Windows.Data.BindingExpression.UpdateSource(Object value)'
System.Windows.Data Error: 1 : Cannot create default converter to perform 'two-way' conversions between types 'System.Double' and 'System.Windows.GridLength'. Consider using Converter property of Binding. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=36006428); target property is 'Width' (type 'GridLength')
System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=Width; DataItem='Grid' (Name=''); target element is 'ColumnDefinition' (HashCode=36006428); target property is 'Width' (type 'GridLength') ArgumentException:'System.ArgumentException: '*' is not a valid value for property 'Width'.
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at MS.Internal.Data.PropertyPathWorker.SetValue(Object item, Object value)
   at MS.Internal.Data.ClrBindingWorker.UpdateValue(Object value)
   at System.Windows.Data.BindingExpression.UpdateSource(Object value)'
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='System.Windows.Controls.Primitives.ToggleButton', AncestorLevel='1''. BindingExpression:(no path); DataItem=null; target element is 'Label' (Name=''); target property is 'Target' (type 'UIElement')
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=labelResults'. BindingExpression:(no path); DataItem=null; target element is 'ListView' (Name='lvDetails'); target property is 'LabeledBy' (type 'UIElement')

Screenshots or .GIF
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 11 22H2
  • Accessibility Insights for Windows Version: 1.1.2139.1
  • Target Application: n/a
  • Target Application Version: n/a

Additional context
Priority requested -
Add any other context about the problem here.

This issue has been marked as ready for team triage; we will triage it in our weekly review and update the issue. Thank you for contributing to Accessibility Insights!

Final errors were fixed in #1522, closing this as finished.