UWP App Crashes instantly when compiled with .net native
Asked Answered
Z

0

8

I have a UWP App who targets the FCU both as minimal and target version. When I debug everything is fine. Also when I compile in release mode. But when I activate .net native compiling the app crashes on startup with this message in the log:

The program '[19396] MoneyFox.UWP.exe' has exited with code -1073741511 (0xc0000139) 'Entry Point Not Found'.
Activation of the Windows Store app '57598ApplySolutionsSoftwa.MoneyFoxBeta_de8w9y82qfkbg!App' failed with error 'The app didn't start'.

I have Microsoft.NETCore.UniversalWindowsPlatform 6.0.2 installed which uses .net native 2.0.

I also created a new Blank UWP app and just added the references to my Core Projects. As soon as I added the references to MoneyFox.Business the app could no longer startup and crashes with the message above.

What could that be or how could I debug it?

EDIT: I did some further research. I checked out the last stable version and updated the target and minimal version of the app to FCU. As soon as that was done the same error appeared. So it seems it hast to do with the new SDK.

EDIT2: I went back to an older version of the code and went the path up to the newer version of the sdk and the Microsoft.NETCore.UniversalWindowsPlatform.

As long as I use Microsoft.NETCore.UniversalWindowsPlatform 5.3.4 it works fine. But when I update to version 6.0.2 and build it with .net native activated I get this exception directly on the startup:

Unhandled exception at 0x0F497A4C (mrt100_app.dll) in MoneyFox.Windows.exe: 0xC0000005: Access violation reading location 0x01189884.

It works in debug and in release as long as the .net native is not activated.

I tried to debug it with according to this post: https://blogs.msdn.microsoft.com/devops/2015/07/29/debugging-net-native-windows-universal-apps/

But the message is the same. I checked the Known Issues here: https://github.com/dotnet/core/blob/master/Documentation/ilcRepro.md

Based on that I tried to disable the SharedLibrary feature. After that I received the following error:

The program '[16184] MoneyFox.Windows.exe' has exited with code -1073741511 (0xc0000139) 'Entry Point Not Found'.
Activation of the Windows Store app '57598ApplySolutionsSoftwa.MoneyFoxBeta_de8w9y82qfkbg!App' failed with error 'The app didn't start'.

I created a .net native repo. But since it compiles fine I don't know if that is useful. In case it does help: https://1drv.ms/u/s!Ang3D30bKDOhpuooBKHoAlhCaz_8XQ

I also made a new branch: https://github.com/NPadrutt/MoneyFox.Windows/tree/FCU.

Zen answered 26/11, 2017 at 18:57 Comment(9)
Which project? I download your demo and test the project "MoneyFox.UWP" in release mode but cannot reproduce your issue.Flipflop
That's strange, it is that project. I tested it on two devices and do have the issue on both. Do you use any preview version of VS? Or just the latest stabel too?Zen
To be sure, you had .net native toolchain activated right?Zen
I tested it on the preview as well, without success. Also I reinstalled whole VS but still the same.Zen
I setup a VM with a new installed win10 to see if there is something wrong with my installations and downloaded the zip from the path above (github.com/NPadrutt/MoneyFox.Windows/tree/fixAmbigousReferences). Same result as descriped in my post: everything is fine in debug but the exception above on release with .net native..Zen
Final solution was to create a new project and copy the files over very carefully..Zen
Can you provide the Delta between the proj. files? What has changed within the new project file? I currently fight with the same issueEshman
@Zen do you have the project file differences (Delta)?Waxbill
Not with certainty. You can have a look at the change history on GitHub: github.com/NPadrutt/MoneyFox.Windows/commits/… I checked it before, but the only difference I found was an ItemGroup for the Resources, but I'm not sure that this is really the delta resulting from this.Zen

© 2022 - 2024 — McMap. All rights reserved.