This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 163367 - MenuBar blocked for ages in waitFinished()
Summary: MenuBar blocked for ages in waitFinished()
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-22 11:24 UTC by Jaroslav Tulach
Modified: 2009-04-24 12:10 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This patch helps. I do not however claim it is the most nicest way to fix the problem. (2.30 KB, patch)
2009-04-22 11:46 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2009-04-22 11:24:58 UTC
Issue 163201 revealed that MenuBar can be blocked for a long time inside waitFinished() method. See full log at
http://www.netbeans.org/nonav/issues/showattachment.cgi/80568/dump-stack.txt
and seek for this part:

"AWT-EventQueue-1" prio=10 tid=0x080cd800 nid=0x4be7 in Object.wait() [0xb366c000..0xb366e0c0]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
	at java.lang.Object.wait(Native Method)
	- waiting on <0x6e28c748> (a org.openide.util.RequestProcessor$Task)
	at org.openide.util.Task.waitFinished(Task.java:158)
	- locked <0x6e28c748> (a org.openide.util.RequestProcessor$Task)
	at org.openide.util.RequestProcessor$Task.waitFinished(RequestProcessor.java:799)
	at org.openide.util.Task.waitFinished(Task.java:192)
	at org.openide.loaders.FolderInstance.waitFinished(FolderInstance.java:339)
	at org.openide.awt.MenuBar$LazyMenu$MenuFolder.waitFinishedSuper(MenuBar.java:623)
	at org.openide.awt.MenuBar$LazyMenu.doInitialize(MenuBar.java:581)
	at org.openide.awt.MenuBar$LazyMenu.stateChanged(MenuBar.java:555)
	at javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:333)
	at javax.swing.DefaultButtonModel.setMnemonic(DefaultButtonModel.java:274)
	at javax.swing.AbstractButton.setMnemonic(AbstractButton.java:1548)
	at org.openide.awt.Mnemonics.setMnemonic(Mnemonics.java:279)
	at org.openide.awt.Mnemonics.setLocalizedText2(Mnemonics.java:100)
	at org.openide.awt.Mnemonics.setLocalizedText(Mnemonics.java:137)
	at org.openide.awt.MenuBar$LazyMenu.updateProps(MenuBar.java:512)
	at org.openide.awt.MenuBar$LazyMenu.run(MenuBar.java:524)

This is unfortunate, as it is not only useless, but it provides bad visual experience to those who want to see 
progress on screen to be updated.
Comment 1 Jaroslav Tulach 2009-04-22 11:46:01 UTC
Created attachment 80681 [details]
This patch helps. I do not however claim it is the most nicest way to fix the problem.
Comment 2 Jiri Rechtacek 2009-04-22 12:21:23 UTC
I'm sorry. I'm afraid to apply this patch, I'm not skilled in tricks in openide enough. Anyway, it belongs to
openide.awt or openide.loaders. Anybody helps?
Comment 3 Stanislav Aubrecht 2009-04-22 14:47:47 UTC
jtulach, please integrate the patch yourself if you think there's no better way to fix #163201 - and take care of bugs
this patch may introduce, thanks
Comment 4 Jaroslav Tulach 2009-04-22 15:54:01 UTC
That is exactly what I cannot do, I am afraid. Maybe Tonda will advice what to do with bugs that nobody wants to fix.
Comment 5 Jaroslav Tulach 2009-04-24 12:10:39 UTC
Alas, similar patch must have been applied while fixing bug 163201