How to debug a nutc_driver.exe Error : ILT0005 when building a UWP app in Release Mode with Net Native tool chain
Asked Answered
S

1

8

When building my UWP in Release mode with .Net Native tool chain I have the Following error:

Error : ILT0005: nutc_driver.exe […] returned exit code -1073741819

There is no other error message whatsoever so I feel clueless to try and solve that problem. How can I gather information about the problem? What could it be and how to verify?

Notes:

  • Microsoft.NETCore.UniversalWindowsPlatform is on version 6.2.8
  • It builds fine in Debug mode with Net Native tool chain checked
  • I don't think it's an out of memory issue as I have <Use64BitCompiler>true</Use64BitCompiler> and the build agent has 14Gb of RAM
  • Sally answered 13/11, 2019 at 21:21 Comment(7)
    If you comment the default runtime directive <Assembly Name="*Application*" Dynamic="Required All" /> in the Default.rd.xml file under Properties and build it again, will the same issue occur? There is a similar thread, you can check it.Crosseyed
    Tks for the link. It says to add what you suggest when the app is too big (exit code 2) to ignore some code. I dont have exit code 2.Wish
    You can choose Tools->options->Projects and Solutions->Build Run, and change the MSBuild project build output verbosity and MSBuild project build log file verbosity to Detailed. Then build it again. You will receive more detailed information in Output, please provide the error information for us. If the error is too long, you can put them in a file and provide it.Crosseyed
    I work on the .NET Native compiler. That exit code in HEX is (C000 0005) which maps to access violation. Would you be able to send me a repro? I can be reached at [email protected].Osmometer
    I have the same problem. Did you resolve this?Strasbourg
    I stopped building with .net native. It builds in a few minutes rather than more than an hour. At the end no user saw any differences in terms of app performance so what's the point to use it?Wish
    Got the same error code, any news on the resolution?Pitching
    S
    0

    This is a compiler bug. Exit code -1073741819 seems to be triggered by calling System.Linq.Enumerable.Select() on a collection of tuples of value types, and yielding a value type, in an ARM64 build. In my case the source was a IEnumerable<((StructType, StructType) (StructType, StructType))> (pairs of pairs).

    See this Microsoft issue for reference.

    It's a pretty specific failure for which I don't understand the exact conditions. In my experience, the build additionally would succeed on the build server but fail on dev machines, and also succeed in an x86 build.

    Search your code for references to Select, and when you have identified the culprit(s), rewrite them, for example by manually populating a new collection.

    Scandinavia answered 11/6 at 20:32 Comment(0)

    © 2022 - 2024 — McMap. All rights reserved.