maui icon indicating copy to clipboard operation
maui copied to clipboard

fatal Exception: System.ArgumentNullException

Open sunilsolanki-alight opened this issue 1 year ago • 4 comments

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>)

sunilsolanki-alight avatar Aug 23 '24 12:08 sunilsolanki-alight

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:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] avatar Aug 23 '24 12:08 github-actions[bot]

@sunilsolanki-alight Could you provide us with a sample project so we can investigate it? Looking forward to your reply!

RoiChen001 avatar Aug 26 '24 09:08 RoiChen001

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

sunilsolanki-alight avatar Sep 05 '24 06:09 sunilsolanki-alight

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?

andos716 avatar Oct 24 '24 09:10 andos716

Something may have been collected. Are you doing anything to force handler collection - like calling DisconnectHandler?

mattleibow avatar Dec 05 '24 09:12 mattleibow

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

sunilsolanki-alight avatar Dec 05 '24 11:12 sunilsolanki-alight

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.

andos716 avatar Dec 05 '24 15:12 andos716

@PureWeen thoughts?

mattleibow avatar Dec 05 '24 16:12 mattleibow

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!

jfversluis avatar Feb 25 '25 11:02 jfversluis