CommunityToolkit / CommunityToolkit/Tooling-Windows-Submodule

ILT0005 Out of memory when building release mode

Open
#9 9 comments 0 reactions 1 assignee Claimed by @Arlodotexe View on GitHub
bug :bug: CI/pipeline 🔬
Dominant language
C#
Stars
55
Forks
19
Avg merge
40m
Merged PRs (30d)
1

Description

### Describe the bug

Here goes nothing.

[In the CI](https://github.com/CommunityToolkit/Labs-Windows/runs/7550122176?check_suite_focus=true), 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](https://github.com/Arlodotexe/strix-music/pull/184) 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

```text
See https://github.com/CommunityToolkit/Labs-Windows/runs/7550122176?check_suite_focus=true
```

### Expected behavior

A buildable repo should consistently pass CI

### Screenshots

![image](https://user-images.githubusercontent.com/9384894/181666303-4a34b2a5-f9d1-4c23-bb4f-6df7ef16d4b5.png)

### 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.