Xamarin Forms UWP crash on start up

0

Debug output including stack trace:

GLLDBG Permissions check SUCCEEDED ...

GLLDBG: PetUI Displaying C:\Users\india\AppData\Local\Packages\0c046c82-7c9c-41e1-b7aa-0c1798833708_1d3xttr4xanc4\LocalState\photos\img676e113a6a9d41aa82bd2af2a6dc6631.jpg

Exception thrown: 'System.ArgumentNullException' in System.Private.CoreLib.dll Exception thrown at 0x76EAA892 (KernelBase.dll) in PetDiary.UWP.exe: WinRT originate error - 0x80004003 : 'System.ArgumentNullException: Value cannot be null. at Xamarin.Forms.Platform.UWP.Platform.SetCurrent(Page newPage, Boolean popping, Boolean modal, Action completedCallback) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__7_0(Object state) at System.Threading.WinRTSynchronizationContextBase.Invoker.InvokeCore()'. onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!768325F0: (caller: 76795156) ReturnHr(1) tid(771c) 8007007E The specified module could not be found. Exception thrown at 0x76EAA892 (KernelBase.dll) in PetDiary.UWP.exe: WinRT originate error - 0x80004003 : 'Value cannot be null.'. onecore\com\combase\winrt\error\restrictederror.cpp(1016)\combase.dll!768325F0: (caller: 76795156) ReturnHr(2) tid(771c) 8007007E The specified module could not be found.

The crash ends up int the UnhandledException "handler" in the generated InitializeComponent function

        public void InitializeComponent()
    {
        if (_contentLoaded)
            return;

        _contentLoaded = true;
        DebugSettings.BindingFailed += (sender, args) =>
        {
            global::System.Diagnostics.Debug.WriteLine(args.Message);
        };
        UnhandledException += (sender, e) =>
        {
            if (global::System.Diagnostics.Debugger.IsAttached) 
                global::System.Diagnostics.Debugger.Break();  // <--- CRASH HERE!
        };

Any ideas? Does this look familiar? UWP is the bane of my existence... (I removed #if/#endif because the formatter complained)

c#
forms
xamarin
uwp
asked on Stack Overflow Jan 2, 2021 by Gary Lewis

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0