When You See This Error
You're trying to launch a program – maybe an old accounting app, a custom business tool, or even a Windows component – and it just fails with 0x000000CA: ERROR_INFLOOP_IN_RELOC_CHAIN. The exact message says "The operating system cannot run %1".
I see this most often after a botched update, a failed uninstall, or when someone tried to "patch" a DLL manually. Had a client last month whose entire print queue died because a corrupt winspool.drv relocation table caused this loop on every print job. The error's rare, but when it hits, it's a dead end for that executable.
What's Really Going On
Windows executables (PE files) have a relocation table – it's how the OS adjusts addresses when loading a DLL at a different base address than expected. Normally, each relocation entry points to a fixup location, and that's it. But a corrupt or malicious file can create a chain: relocation A points to relocation B, which points back to A. The loader sees an infinite loop and throws error 102 (0x66), which maps to 0x000000CA when surfaced as a system error.
Root causes are almost always:
- A manually patched or reverse-engineered DLL with a broken relocation table
- A virus that hijacked an EXE's import table, leaving circular references
- Corrupt disk sectors where the file's relocation data got scrambled
- A failed Windows update that left a half-written system file
Skip the registry edits and driver updates – they won't touch this. The fix is surgical: find the bad file, replace it.
Fix It in 4 Steps
Step 1: Identify the Bad File
First you need to know which file is causing the loop. If the error happens when launching a specific app, that's your target. If it's a boot-time crash (e.g., services fail to start), check the System Event Log:
- Open Event Viewer (
eventvwr.msc) - Go to Windows Logs > System
- Look for events with Source
Windows Error ReportingorApplication Popuparound the crash time - Find the file path listed in the event details – usually something like
C:\Windows\System32\something.dll
If the log doesn't show it, use Process Monitor from Sysinternals. Filter on Process Name = the crashing app and look for CreateFile operations that fail with BUILD ERROR or NAME NOT FOUND. The last successful load before the crash is often the culprit.
Step 2: Replace the Corrupted File
Once you know the file, replace it with a known-good copy. For system files (anything in C:\Windows):
- Run Command Prompt as Administrator
- Type
sfc /scannow– this will replace any corrupt protected system files - If SFC fails (it often does with relocation loop errors because the file can't be parsed), use DISM to repair the image first:
DISM /Online /Cleanup-Image /RestoreHealth
Then run SFC again. In most cases this fixes it. For a third-party app (like a custom business tool), reinstall the app from the original installer – don't copy from another machine unless you're sure the versions match.
Step 3: Check for Malware
If the file was modified by malware (you'll know because the file size changed or its signature doesn't match), the relocation loop might be intentional to break the loader. Run a full scan with Windows Defender offline or a bootable scanner like Kaspersky Rescue Disk. I've had to clean a few cryptolockers that did this to system DLLs to prevent recovery tools from running.
Step 4: Force a Copy from Windows Side-by-Side
If the file is in C:\Windows\WinSxS and SFC won't touch it (sometimes happens with .NET assemblies), use this trick:
- Find the file in
C:\Windows\WinSxS– there might be multiple versions - Identify the correct one by checking its version number (right-click > Properties > Details)
- Copy it to the target location:
copy C:\Windows\WinSxS\amd64_microsoft-windows-...\yourfile.dll C:\Windows\System32\yourfile.dll /y
The exact path varies, but you can search for the filename in WinSxS using dir /s yourfile.dll from an admin command prompt.
If It Still Fails
Three things to check after the fix:
- Pending file rename issues – Windows might still be holding the old copy in a pending delete. Reboot into Safe Mode and replace the file there.
- Antivirus false positive – Sometimes AV software (looking at you, McAfee) quarantines the replacement file because it detects the relocation table as suspicious. Temporarily disable real-time protection, replace the file, then re-enable.
- Disk corruption – If the file keeps getting re-corrupted, run
chkdsk c: /fto fix underlying disk errors. I had one case where a bad sector on an SSD kept corruptingkernel32.dllevery time it was written to. CHKDSK and a firmware update fixed it.
If none of that works, you're looking at a corrupt component store that needs a repair install of Windows (using Media Creation Tool's in-place upgrade). But that's the nuclear option – the steps above get it 9 times out of 10.