You're booting up an older Windows machine — maybe a Windows XP or Windows 2000 box running a legacy app — and you get a blue screen with 0x000000B4 (ERROR_INVALID_SEGMENT_NUMBER). The system locks up hard. You might see it after installing an old ISA card or a DOS-based program that tries to access memory directly. I've seen this on Dell OptiPlex GX270s and IBM ThinkPad T40s when someone fires up a DOS extender or a 16-bit driver that doesn't understand the segment registers.
The root cause is simple: Windows encountered a segment number that doesn't map to any valid memory descriptor. In x86 protected mode, segments are referenced by selectors. If a program or driver loads a bad selector into the segment registers (CS, DS, ES, FS, GS, SS), or the descriptor table is corrupted, the CPU throws up its hands. This happens most often when a driver written for real mode or 16-bit OS tries to run in 32-bit protected mode. A corrupted GDT or LDT from bad RAM can also trigger it.
Step 1: Boot into Safe Mode
First, get to a known-good state. Restart the machine and tap F8 before Windows starts. Choose Safe Mode from the menu. If the error doesn't happen in Safe Mode, the problem is a driver or startup program. If it still crashes, skip to Step 5 — you likely have bad hardware.
Step 2: Uninstall recently added drivers
In Safe Mode, open Device Manager (right-click My Computer, select Properties, then Hardware tab, then Device Manager). Look for any devices with a yellow exclamation mark — especially legacy ones like serial ports, parallel ports, or ISA sound cards. Right-click and uninstall them. Then reboot normally. If the error's gone, you found the troublemaker.
For XP machines, I've seen this after installing a Creative Sound Blaster 16 driver that tries to use a real-mode mapper. Skip that — use the default Windows driver instead.
Step 3: Check for old DOS or 16-bit programs
If you're running a program that uses a DOS extender (like Phar Lap, DOS/4GW, or Thomas) and it gets the error, that's your culprit. These programs often load segment selectors directly. Open the shortcut properties for the program, go to the Screen tab, and try checking Full-screen instead of Windowed. That reduces the chance of a segment conflict.
Better yet, find a newer version of the software or run it inside a virtual machine like DOSBox.
Step 4: Run memory diagnostics
Bad RAM can corrupt the descriptor tables. Download MemTest86+ (free, boots from USB) and let it run for at least one full pass — that's about 2-4 hours depending on your RAM size. If you see any red errors, replace the faulty stick. I've seen this error trace back to a single bad DIMM in a Compaq Deskpro EN.
Step 5: Update or rollback BIOS
A buggy BIOS can mangle segment descriptors, especially in older systems with ACPI issues. Check the motherboard manufacturer's site for a BIOS update. On the flip side, if you recently updated the BIOS and the error started, rollback to the previous version. I had a customer with a Gateway E-4100 that got this error after a BIOS flash — rolling back fixed it instantly.
Step 6: Check for corrupted system files
If you can boot to a command prompt (from the Recovery Console or Windows PE), run:
sfc /scannowThat checks system file integrity. On Windows 2000, you'll need the installation CD. On XP, it's built in. If SFC finds bad files and can't fix them, you're looking at a reinstall or repair install.
What if it still fails?
If none of the above works, the motherboard itself may have a bad chipset or a failing memory controller. Try swapping the RAM into different slots — it's free and sometimes fixes subtle timing errors. Also, disconnect any unnecessary peripherals (especially anything with a DOS-mode driver). If the error remains, consider replacing the motherboard. I know that's drastic, but segment-level corruption that isn't driver-caused is almost always hardware at that point.