VOGONS


First post, by eddman

User metadata
Rank Oldbie
Rank
Oldbie

For some reason it works with the regular dgVoodoo build, but CTDs with the debug build after the intros. I'm on Windows 11.

Reply 1 of 1, by Dege

User metadata
Rank l33t
Rank
l33t

It's not a dgVoodoo bug. dgVoodoo uses OutputDebugString to dump the debug messages. OutputDebugString relies on an exception-based implementation to transfer the string to the kernel.
If a debugger is present then the exception data is handed over to the debugger as a first-chance exception, and it is handled by the debugger and the game code continues running (that's why the _dbg version of dgVoodoo works with this game in a debugger).

However, when no debugger present (only DebugView), the exception intentionally generated by OutputDebugString causes Windows to walk the regular user mode SEH-chain on the game's stack.
Since that chain is already corrupted somewhere in the game, the walk triggers another exception (invalid SEH-chain) which ultimately crashes the game.