maui
maui copied to clipboard
fatal Exception: System.ArgumentNullException
Description
fatal Exception: System.ArgumentNullException
0 ??? 0x0 Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) (<unknown>)
1 ??? 0x0 Microsoft.Maui.Platform.ViewExtensions.ToHandler(IView view, IMauiContext context) (<unknown>)
2 ??? 0x0 Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.SetPageRenderer(Page page, ShellContent shellContent) (<unknown>)
3 ??? 0x0 Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.LoadRenderers() (<unknown>)
4 ??? 0x0 Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.ViewDidLoad() (<unknown>)
5 ??? 0x0 ObjCRuntime.Runtime.ThrowException(IntPtr ) (<unknown>)
6 ??? 0x0 UIKit.UIApplication.UIApplicationMain(Int32 , String[] , IntPtr , IntPtr ) (<unknown>)
7 ??? 0x0 UIKit.UIApplication.Main(String[] , Type , Type ) (<unknown>)
Steps to Reproduce
Random
Link to public reproduction project repository
No response
Version with bug
8.0.80 SR8
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
8.0.80 SR8
Affected platforms
iOS
Affected platform versions
17.5.1
Did you find any workaround?
Non-fatal Exception: System.ArgumentNullException
0 ??? 0x0 Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) (<unknown>)
1 ??? 0x0 Microsoft.Maui.Platform.ViewExtensions.ToHandler(IView view, IMauiContext context) (<unknown>)
2 ??? 0x0 Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.SetPageRenderer(Page page, ShellContent shellContent) (<unknown>)
3 ??? 0x0 Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.LoadRenderers() (<unknown>)
4 ??? 0x0 Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.ViewDidLoad() (<unknown>)
5 ??? 0x0 ObjCRuntime.Runtime.ThrowException(IntPtr ) (<unknown>)
6 ??? 0x0 UIKit.UIApplication.UIApplicationMain(Int32 , String[] , IntPtr , IntPtr ) (<unknown>)
7 ??? 0x0 UIKit.UIApplication.Main(String[] , Type , Type ) (<unknown>)
Relevant log output
Non-fatal Exception: System.ArgumentNullException
0 ??? 0x0 Microsoft.Maui.Platform.ElementExtensions.ToHandler(IElement view, IMauiContext context) (<unknown>)
1 ??? 0x0 Microsoft.Maui.Platform.ViewExtensions.ToHandler(IView view, IMauiContext context) (<unknown>)
2 ??? 0x0 Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.SetPageRenderer(Page page, ShellContent shellContent) (<unknown>)
3 ??? 0x0 Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.LoadRenderers() (<unknown>)
4 ??? 0x0 Microsoft.Maui.Controls.Platform.Compatibility.ShellSectionRootRenderer.ViewDidLoad() (<unknown>)
5 ??? 0x0 ObjCRuntime.Runtime.ThrowException(IntPtr ) (<unknown>)
6 ??? 0x0 UIKit.UIApplication.UIApplicationMain(Int32 , String[] , IntPtr , IntPtr ) (<unknown>)
7 ??? 0x0 UIKit.UIApplication.Main(String[] , Type , Type ) (<unknown>)
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Open similar issues:
- [iOS] NavigationPage InvalidCastException (#12208), similarity score: 0.77
Closed similar issues:
- NullPointer from ShellPageRendererTracker on iOS (#19505), similarity score: 0.78
- Random System.NullReferenceException .Net Maui app under macOS (#6645), similarity score: 0.77
- 'Microsoft.Maui.Platform.LayoutView' does not have a constructor that takes one NativeHandle argument (#22150), similarity score: 0.77
- Random crashes on iOS when navigating (#18153), similarity score: 0.77
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
@sunilsolanki-alight Could you provide us with a sample project so we can investigate it? Looking forward to your reply!
We are seeing this issue on firebase crashlytics. We don't have actual steps to recreate this issue. But we feel it is something MAUI internal error of MAUI Context null
We are seeing this issue on firebase crashlytics. We don't have actual steps to recreate this issue. But we feel it is something MAUI internal error of MAUI Context null
We are seeing this in our AppCenter logs as well but we have not been able to reproduce it. Does anyone have any ideas or suggestions on how to provoke this error?
Something may have been collected. Are you doing anything to force handler collection - like calling DisconnectHandler?
Something may have been collected. Are you doing anything to force handler collection - like calling DisconnectHandler?
No, we are not collecting and nor force DisconnectHandler
Something may have been collected. Are you doing anything to force handler collection - like calling DisconnectHandler?
No, we are not collecting and nor force DisconnectHandler
We are not explicitly calling DisconnectHandler either but we are replacing MainPage with different Shells in some occasions. I am curious if this something that you are doing as well as I suspect this might be causing this issue? Pure speculation from my part.
@PureWeen thoughts?
This report lacks details for this to be actionable, no reproduction and no real relevant code. As such I'll be closing this for now. If you uncover any more details that might be helpful in this case to reproduce it more structurally, please feel free to open something new providing those details. Thanks!