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 36266 - [JDK1.5.0] Menu pushing doesn't work in SHORTCUT mode on JDK1.5.0
Summary: [JDK1.5.0] Menu pushing doesn't work in SHORTCUT mode on JDK1.5.0
Status: CLOSED FIXED
Alias: None
Product: qa
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@qa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-24 15:52 UTC by Jiri Skrivanek
Modified: 2011-02-17 09:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
jemmy log (4.97 KB, text/plain)
2003-09-24 15:53 UTC, Jiri Skrivanek
Details
Test case (730 bytes, text/plain)
2003-09-24 15:54 UTC, Jiri Skrivanek
Details
Java application to test popup menu failure. (12.44 KB, application/octet-stream)
2003-10-16 17:06 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2003-09-24 15:52:51 UTC
Majority of tests executed on JDK1.5.0-b20 failed
because menu pushing timed out (see attached log).
It is not clear why it fails but it happens when a
modal dialog is opened before.
To reproduce try to run attached test case in
NetBeans by internal executor. It doesn't work in
SHORTCUT mode on LINUX. It works on windows, on
JDK1.4.2 and in QUEUE mode.
Comment 1 Jiri Skrivanek 2003-09-24 15:53:29 UTC
Created attachment 11706 [details]
jemmy log
Comment 2 Jiri Skrivanek 2003-09-24 15:54:31 UTC
Created attachment 11707 [details]
Test case
Comment 3 Milan Kubec 2003-09-30 13:11:46 UTC
This issue is becomming very important since we want run our automated
tests on JDK 1.5.0 to assure IDE compatibility and also as a part of
JDK CAP program. Is there any new info. Thanks.
Comment 4 Alexandre Iline 2003-10-01 02:50:38 UTC
Yet, I did not find what the root of the problem is. 
Menu seems ignoring some events if previously (just before that) 
some other menu operation was performed. 
 I'll provide the corect fix as soon as I find out what that  
"just before" means. 
 
Meanwile, I've added several QueueTool.waitEmpty(), which seems to 
make tests kinda more stable. Then, for this particular problem 
I've changed WindowOperator.close() to actually wait for window to be 
closed. These makes second menu operation passing correctly. I does  
not help to pass first menu operation after second though. 
 
Please try to use 2.2.4.dev version (from the top of trunk) to see 
if the changes help. 
 
If not, temporarily - until I find what's the problem is, you have 
to use APIJMenuDriver - it seems to be working stable: 
org.netbeans.jemmy.drivers.DriverManager.setMenuDriver(new 
org.netbeans.jemmy.drivers.menus.APIJMenuDriver()); 
 
 
Anyway - let me know if it helps. 
 
Comment 5 Jiri Skrivanek 2003-10-03 09:17:43 UTC
Use of APIJMenuDriver helps to solve problems with pushing main menu.
There exist tests which failed on "Menu pushing" but it is not as many
as before.
But now tests failed with message "Wait Popup menu loaded".
Comment 6 Alexandre Iline 2003-10-16 04:52:31 UTC
Last trunk changes (2.2.4.2) contain possible workaround. 
 
Could you, please, try it? 
 
Still do not know what is the real problem, but calling 
QueueTool.waitEmpty() several time one after enother (three is 
enough) allows to execute the test 1000 times. 
 
Still I am able to reproduce the problem _only_ for 1.5 _and_ Linux 
_and_ Gnome. Do you see it for other patforms? 
 
 
Comment 7 Jiri Skrivanek 2003-10-16 17:05:02 UTC
Previously attached test case works well both on windows and linux for
me. But with jemmy 2.2.4.2 doesn't work popup menu pushed by jemmy. It
doesn't work only on Linux/Gnome both in SHORTCUT and QUEUE
dispatching model. I will attach standalone java application which
demonstrates the failure. Run it by command:

java -cp "testPopup.zip:jemmy.jar" TestPopup15
Comment 8 Jiri Skrivanek 2003-10-16 17:06:22 UTC
Created attachment 11890 [details]
Java application to test popup menu failure.
Comment 9 Alexandre Iline 2003-10-20 06:44:36 UTC
That seems to be a different problem from reported originally. 
 
Anyway, if you modify one methid in MenuTestFrame1: 
    private void jTextArea1MousePressed(java.awt.event.MouseEvent 
evt) {//GEN-FIRST:event_jTextArea1MousePressed 
        JemmyProperties.getCurrentOutput().printLine("" + 
evt.isPopupTrigger() + ": " + evt); 
        if (evt.isPopupTrigger()) { 
            jPopupMenu1.show(evt.getComponent(), evt.getX(), 
evt.getY()); 
            JemmyProperties.getCurrentOutput().printLine("MUST BE 
SHOWN BY NOW!"); 
        } 
    }//GEN-LAST:event_jTextArea1MousePressed 
 
you will see that JPopupMenu.show(Component, int, int) _get_ 
executed: 
true: java.awt.event.MouseEvent[MOUSE_PRESSED,(194,137),...] on 
javax.swing.JTextArea[,0,0,388x274,...] 
MUST BE SHOWN BY NOW! 
 
 
So this is not, really, bug in jemmy. We only can talk about  
workaround, which I can not think of, as of right now.  
 
I leave the issue opened for now - until I figure out a good 
workaround or solution. 
 
 
Comment 10 Jiri Skrivanek 2003-10-20 11:34:54 UTC
The popup menu problem was filed as issue 4940253 against JDK1.5.
What next with the main menu problem? It is somehow worked around in
Jemmy and it seems it works. So, is it also a bug in JDK or is is
possible to find any permanent solution in Jemmy?
Comment 11 Milan Kubec 2003-12-16 13:26:09 UTC
What's the status of this issue as the main bug in JDK has been
already fixed?
Comment 12 Jiri Skrivanek 2003-12-16 13:36:28 UTC
Not yet verified.
Comment 13 Jiri Skrivanek 2004-01-14 13:06:45 UTC
Bug 4940253 against JDK1.5 has been resolved. I verified it with
JDK1.5.0-b33. It means there should not be any problem in Jemmy.
Comment 14 Jiri Skrivanek 2004-01-14 13:07:10 UTC
Verified.