Picker Attribute "SelectedIndex" Not being respected on page load - fix #22353
Build #8.0.70-ci+pr.22353.azdo.117425 had test failures
Details
- Failed: 32 (0.09%)
- Passed: 34,317 (99.33%)
- Other: 200 (0.58%)
- Total: 34,549
Annotations
Check failure on line 82682 in Build log
azure-pipelines / MAUI-public
Build log #L82682
PowerShell exited with code '1'.
Check failure on line 80009 in Build log
azure-pipelines / MAUI-public
Build log #L80009
PowerShell exited with code '1'.
Check failure on line 1 in Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.DoubleSet
azure-pipelines / MAUI-public
Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.DoubleSet
System.NullReferenceException : Object reference not set to an instance of an object.
Raw output
at Microsoft.Maui.Controls.Picker.ClampSelectedIndex() in /_/src/Controls/src/Core/Picker/Picker.cs:line 344
at Microsoft.Maui.Controls.Picker.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /_/src/Controls/src/Core/Picker/Picker.cs:line 245
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Microsoft.Maui.LockableObservableListWrapper.InternalAdd(String item) in /_/src/Core/src/Primitives/LockableObservableListWrapper.cs:line 58
at Microsoft.Maui.LockableObservableListWrapper.Add(String item) in /_/src/Core/src/Primitives/LockableObservableListWrapper.cs:line 64
at Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.<>c.<.cctor>b__8_180() in /_/src/Controls/tests/Core.UnitTests/NotifiedPropertiesTests.cs:line 127
at Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.PropertyTestCase`2.CreateView() in /_/src/Controls/tests/Core.UnitTests/NotifiedPropertiesTests.cs:line 51
at Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.DoubleSet(PropertyTestCase property) in /_/src/Controls/tests/Core.UnitTests/NotifiedPropertiesTests.cs:line 202
at InvokeStub_NotifiedPropertiesTests.DoubleSet(Object, Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
azure-pipelines / MAUI-public
Microsoft.Maui.Controls.Core.UnitTests.PickerTests.TestSelectedIndexOutOfRangeUpdatesSelectedItem
Assert.Equal() Failure: Values differ
Expected: Lemon
Actual: null
Raw output
at Microsoft.Maui.Controls.Core.UnitTests.PickerTests.TestSelectedIndexOutOfRangeUpdatesSelectedItem() in /_/src/Controls/tests/Core.UnitTests/PickerTests.cs:line 151
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
azure-pipelines / MAUI-public
Microsoft.Maui.Controls.Core.UnitTests.PickerTests.TestSelectedIndexInRange
System.NullReferenceException : Object reference not set to an instance of an object.
Raw output
at Microsoft.Maui.Controls.Picker.ClampSelectedIndex() in /_/src/Controls/src/Core/Picker/Picker.cs:line 344
at Microsoft.Maui.Controls.Picker.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /_/src/Controls/src/Core/Picker/Picker.cs:line 245
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Microsoft.Maui.LockableObservableListWrapper.InternalAdd(String item) in /_/src/Core/src/Primitives/LockableObservableListWrapper.cs:line 58
at Microsoft.Maui.LockableObservableListWrapper.Add(String item) in /_/src/Core/src/Primitives/LockableObservableListWrapper.cs:line 64
at Microsoft.Maui.Controls.Core.UnitTests.PickerTests.TestSelectedIndexInRange() in /_/src/Controls/tests/Core.UnitTests/PickerTests.cs:line 76
at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
Check failure on line 1 in Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.Set
azure-pipelines / MAUI-public
Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.Set
System.NullReferenceException : Object reference not set to an instance of an object.
Raw output
at Microsoft.Maui.Controls.Picker.ClampSelectedIndex() in /_/src/Controls/src/Core/Picker/Picker.cs:line 344
at Microsoft.Maui.Controls.Picker.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e) in /_/src/Controls/src/Core/Picker/Picker.cs:line 245
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Microsoft.Maui.LockableObservableListWrapper.InternalAdd(String item) in /_/src/Core/src/Primitives/LockableObservableListWrapper.cs:line 58
at Microsoft.Maui.LockableObservableListWrapper.Add(String item) in /_/src/Core/src/Primitives/LockableObservableListWrapper.cs:line 64
at Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.<>c.<.cctor>b__8_180() in /_/src/Controls/tests/Core.UnitTests/NotifiedPropertiesTests.cs:line 127
at Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.PropertyTestCase`2.CreateView() in /_/src/Controls/tests/Core.UnitTests/NotifiedPropertiesTests.cs:line 51
at Microsoft.Maui.Controls.Core.UnitTests.NotifiedPropertiesTests.Set(PropertyTestCase property) in /_/src/Controls/tests/Core.UnitTests/NotifiedPropertiesTests.cs:line 183
at InvokeStub_NotifiedPropertiesTests.Set(Object, Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)