Open PramodMAUI opened 1 week ago
Could you provide us with a sample project so we can investigate it further? Looking forward to your reply!
I also recently had issues with this. I don't know how to reproduce but here are the two call stacks from Sentry:
@Zhanglirong-Winnie @jfversluis While navigating to Third page app crashes. Please find sample project here: https://github.com/PramodMAUI/iOSCrashWhenManipulatingStack/tree/main
Hi @Zhanglirong-Winnie Any update on this? Are you able to reproduce this issue?
We are having this same issue in our app. Would love to see an answer/solution. Will be migrating from Xamarin to MAUI for an app hosting millions of users in the next couple months.
Same error here. This is blocking our xamarin to MAUI migration launch
@PureWeen does this sound familiar?
We are seeing a lot of this in our MAUI app as well.
Same issue here - I've tried moving the RemovePage call to different places in the app but the error still pops up and crashes the app...
Description
Getting below exception in iOS app only:
{System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.Maui.Controls.Handlers.Compatibility.NavigationRenderer.ParentingViewController.WillMoveToParentViewController(UIViewController parent) at UIKit.UIApplication.UIApplicationMain(Int32 argc, String[] argv, IntPtr principalClassName, IntPtr delegateClassName) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 61 at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 96 at xxxxx.Mobile.Program.Main(String[] args
When I manipulate the navigation stack while loading another page, the application crashes. For example, suppose I have Page1 and Page2 in the navigation stack, and I navigate to Page3 from Page2. While initializing the Page3 object, I remove Page2 from the navigation stack. After Page3 finishes loading, the application crashes.
I tried removal of page from navigation stack on Mainthread.
Steps to Reproduce
When I manipulate the navigation stack while loading another page, the application crashes. For example, suppose I have Page1 and Page2 in the navigation stack, and I navigate to Page3 from Page2. While initializing the Page3 object, I remove Page2 from the navigation stack. After Page3 finishes loading, the application crashes.
Link to public reproduction project repository
No response
Version with bug
8.0.40 SR5
Is this a regression from previous behavior?
Yes, this used to work in Xamarin.Forms
Last version that worked well
No response
Affected platforms
iOS
Affected platform versions
iOS 16, iOS 17, iOS 18
Did you find any workaround?
No response
Relevant log output
No response