'Privileged instruction'.

Rainer Schuetze r.sagitario at gmx.de
Mon May 27 06:52:03 UTC 2019



On 25/05/2019 21:28, Amex wrote:
> First-chance exception: 0xc0000096: Privileged instruction
> Unhandled exception: 0xc0000096: Privileged instruction
> 
> Since this error only occurs in VS and not when running the app from the
> command line, surely these is a VS/VD issue?

No. The D runtime disables catching the (custom) exception for the stack
trace when running in a debugger. This allows you to analyze the call
stack of unhandled exceptions in the debugger.

Unfortunately, there is currently no way to re-enable that catch, only
to disable it for regular execution. If you have a long running process
you can attach to it after program start, that will result in the
unhandled exception being shown.

The next release of Visual D will show the exception type and message
(and the location if available) in the output window along with the
"Priviledged instruction" messages. I hope to be able to release a beta
in the next couple of days.


More information about the Digitalmars-d-ide mailing list