-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Crash - Previous page is torn down when going to next page. #11
Comments
This seems to be a problem on Android, too.
|
@cytoph this looks like a different issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I set up a minimal sample that is pretty close to my real application. It seemed like it worked in the sample app that it would wait for the pop before executing the tear down. However if you look at this it is tearing down my "equipmentlistpage" once it arrives on "equipmentdetailpage".
Reproduction Repo:
https://github.com/mruncola/DotnetMauiMemoryCrash
I added a toggle to change the navigation mechanism under the hood to use goto and push pop so you can see they both have similar results.
Push / Pop ----
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ElementForViewController(UIViewController viewController)
at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.NavDelegate.WillShowViewController(UINavigationController navigationController, UIViewController viewController, Boolean animated)
--- End of stack trace from previous location ---
at ObjCRuntime.Runtime.ThrowException(IntPtr gchandle) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 2594
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 60
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
at SadMemory.Program.Main(String[] args) in /DotnetMauiMemoryCrash/SadMemory/Platforms/iOS/Program.cs:line 13
2024-04-23 15:28:21.657004-0400 SadMemory[37997:4033394] Unhandled managed exception: Object reference not set to an instance of an object. (System.NullReferenceException)
at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ElementForViewController(UIViewController viewController)
at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.NavDelegate.WillShowViewController(UINavigationController navigationController, UIViewController viewController, Boolean animated)
--- End of stack trace from previous location ---
at ObjCRuntime.Runtime.ThrowException(IntPtr gchandle) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 2594
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 60
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
at SadMemory.Program.Main(String[] args) in /DotnetMauiMemoryCrash/SadMemory/Platforms/iOS/Program.cs:line 13
GoTo ----
2024-04-23 15:09:51.402746-0400 SadMemory[36835:4004936]
Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ElementForViewController(UIViewController viewController)
at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.NavDelegate.WillShowViewController(UINavigationController navigationController, UIViewController viewController, Boolean animated)
--- End of stack trace from previous location ---
at ObjCRuntime.Runtime.ThrowException(IntPtr gchandle) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 2594
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 60
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
at SadMemory.Program.Main(String[] args) in /DotnetMauiMemoryCrash/SadMemory/Platforms/iOS/Program.cs:line 13
2024-04-23 15:09:51.403406-0400 SadMemory[36835:4004936] Unhandled managed exception: Object reference not set to an instance of an object. (System.NullReferenceException)
at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.ElementForViewController(UIViewController viewController)
at Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRenderer.NavDelegate.WillShowViewController(UINavigationController navigationController, UIViewController viewController, Boolean animated)
--- End of stack trace from previous location ---
at ObjCRuntime.Runtime.ThrowException(IntPtr gchandle) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/ObjCRuntime/Runtime.cs:line 2594
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 60
at UIKit.UIApplication.Main(String[] args, Type principalClass, Type delegateClass) in /Users/builder/azdo/_work/1/s/xamarin-macios/src/UIKit/UIApplication.cs:line 94
at SadMemory.Program.Main(String[] args) in /DotnetMauiMemoryCrash/SadMemory/Platforms/iOS/Program.cs:line 13
The text was updated successfully, but these errors were encountered: