What is the ListDictionaryInternal Involved in UpdateMainPage()?

alaskanroguealaskanrogue USMember ✭✭✭
edited January 27 in Xamarin.Forms

I am encountering an error when assigning a new page to a class parameter. It appears that it has not been initialized and is null. What is it and how is it initialized? The code is in the PCL and has no problems in either Android or UWP.

<p>Object reference not set to an instance of an object</p><p>Data ----------</p><p>System.Collections.ListDictionaryInternal</p><p>HResult ----------</p><p>-2147467261</p><p>Source ----------</p><p>Xamarin.Forms.Platform.iOS</p><p>StackTrace ----------</p><p>  

at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.UpdateMainPage () [0x0000e] in d:\a\1\s\Xamarin.Forms.Platform.iOS\FormsApplicationDelegate.cs:198 \n at Xamarin.Forms.Platform.iOS.FormsApplicationDelegate.ApplicationOnPropertyChanged (System.Object sender, System.ComponentModel.PropertyChangedEventArgs args) [0x00012] in d:\a\1\s\Xamarin.Forms.Platform.iOS\FormsApplicationDelegate.cs:152 \n at Xamarin.Forms.BindableObject.OnPropertyChanged (System.String propertyName) [0x00000] in d:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:229 \n at Xamarin.Forms.Element.OnPropertyChanged (System.String propertyName) [0x00000] in d:\a\1\s\Xamarin.Forms.Core\Element.cs:353 \n at Xamarin.Forms.Application.set_MainPage (Xamarin.Forms.Page value) [0x0008b] in d:\a\1\s\Xamarin.Forms.Core\Application.cs:91

Best Answer

  • alaskanroguealaskanrogue US ✭✭✭
    Accepted Answer

    It appears that my Apple developer keys had expired, preventing me from testing the demo. I had recently rebuilt the debugging subsystem of the app to include UnhandledExceptions and UnobservedTaskException with logging. Finally able to the build and test the demo, the new subsystem caught the error in more detail which had to do with initialization of RootViewController. With that corrected, the app is operational. The transition to a .NET Core PCL completed. Problem resolved.

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    I am encountering an error when assigning a new page to a class parameter.

    How did you initialize this page on iOS? Could you please try to create a repo to help us reproduce this issue?

  • alaskanroguealaskanrogue USMember ✭✭✭
    edited January 27

    The initialization is a simple new of a Xamarin Forms content page. I spent most of the day try to create a repo but running into Apple app key issues. Will continue, but in the meantime can't the stack above allow you to determine the collection involved from the code?

  • LandLuLandLu Member, Xamarin Team Xamurai

    It only shows some regular behaviors during compiling.
    If it is a simple project you could remove the sensitive part including the key. We only need a basic part to help us reproduce this issue.

  • alaskanroguealaskanrogue USMember ✭✭✭
    Accepted Answer

    It appears that my Apple developer keys had expired, preventing me from testing the demo. I had recently rebuilt the debugging subsystem of the app to include UnhandledExceptions and UnobservedTaskException with logging. Finally able to the build and test the demo, the new subsystem caught the error in more detail which had to do with initialization of RootViewController. With that corrected, the app is operational. The transition to a .NET Core PCL completed. Problem resolved.

  • LandLuLandLu Member, Xamarin Team Xamurai

    Glad you solved it. Please mark it to end this discussion.

Sign In or Register to comment.