FIX: AFC Deadlock May Occur When Setting UIFrame's Cursor.

ID: Q188446


The information in this article applies to:
  • Microsoft Win32 Virtual Machine
    on the following platforms: x86
  • Microsoft SDK for Java, version 2.01
  • Microsoft Internet Explorer (Programming) versions 4.0, 4.01


SYMPTOMS

AFC UIFrame may deadlock when using the setCursor() method.


CAUSE

The deadlock occurs because UIFrame.setCursor() is not properly synchronized.


RESOLUTION

To work around this problem, place your calls to setCursor() in a synchronized block.


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been corrected in Internet Explorer 4.01 SP1.


MORE INFORMATION

The UIComponent class has a getTreeLock() method that should be used when you need to synchronize the underlying AWT component. UIFrame derives from UIComponent; therefore, you can use this method to make a thread-safe call to setCursor(). Here is an example:


   synchronized (uiFrame.getTreeLock()) {
     uiFrame.setCursor(Cursor.HAND_CURSOR);
   } 


REFERENCES

For more information on UIFrame and UIComponent, see the Microsoft SDK for Java documentation available at the following Web site:

http://www.microsoft.com/java/sdk/

Additional query words: setCursor synchronized kbJAFC

Keywords :
Version : WINDOWS:2.01,4.0,4.01
Platform : WINDOWS
Issue type : kbbug


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