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



The information in this article applies to:

  • Microsoft virtual machine, when used with:
    • the hardware: Intel x86
  • Microsoft SDK for Java 2.01
  • Microsoft Internet Explorer (Programming) 4.01
  • Microsoft Internet Explorer (Programming) 4.0

This article was previously published under Q188446

SYMPTOMS

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

CAUSE

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

RESOLUTION

To work around this problem, put 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 about Java developments at Microsoft, visit the following Microsoft Web site:

Modification Type:MinorLast Reviewed:11/17/2005
Keywords:kbbug kbfix KB188446