-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maui.Controls.Handlers.Compatibility.NavigationRenderer.ParentingViewController: Object reference not set to an instance of an object #25726
Comments
Could you provide us with a sample project so we can investigate it further? Looking forward to your reply! |
@Zhanglirong-Winnie @jfversluis While navigating to Third page app crashes. Please find sample project here: |
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... |
@Zhanglirong-Winnie Any update? We are a very large Xamarin app migrating to MAUI (#2 Free Medical app on the App Store on Top Charts this August). This is a big issue to be outstanding for the Microsoft team to be forcing users to migrate. |
This issue has been verified using Visual Studio 17.13 Preview 1(8.0.93 & 8.0.83 & 8.0.60 & 8.0.40). Can repro this issue on iOS platform. And 8.0.40 works fine. |
Sorry it's bit confusing. Do you mean in 8.0.40, the issue is not reproducible? @Zhanglirong-Winnie |
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
The text was updated successfully, but these errors were encountered: