Command
build
Is this a regression?
The previous version in which this bug was not present was
22.0.7
Description
Since @angular/build 22.1.0 our production build crashes intermittently on Windows with the native exit code -1073741819 (0xC0000005, an access violation).
The crash happens AFTER the build has fully finished. The bundle is written and all 266 routes are prerendered, then the node process dies 0.5 to 1.5 seconds later, on exit. The output on disk is complete and usable, only the exit code is non-zero, which fails our CI.
It is intermittent. On our CI 11 of 14 builds failed in the affected range, and locally we reproduced it 3 times in 15 runs (20 percent).
We isolated it to the builder version, measured on real CI from one branch with everything else identical:
| arm |
result |
@angular/build + @angular/cli + @angular-devkit/build-angular 22.1.0 |
3 of 3 runs crashed |
| the same three pinned back to 22.0.7 |
3 of 3 runs passed |
Fisher exact, one-sided, p = 0.05. @angular/core and the rest of the application stayed on 22.1.0 in both arms, so only the build packages differ.
Two candidates we ruled out with our own measurements:
- Rolldown chunk optimization. A crash occurred in a run where the rolldown binding was provably never loaded (we hooked
process.dlopen and counted zero rolldown loads), so NG_BUILD_OPTIMIZE_CHUNKS=0 does not avoid it.
- Worker count.
NG_BUILD_MAX_WORKERS=1 crashed immediately on CI, despite 10 clean local runs at that setting.
The surviving suspect on our side is oxc-parser 0.140.0, which 22.1.0 adds as a dependency and 22.0.7 does not have, together with the new src/tools/babel/plugins/oxc-transform.js pass that replaced the Babel-based advancedOptimizations plugins in 22.1.0. We could not name the failing module, Windows prints no native stack for this and we have not captured a crash dump yet.
Worth saying up front: we have NOT yet tested 22.1.1, 22.1.2 or 22.1.3, which bump oxc-parser to 0.142.0. We pinned to 22.0.7 because production deploys were blocked at the time. We will test 22.1.3 and report back in this issue.
Minimal Reproduction
We could not reduce this to a shareable repository. The crash needs a large production build (450+ lazy chunks, 266 prerendered routes) and it is intermittent, so a small project does not trigger it.
What we can state precisely:
ng build --configuration production, with prerendering and optimization enabled
- Windows, on self-hosted CI agents and on local Windows machines
- the build always completes first, the crash is on process exit
- reverting only
@angular/build, @angular/cli and @angular-devkit/build-angular to 22.0.7 removes it, with everything else unchanged
Happy to run an instrumented build or capture a crash dump if you tell us what would help most.
Exception or Error
No JavaScript error is printed. The build log ends like this:
Prerendered 266 static routes.
Application bundle generation complete. [79.530 seconds]
##[error]Cmd.exe exited with code '-1073741819'.
`-1073741819` is `0xC0000005`, a Windows access violation, so the process is killed at the native layer and there is no JavaScript stack to attach.
Your Environment
Angular CLI: 22.1.0
Node: 26.5.1
Package Manager: pnpm
OS: win32 x64
Angular: 22.1.0
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, router, ssr
Package Version
@angular-devkit/build-angular 22.1.0
@angular/build 22.1.0
@angular/cli 22.1.0
Anything else relevant?
No response
Command
build
Is this a regression?
The previous version in which this bug was not present was
22.0.7
Description
Since
@angular/build22.1.0 our production build crashes intermittently on Windows with the native exit code-1073741819(0xC0000005, an access violation).The crash happens AFTER the build has fully finished. The bundle is written and all 266 routes are prerendered, then the node process dies 0.5 to 1.5 seconds later, on exit. The output on disk is complete and usable, only the exit code is non-zero, which fails our CI.
It is intermittent. On our CI 11 of 14 builds failed in the affected range, and locally we reproduced it 3 times in 15 runs (20 percent).
We isolated it to the builder version, measured on real CI from one branch with everything else identical:
@angular/build+@angular/cli+@angular-devkit/build-angular22.1.0Fisher exact, one-sided, p = 0.05.
@angular/coreand the rest of the application stayed on 22.1.0 in both arms, so only the build packages differ.Two candidates we ruled out with our own measurements:
process.dlopenand counted zero rolldown loads), soNG_BUILD_OPTIMIZE_CHUNKS=0does not avoid it.NG_BUILD_MAX_WORKERS=1crashed immediately on CI, despite 10 clean local runs at that setting.The surviving suspect on our side is
oxc-parser0.140.0, which 22.1.0 adds as a dependency and 22.0.7 does not have, together with the newsrc/tools/babel/plugins/oxc-transform.jspass that replaced the Babel-basedadvancedOptimizationsplugins in 22.1.0. We could not name the failing module, Windows prints no native stack for this and we have not captured a crash dump yet.Worth saying up front: we have NOT yet tested 22.1.1, 22.1.2 or 22.1.3, which bump
oxc-parserto 0.142.0. We pinned to 22.0.7 because production deploys were blocked at the time. We will test 22.1.3 and report back in this issue.Minimal Reproduction
We could not reduce this to a shareable repository. The crash needs a large production build (450+ lazy chunks, 266 prerendered routes) and it is intermittent, so a small project does not trigger it.
What we can state precisely:
ng build --configuration production, with prerendering and optimization enabled@angular/build,@angular/cliand@angular-devkit/build-angularto 22.0.7 removes it, with everything else unchangedHappy to run an instrumented build or capture a crash dump if you tell us what would help most.
Exception or Error
Your Environment
Anything else relevant?
No response