Blog Archives

Fix Edge Crash After Update

Two days ago I was browsing with Edge, suddenly it started crashing out of blue. There was no Windows update, no system settings change, Edge just started showing the site crash page. Few minutes later, I could not open Edge anymore, not even got to see the site error page.

Since I didn’t make any system change, this might be caused by an update to Edge itself; looking at program list, it does appear Edge updated itself to 109.0.1518.78 right before the crash.

I didn’t give it too much thought, maybe it is a bad update, Microsoft will release a new version/patch soon. Two days later, there is no update, still cannot open Edge, searching internet didn’t reveal other people having similar issue from 109.0.1518.78, so it must be something unique to my machine. Time to dig in.

Solutions I tried (in the order) and failed:

  • Rename Edge profiles folder: maybe the crash was caused by something in bookmarks, browsing history, or even extensions; so I tried rename Edge profile folders, but crash remains;
  • Repair Edge: from Apps and Features, there is an option of Repair Edge; unfortunately it failed with Installer error 106; reboot and try repair again didn’t help;
  • Force Uninstall: then I tried to uninstall Edge; unfortunately it also failed due to same crash;

Now I decided to take a deeper look, to investigate the activities from Edge right before it crashed. The best tool for that job would be Windows Performance Recorder, but since it would require me to install Windows SDK, I decided to use Process Monitor first, simpler to use, besides it doesn’t require install.

Process Monitor helped me find the culprit quicker than expected, the trace shows right before msedge.exe crashed, it was trying to load msedge.dll, many of read operations failed with error 0xC0000242:

Decode 0xC0000242 with certutil:

C:>certutil -error 0xc0000242
0xc0000242 (NT: 0xc0000242 STATUS_BAD_COMPRESSION_BUFFER) -- 3221226050 (-1073741246)
Error message text: The specified buffer contains ill-formed data.
CertUtil: -error command completed successfully.

I took a look at C:\Program Files (x86)\Microsoft\Edge\Application\109.0.1518.78\msedge.dll, although it has embedded digital signature, viewing the signature in File Explorer shows Windows couldn’t verify it:

So the theory is that msedge.dll on hard disk is corrupted, causing crash from msedge.exe. I need to find a good copy to replace it.

Fortunately Edge keeps a copy of the installer along with the version installed, I found C:\Program Files (x86)\Microsoft\EdgeUpdate\Download{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}\109.0.1518.78\MicrosoftEdge_X64_109.0.1518.78.exe, which apparently is the full installer of Edge version 109.0.1518.78. It also looks like to be a self-extract 7-Zip executable, as it can be opened with 7-zip, I was able to find a copy of msedge.dll inside it:

I extracted msedge.dll from the installer, looked at its digital signature in File Explorer, Windows was able to verify it:

I replaced C:\Program Files (x86)\Microsoft\Edge\Application\109.0.1518.78\msedge.dll (which causes 0xc0000242 in ReadFile as well as digital signature verification failure) with the one from C:\Program Files (x86)\Microsoft\EdgeUpdate\Download{56EB18F8-B008-4CBD-B6D2-8C97FE7E9062}\109.0.1518.78\MicrosoftEdge_X64_109.0.1518.78.exe (can be opened with 7-Zip), the crash goes away, Edge runs normally with all existing data intact.

How did original msedge.dll got corrupted in the first place? Was it a software bug caused by Edge update process, or it is a hardware failure, like from the 3-years old SSD?

Before replacing msedge.dll, I renamed it to msedge_bad.dll so I could look into it further. Trying to access the file confirmed it is not accessible, although this time certutil reported a NT status code STATUS_IN_PAGE_ERROR:

C:\Program Files (x86)\Microsoft\Edge\Application\109.0.1518.78>certutil -hashfile .\msedge_bad.dll sha256
CertUtil: -hashfile command FAILED: 0xc0000006 (NT: 0xc0000006 STATUS_IN_PAGE_ERROR)
CertUtil: The instruction at 0x%p referenced memory at 0x%p. The required data was not placed into memory because of an I/O error status of 0x%x.

It is interesting that compact.exe shows it is actually compressed:

C:\Program Files (x86)\Microsoft\Edge\Application\109.0.1518.78>compact .\msedge_bad.dll

240089032 : 137281536 = 1.7 to 1 X msedge_bad.dll
Of 1 files within 1 directories
1 are compressed and 0 are not compressed.
240,089,032 total bytes of data are stored in 137,281,536 bytes.
The compression ratio is 1.7 to 1.

Still no conclusion yet, but I am happy Edge no longer crashes and will monitor the SSD status going forward.