| Previous | Next |
| ERROR_ATOMIC_LOCKS_NOT_SUPPORTED | ERROR_INVALID_ORDINAL |
ERROR_INVALID_SEGMENT_NUMBER
What ERROR_INVALID_SEGMENT_NUMBER means
ERROR_INVALID_SEGMENT_NUMBER is Win32 system error code associated with the documented message: “The system detected a segment number that was not correct.” The significant condition is that the executable or compatibility subsystem supplied a segment reference that is outside the image’s valid segment table.
Likely causes
- the legacy executable is corrupt or incompletely copied
- a loader patcher or packer produced inconsistent segment-table references
- the binary targets a different historical execution format than the active compatibility layer supports
Troubleshooting steps
- hash the executable and compare it with a known-good copy
- Inspect the NE/LE/LX segment table with a format-aware parser
- remove binary patching, compression, or compatibility shims and reproduce with the original image
Code-specific investigation notes
Legacy segment indexes are interpreted according to the executable format, so PE-only inspection tools can miss the relevant table entirely. Use an NE, LE, or LX aware parser as appropriate.
The invalid reference may reside in an entry point, relocation, import thunk, or resource record. Record which loader phase fails to narrow the table that should be inspected.
If only one distributed copy fails, treat transport or patch corruption as more likely than a platform-wide compatibility problem.
Difference from related errors
It identifies a bad segment-table reference, whereas ERROR_INVALID_ORDINAL identifies a bad exported-function ordinal.
References
Looking for a different code? Search another status or error code.
