Unable to get installed UWP package to work - crashes on launch

SmartmanAppsSmartmanApps AUMember ✭✭✭
edited May 2019 in Xamarin.Forms

I commented on another thread - https://forums.xamarin.com/discussion/57179/uwp-immediate-crash-in-release-mode - and then realised it had an accepted answer, so may not get looked at as a result, so raising a new thread for this issue. The "accepted answer" for the other thread doesn't work for me (the only thing I haven't tried, from the whole thread in fact, is adding assemblies per some quoted links which are now no longer valid). Even trying it in debug mode doesn't work. App works fine in both Debug and Release in VS,but when I create an app package and try it from there the app crashes after starting, with
"Faulting module name: Windows.UI.Xaml.dll, version: 10.0.17763.404, time stamp: 0x5c3c199a
Exception code: 0xc000027b
Fault offset: 0x008dc0f1
Faulting process id: 0x1a64"

thanks,
Donald

Answers

  • SmartmanAppsSmartmanApps AUMember ✭✭✭

    I've been able to get it to work with a default Forms template project in Release, so the answers around assemblies seem to be on the right path (though as I said, the links in the other thread about assemblies are out of date).

  • JohnAppersonJohnApperson Member ✭✭

    Donald, I'm getting the same behavior and I've narrowed it down. In my case, it only happens when the app is running on a device (Surface tablet) that is in Tablet Mode. Just thought that might help since it took me way too long to figure out why it would work in Visual Studio but not on our production tablets.

  • SmartmanAppsSmartmanApps AUMember ✭✭✭

    @JohnApperson said:
    Donald, I'm getting the same behavior and I've narrowed it down. In my case, it only happens when the app is running on a device (Surface tablet) that is in Tablet Mode. Just thought that might help since it took me way too long to figure out why it would work in Visual Studio but not on our production tablets.

    Hey John,

    Sorry. I forgot to come back and update this before. In THIS case (i.e. different cause but same symptoms as another issue) it ended up being that you can't use the Essentials Clipboard anywhere other than the main thread, literally. i.e. even wrapping it in a BeginInvokeOnMainThread fails to fix it.

    From what you're saying it sounds like we now have at least 3 different causes with the same symptoms (the first time I ran into this was with ZXing renderer needing to be an included assembly. I kept thinking this issue must be another assembly that needs to be included, but it actually turned out to be that Clipboard only works in the main thread).

    I guess I'll leave this as unanswered though, and then we can update it with any further issues which also have the same cause...

    thanks,
    Donald.

  • JohnAppersonJohnApperson Member ✭✭

    Thanks for the reply, Donald. Agreed that the error seems to be a generic runtime failure. I learned that between XF 3.6 and 4.X that there is now a distinction between the Windows 10 tablet mode and desktop mode that didn't exist before. I had several OnIdiom/OnPlatform instances that didn't specify a 'tablet' value where a 'desktop' or 'phone' value was listed. On a MS Surface tablet, the upgrade to XF 4 caused the error until I specified the 'tablet' value where the 'desktop' value once sufficed.

    We're making plans to stop supporting UWP...

Sign In or Register to comment.