Microsoft KB Archive/128896

= Exceptions in a service causes the Just-In-Time (JIT) debugger not to appear, and the computer stops responding =

Article ID: 128896

Article Last Modified on 9/30/2005

-

APPLIES TO

 The Integrated Debugger, when used with:  Microsoft Visual C++ 2.0 Professional Edition

 Microsoft Visual C++ 2.1

 Microsoft Visual C++ 4.0 Standard Edition

 Microsoft Visual C++ 5.0 Enterprise Edition</li></ul>

 Microsoft Visual C++ 6.0 Enterprise Edition</li></ul>

 Microsoft Visual C++ 5.0 Professional Edition</li></ul>

 Microsoft Visual C++ 6.0 Professional Edition</li></ul>

 Microsoft Visual C++ 6.0 Standard Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q128896

<div class="symptoms_section">

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

If a process that is running in a different context, such as a service, causes an access violation or another exception in Microsoft Windows NT 3.5, the dialog box appears. However, the debugger never appears, and the process causes the computer to stop responding (hang).

<div class="cause_section">

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 also cannot interact with the debugger.

<div class="resolution_section">

RESOLUTION
Beginning with version 3.5 of Windows NT, you can allow a service to interact with the desktop. To do this, use one of the following methods:
 * Use the SERVICE_INTERACTIVE_PROCESS flag when you call CreateService.
 * Follow these steps:
 * In Control Panel, open Services.
 * Select the service, click Startup, and then click to select Allow Service to Interact with Desktop.

<div class="status_section">

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

Additional query words: hung WorkBench

Keywords: kbtshoot kbbug kbide kbdebug kbprb KB128896

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.