Repository navigation
Description
Describe the bug
Here goes nothing.
In the CI, we've hit ILT0005, and an out of memory error. Only WinUI 2 failed to build, and no app-affecting code was changed for this CI run.
error : ILT0005: 'C:\Users\runneradmin\.nuget\packages\runtime.win10-x64.microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\x64\ilc\Tools\nutc_driver.exe @"D:\a\Labs-Windows\Labs-
error : Error: NUTC300F:Internal Compiler Error: Native compilation failed due to out of memory error
I've seen this before - I've been having this issue in a project's CI for several months, and I've already spent 2 weeks researching and trying to fix this error.
This is the first time I've seen it happen in Labs, but if this is related, then it's more or less random and only present on mid to low-spec machines. It's not reproducible in a VM and it's going to happen more frequently the more code we put into Labs.
There are some mitigations that we can try anyway, but I'm not expecting it to be that easy.
Steps to reproduce
See https://github.com/CommunityToolkit/Labs-Windows/runs/7550122176?check_suite_focus=true
Expected behavior
A buildable repo should consistently pass CI
Screenshots
Code Platform
- UWP
- WinAppSDK / WinUI 3
- Web Assembly (WASM)
- Android
- iOS
- MacOS
- Linux / GTK
Windows Build Number
- Windows 10 1809 (Build 17763)
- Windows 10 1903 (Build 18362)
- Windows 10 1909 (Build 18363)
- Windows 10 2004 (Build 19041)
- Windows 10 20H2 (Build 19042)
- Windows 10 21H1 (Build 19043)
- Windows 11 21H2 (Build 22000)
- Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
- Windows 10, version 1809 (Build 17763)
- Windows 10, version 1903 (Build 18362)
- Windows 10, version 1909 (Build 18363)
- Windows 10, version 2004 (Build 19041)
- Other (specify)
Other SDK version
No response
Visual Studio Version
No response
Visual Studio Build Number
No response
Device form factor
No response
Additional context
No response
Help us help you
Yes, but only if others can assist.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
- StatusShow more project fields📋 Backlog

Activity
michael-hawker commentedon Aug 9, 2022
For CommunityToolkit/Labs-Windows#211 it was just a general exit code, but it may be the same thing. The guidance from the threads in dotnet/corert#5604 was to turn the 64-bit mode on for .NET Native. I tried that in CommunityToolkit/Labs-Windows#211 but then I think it causes issues with all the MSTest warnings we have about something that's misconfigured there.
Did you want to try just bringing over 92ecbc47988d76bc1057e96fda413a80f9abf6ce in a separate branch and seeing if you can add the missing dependencies (if that's the issue) to the test projects?
https://github.com/CommunityToolkit/Labs-Windows/runs/7735671450?check_suite_focus=true#step:9:16694
Arlodotexe commentedon Aug 10, 2022
@michael-hawker In case it helps, we discovered and applied a number of fixes in here (different project) that we could try.
michael-hawker commentedon Oct 27, 2022
Also see Sergio's comment here: CommunityToolkit/Labs-Windows#290 (comment)
Arlodotexe commentedon Oct 27, 2022
@michael-hawker This is one of the fixes I intended to try when I got time.
From here, any one of these could help us mitigate the error for now:
From past experience with this bug, I don't expect any of these to solve the problem permanently, but we can try them.
Arlodotexe commentedon Nov 17, 2022
In CommunityToolkit/Labs-Windows#211, we managed to make ILT0005 happen on every CI run. After investigating, we found:
[View CI run] ILT0005 happens every time when
<Use64BitCompiler>is applied tomainequivalent.[View CI run] ILT0005 only happens occasionally when
<Use64BitCompiler>is removed.michael-hawker commentedon Nov 17, 2022
@Arlodotexe
<Use64BitCompiler>was added afterwards to try and resolve the error though...Arlodotexe commentedon Nov 18, 2022
ILT0005 is an out of memory error, it could be that using the 64 bit compiler increased the memory used beyond the 4GB limit on 32-bit processes and caused the error to happen more often.
michael-hawker commentedon Mar 14, 2023
Hitting this a ton on CommunityToolkit/Labs-Windows#405, thought we had some of the flags enabled, but don't see them.
From @Sergio0694:
@Arlodotexe I think these caused other warnings to turn as errors at one point too which we had to resolve, but I'll try pushing a branch with just them enabled in the UWP props file and see what happens.
Attempt to mitigate #245 with .NET Native Compiler Memory Issue
Arlodotexe commentedon May 8, 2023
A workaround suggested by a member of the UWP Community (see here and here) seems to do what we need in the CI.
There are other variants of ILT0005 that can happen locally (involving PDB write errors), but these are no longer appearing in this project. We'll close this for now, if CommunityToolkit/Labs-Windows#431 passes.