You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] DrawingView Error : PlatformView cannot be null here when used with BindableLayout (Android and iOS) #2320
Application crashes with PlatformView cannot be null here when drawing view is used inside bindable layout. app crashes while changing the item source of the bindable layout. This happens on both Android and iOS.
Error Started after upgrading to Microsoft.Maui.Controls 8.0.60+ (latest release 8.0.92 also has same problem.)
changed the title [-][BUG] Drawing View Error : PlatformView cannot be null here (Android and iOS)[/-][+][BUG] DrawingView Error : PlatformView cannot be null here (Android and iOS)[/+]on Nov 6, 2024
System.InvalidOperationException
PlatformView cannot be null here
void DrawingViewHandler.OnVirtualViewLinesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
In App
Assembly:
CommunityToolkit.Maui.Core
Version:
1.0.0.0
Called from: ObservableCollection.cs in void ObservableCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Show 3 more frames
void MauiDrawingViewExtensions.SetLines(IDrawingView drawingView, MauiDrawingView mauiDrawingView, IDrawingLineAdapter adapter)
In App
void DrawingViewHandler.OnPlatformViewLinesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
In App
Called from: ObservableCollection.cs in void ObservableCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Show 3 more frames
void MauiDrawingViewExtensions.SetLines(MauiDrawingView mauiDrawingView, IDrawingView drawingView)
In App
void DrawingViewHandler.MapLines(DrawingViewHandler handler, IDrawingView view)
In App
Called from: /_/src/Core/src/PropertyMapper.cs in void PropertyMapper<TVirtualView, TViewHandler>.Add(string key, Action<TViewHandler, TVirtualView> action)+(IElementHandler h, IElement v) => { }
Show 32 more frames
/_/MvvmHelpers/ObservableRangeCollection.cs in void ObservableRangeCollection.RaiseChangeNotificationEvents(NotifyCollectionChangedAction action, List changedItems, int startingIndex) at line 160:17
In App
/_/MvvmHelpers/ObservableRangeCollection.cs in void ObservableRangeCollection.ReplaceRange(IEnumerable collection) at line 140:4
In App
ViewModels\TestViewModel.cs in void TestViewModel.SetSection1Answers() at line 42:13
In App
ViewModels\TestViewModel.cs in void TestViewModel.RegisterCommands()+() => { } [0] at line 55:17
In App
Called from: /_/src/Controls/src/Core/Command.cs in Command(Action execute)+(object o) => { }
changed the title [-][BUG] DrawingView Error : PlatformView cannot be null here (Android and iOS)[/-][+][BUG] DrawingView Error : PlatformView cannot be null here when used with BindableLayout (Android and iOS)[/+]on Nov 7, 2024
Activity
[-][BUG] Drawing View Error : PlatformView cannot be null here (Android and iOS)[/-][+][BUG] DrawingView Error : PlatformView cannot be null here (Android and iOS)[/+]mahesh139 commentedon Nov 6, 2024
Exception Log:
System.InvalidOperationException
PlatformView cannot be null here
void DrawingViewHandler.OnVirtualViewLinesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
In App
Assembly:
CommunityToolkit.Maui.Core
Version:
1.0.0.0
Called from: ObservableCollection.cs in void ObservableCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Show 3 more frames
void MauiDrawingViewExtensions.SetLines(IDrawingView drawingView, MauiDrawingView mauiDrawingView, IDrawingLineAdapter adapter)
In App
void DrawingViewHandler.OnPlatformViewLinesCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
In App
Called from: ObservableCollection.cs in void ObservableCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
Show 3 more frames
void MauiDrawingViewExtensions.SetLines(MauiDrawingView mauiDrawingView, IDrawingView drawingView)
In App
void DrawingViewHandler.MapLines(DrawingViewHandler handler, IDrawingView view)
In App
Called from: /_/src/Core/src/PropertyMapper.cs in void PropertyMapper<TVirtualView, TViewHandler>.Add(string key, Action<TViewHandler, TVirtualView> action)+(IElementHandler h, IElement v) => { }
Show 32 more frames
/_/MvvmHelpers/ObservableRangeCollection.cs in void ObservableRangeCollection.RaiseChangeNotificationEvents(NotifyCollectionChangedAction action, List changedItems, int startingIndex) at line 160:17
In App
/_/MvvmHelpers/ObservableRangeCollection.cs in void ObservableRangeCollection.ReplaceRange(IEnumerable collection) at line 140:4
In App
ViewModels\TestViewModel.cs in void TestViewModel.SetSection1Answers() at line 42:13
In App
ViewModels\TestViewModel.cs in void TestViewModel.RegisterCommands()+() => { } [0] at line 55:17
In App
Called from: /_/src/Controls/src/Core/Command.cs in Command(Action execute)+(object o) => { }
[-][BUG] DrawingView Error : PlatformView cannot be null here (Android and iOS)[/-][+][BUG] DrawingView Error : PlatformView cannot be null here when used with BindableLayout (Android and iOS)[/+]Add device tests for platform-specific code, run them in CI, and fix …