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
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.)
mahesh139
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)
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) => { }
mahesh139
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)
Nov 7, 2024
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
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.)
Please find Git repo that produces same error:
https://github.com/mahesh139/MAUIBugs
This was working fine with Microsoft.Maui.Controls 8.0.40
Expected Behavior
Changing bindable layout item source that contains drawing view must not crash.
Steps To Reproduce
Hope this video helps with re-production steps:
https://github.com/user-attachments/assets/ec693e41-b910-4d36-9d4c-12a6f7489072
Link to public reproduction project repository
https://github.com/mahesh139/MAUIBugs
Environment
Anything else?
Same repo works fine for:
CommunityToolkit.Maui 9.0.0
Microsoft.Maui.Controls 8.0.40
Microsoft.Maui.Controls.Compatibility 8.0.40
The text was updated successfully, but these errors were encountered: