Debugging COM object may not close DLLHOST (246195)



The information in this article applies to:

  • Microsoft Visual J++ 6.0

This article was previously published under Q246195
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

SYMPTOMS

If a Java-implemented Component Object Model (COM) object is set to run under the system surrogate (DLLHOST), the surrogate may not close after the COM object has been destroyed.

CAUSE

Visual J++ 6.0 creates the following registry entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Java VM\MSDebug

When this entry is set, the DLLHOST process is kept alive.

RESOLUTION

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
You can resolve this problem manually or programmatically. To resolve this problem manually, use the Registry Editor (Regedit.exe) to delete the following registry entry:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Java VM\MSDebug

To programmatically remove the registry entry, follow these steps:
  1. Copy the following code:
    import com.ms.wfc.app.*;
    public class DeleteKey
    {
       public static void main(String args[])
       {
          String key = "Software\\Microsoft\\Java VM\\MSDEBUG";
          RegistryKey hklm = Registry.LOCAL_MACHINE;
          if (hklm.getSubKey(key) != null)
          {
             hklm.deleteSubKey(key);
             System.out.println("Deleted MSDEBUG key.");
          }
          else
          {
             System.out.println("MSDEBUG key was not present.");
          }
       }
    }
    					
  2. At a command prompt, type the following command:

    jview DeleteKey

NOTE: Running the Visual J++ debugger again only adds this registry entry again.

REFERENCES

For support information about Visual J++ and the SDK for Java, visit the following Microsoft Web site:

Modification Type:MajorLast Reviewed:6/14/2006
Keywords:kbBug kbDebug kbJava kbprb KB246195