benjamin84 / fest

Automatically exported from code.google.com/p/fest
0 stars 0 forks source link

Exception: Event queue is blocked... #160

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1 Tried to speedup tests
1.1  robot.settings().eventMode(EventMode.AWT);
1.2 robot.settings().delayBetweenEvents(0);
1.3 robot.settings().eventPostingDelay(0);
2. run tests

What is the expected output? What do you see instead?
Expected -
Tests running fast as hell, without errors

See -
Sometimes getting 
org.fest.swing.exception.ActionFailedException: Event queue is blocked by
an active AWT PopupMenu
at
org.fest.swing.exception.ActionFailedException.actionFailure(ActionFailedExcepti
on.java:33)
    at org.fest.swing.core.AWTEventPoster.postEvent(AWTEventPoster.java:61)
    at
org.fest.swing.core.AWTEventPoster.verifyPostedEvent(AWTEventPoster.java:92)
    at org.fest.swing.core.AWTEventPoster.postEvent(AWTEventPoster.java:67)

I'm not sure, but probably it happens even while working with textbox (e.g.
textbox().enterText(...)

Please provide any additional information below.

Frequiently happens while:
1. JMenuItemFixture menuItem = ...
2. menuItem.requireVisible();
3. menuItem.click();

Original issue reported on code.google.com by filim...@gmail.com on 19 Jun 2008 at 6:54

GoogleCodeExporter commented 9 years ago
Tested several times : really not sure if this bug linked with robot.settings() 
or not.

Original comment by filim...@gmail.com on 19 Jun 2008 at 7:10

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
org.fest.swing.exception.ActionFailedException: Event queue is blocked by an 
active
AWT PopupMenu
    at
org.fest.swing.exception.ActionFailedException.actionFailure(ActionFailedExcepti
on.java:33)
    at org.fest.swing.core.AWTEventPoster.postEvent(AWTEventPoster.java:61)
    at org.fest.swing.core.RobotFixture.type(RobotFixture.java:447)
    at org.fest.swing.core.RobotFixture.enterText(RobotFixture.java:434)
    at org.fest.swing.driver.JTextComponentDriver.enterText(JTextComponentDriver.java:97)
    at
org.fest.swing.fixture.JTextComponentFixture.enterText(JTextComponentFixture.jav
a:165)

How to reproduce :

1. slow computer
2. type looooong text in non focued window using 
JTextComponentFixture.enterText(...)
3. in parallel make cpu consuming task (play with scollbar using mouse, 
zip/unzup, etc.)

Original comment by filim...@gmail.com on 19 Jun 2008 at 7:24

GoogleCodeExporter commented 9 years ago

  public static boolean isAWTPopupMenuBlocking() {
    // Abbot: For now, just do a quick check to see if a PopupMenu is active on w32.
Extend it if we find other common
    // situations that might block the EDT, but for now, keep it simple and
restricted to what we've run into.
    return /* Bugs.showAWTPopupMenuBlocks() && */isAWTTreeLockHeld();
  }

Bugs.showAWTPopupMenuBlocks()

Probably should be uncommended, and introduced ability to configure
Bugs.showAWTPopupMenuBlocks().

Thanks!

Original comment by filim...@gmail.com on 19 Jun 2008 at 1:37

GoogleCodeExporter commented 9 years ago
Wow! Thank you so much for the detailed explanation! It'll make it a lot easier 
to fix :)

BTW, can you please send me your name to alex.ruiz.05 at gmail.com. I'd like to 
add
to you the contributors list.

Original comment by Alex.Rui...@gmail.com on 19 Jun 2008 at 2:29

GoogleCodeExporter commented 9 years ago
Hi Filimono,

Looking at the code, 'Bugs.showAWTPopupMenuBlocks()' is always true. 
Uncommenting it
will not fix the bug. I think the problem is setting the value to 0. I think 
the bug
is to discover a minimum value that will let the test run without problems. 
Thoughts?

Thanks!
-Alex

Original comment by Alex.Rui...@gmail.com on 19 Jul 2008 at 4:04

GoogleCodeExporter commented 9 years ago
Am i right: it is old version java bug and it is not reproducible in 1.6 
anymore? So
why not remove that showAWTPopupMenuBlocks() check?

Original comment by filim...@gmail.com on 23 Jul 2008 at 4:16

GoogleCodeExporter commented 9 years ago
Set the module as a label, instead of being part of the title.

Original comment by Alex.Rui...@gmail.com on 1 Dec 2008 at 2:04

GoogleCodeExporter commented 9 years ago
We'll address this issue in version 1.1.

Original comment by Alex.Rui...@gmail.com on 4 Dec 2008 at 6:02

GoogleCodeExporter commented 9 years ago
Hello,

I am kind of new to the Fest thing.
I have been using FEST for a couple of weeks
I just saw the following:

1. JMenuItemFixture menuItem = ...
2. menuItem.requireVisible();
3. menuItem.click();

And I am facing a hang (no exception apparently).
I moved to RC1, same punishment :(
I tried a lot of things and I am kind of stuck.
Any workaround I can apply to get out of this?

I am on a Mac Java 1.5.

Original comment by bertrand...@hotmail.com on 31 Dec 2008 at 12:01

GoogleCodeExporter commented 9 years ago
Hi Bertrad,

I've been having trouble reproducing this bug. I'd help a lot if you could 
please
send me a test case reproducing this defect. My e-mail address is alex.ruiz.05 
at
gmail.com. If I can reproduce it, I'll have this fixed before we release 1.0.

Many thanks,
-Alex

Original comment by Alex.Rui...@gmail.com on 31 Dec 2008 at 8:13

GoogleCodeExporter commented 9 years ago
I apologize I misspelled your name :(

Original comment by Alex.Rui...@gmail.com on 31 Dec 2008 at 8:24

GoogleCodeExporter commented 9 years ago

Original comment by Alex.Rui...@gmail.com on 5 Feb 2009 at 4:58

GoogleCodeExporter commented 9 years ago

Original comment by Alex.Rui...@gmail.com on 5 Feb 2009 at 5:01

GoogleCodeExporter commented 9 years ago
Closing this issue. AWT mode is no longer supported. In addition, I never got a 
test
case to reproduce this issue.

Original comment by Alex.Rui...@gmail.com on 14 Feb 2009 at 11:57