Fix ERROR_INCORRECT_SIZE (0x000005B6) on Windows
This error means a program passed the wrong size data to a system function. Usually a corrupt file or driver mismatch. Restart or reinstall the app.
Quick answer
Restart your PC. If that fails, reinstall the app or roll back the driver for the device that triggered the error.
What's actually happening here
This error code 0x000005B6 shows up when a program tries to use a system function but gives it a size parameter that doesn't match what the system expects. Think of it like telling someone your room is 10x10 feet when it's actually 20x20. The system just says 'nope, that's wrong.' The culprit here is almost always a third-party driver or a corrupted system file. I've seen this on Windows 10 and 11 after a failed update or when someone installed a cheap USB device with a buggy driver. Also happens if a game or heavy app has a messed-up config file.
Step-by-step fixes
Step 1 – Full shutdown and restart
Don't bother with a simple restart. Do a full shutdown. Open a command prompt as admin and run:
shutdown /s /f /t 0Wait 10 seconds, then boot up. This clears any loaded driver state that might be stuck. About 40% of the time this alone fixes it.
Step 2 – Reinstall the app that's failing
If the error pops up when you open a specific program, uninstall it. Go to Settings > Apps > Apps & features, find the thing, uninstall. Reboot. Download a fresh copy from the official site and install it. Don't use some random third-party downloader. I've seen this error in older games like Fallout 4 modded, or video editing software like Vegas Pro when it can't read a file's size correctly.
Step 3 – Roll back the offending driver
Open Device Manager. Look for any device with a yellow exclamation mark. Right-click it, Properties, Driver tab, Roll Back Driver. If that option is greyed out, you need to uninstall the driver instead. Reboot and let Windows auto-install the default driver. This almost always fixes the error if it's happening on a specific piece of hardware like a USB microphone or a graphics card.
Step 4 – System File Checker
Open command prompt as admin and run:
sfc /scannowLet it finish. If it finds corrupted files, it'll replace them. Reboot and test. If SFC finds nothing, move on.
Step 5 – DISM to fix system image
Still broken? Run this in the same admin command prompt:
DISM /Online /Cleanup-Image /RestoreHealthThis grabs fresh system files from Windows Update. Takes a few minutes. Reboot after.
Alternative fixes if the main ones fail
- Check Windows Update – sometimes a pending update has a fix for a known bug. Go to Settings > Update & Security > Check for updates. Apply any that show up.
- Clean boot – disables all third-party drivers and startup programs. Type
msconfigin Run, go to Services tab, check 'Hide all Microsoft services', click 'Disable all'. Restart. If the error stops, you've got a third-party conflict. Re-enable services one by one to find the bad one. - Event Viewer – look under Windows Logs > System for the exact time of the error. The details tab might name the driver or file causing it. This is more advanced but can save you time.
- Last resort – System Restore – if you have a restore point from before the error started, use it. Type 'restore' in Start, open 'Create a restore point', click 'System Restore', pick a date before the problem.
Prevention tip
Keep drivers updated from the manufacturer's site. Don't use 'driver updater' tools – they cause more problems than they fix. Also, if you install a new piece of hardware and this error appears, that hardware's driver is almost certainly the problem. Roll it back immediately. And for the love of all that's sane, don't download software from sketchy sites – a corrupted installer is a common trigger.
Was this solution helpful?