PRB: Exception in Service Causes JIT Debugger to Hang Computer

ID: Q128896


The information in this article applies to:
  • The Integrated Debugger, included with:
    • Microsoft Visual C++, 32-bit Editions, versions 2.0, 2.1, 4.0, 5.0, 6.0


SYMPTOMS

When Just-In-Time (JIT) debugging is enabled in Visual C++, applications that cause exceptions (debuggees) bring up a dialog that will allow you to start the debugger.

If a process running in a different context, such as a Service, causes an access violation or another exception under Windows NT version 3.5, the dialog appears, but the debugger never comes up and the process causes the computer to hang (stop responding).


CAUSE

When Windows NT starts the debugger after a fault, it runs in the same context as the application that faulted. Many services run in the LocalSystem account, which does not have access to the user desktop by default. Because the process cannot interact with the desktop, the debugger cannot either.


RESOLUTION

Beginning with version 3.5 of Windows NT, you can allow a Service to interact with the desktop. There are two ways to do this:

  • Use the SERVICE_INTERACTIVE_PROCESS flag when calling CreateService().


  • -or-
  • Start the Services control panel applet. Select the service, press the Startup button, and choose Allow Service to Interact with Destop.



STATUS

This behavior is by design in Windows NT 3.1 and 3.5. This problem does not occur under Windows NT 3.51.

Additional query words: hung hang WorkBench

Keywords : kbDebug kbide kbVC200 kbVC210 kbVC400 kbVC500 kbVC600
Version : winnt:2.0,2.1,4.0,5.0,6.0
Platform : winnt
Issue type : kbprb


Last Reviewed: July 15, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.