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 119409 - IllegalComponentStateException using drop down page locator
Summary: IllegalComponentStateException using drop down page locator
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: Other All
: P2 blocker (vote)
Assignee: Stanislav Aubrecht
URL: http://statistics.netbeans.org/except...
Keywords: RANDOM
: 119159 122025 129756 157731 158435 165327 (view as bug list)
Depends on:
Blocks: 114075
  Show dependency tree
 
Reported: 2007-10-18 20:40 UTC by _ krystyna
Modified: 2009-10-10 04:43 UTC (History)
23 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 516


Attachments
stacktrace (1.84 KB, text/plain)
2008-04-07 12:45 UTC, tboerkel
Details
stacktrace (1.92 KB, text/plain)
2008-04-29 16:57 UTC, fernando_martines
Details
stacktrace (1.92 KB, text/plain)
2008-05-13 19:31 UTC, jww2nc
Details
stacktrace (1.92 KB, text/plain)
2008-05-29 04:07 UTC, dcherk
Details
stacktrace (1.92 KB, text/plain)
2008-06-24 05:05 UTC, dcherk
Details
stacktrace (1.92 KB, text/plain)
2009-02-17 06:42 UTC, saeed_z_f
Details
stacktrace (1.92 KB, text/plain)
2009-06-19 10:56 UTC, cbulcu
Details
stacktrace (1.92 KB, text/plain)
2009-06-30 18:27 UTC, adam_myatt
Details
stacktrace (1.92 KB, text/plain)
2009-08-31 14:05 UTC, cbulcu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ krystyna 2007-10-18 20:40:17 UTC
NetBeans IDE 6.0 Beta 2 (Build 200710181000)
XP
JDK1.6.03

This may not belong to designer, just starting here.
I noticed that the exception reporter has captured reports
from Aug, Sep, and Oct but is "uncategorized" hence no bug was
ever filed. See: http://statistics.netbeans.org/exceptions/detail.do?id=1474
for several scenarios.


to reproduce

1. clean userdir
2. create vw ee5 project. page 1 is in design view but blank (no components dropped).
3. from the drop down locator, switch to the start page

>exception to log

java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1800)
        at java.awt.Component.getLocationOnScreen(Component.java:1774)
        at javax.swing.plaf.basic.BasicToolBarUI$Handler.mouseDragged(BasicToolBarUI.java:1176)
        at java.awt.Component.processMouseMotionEvent(Component.java:6086)
        at javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3283)
        at java.awt.Component.processEvent(Component.java:5807)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4003)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
        at java.awt.Container.dispatchEventImpl(Container.java:2102)
        at java.awt.Window.dispatchEventImpl(Window.java:2429)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Peter Zavadsky 2007-10-18 23:49:21 UTC
I can't reproduce this case. Also do those other cases indicate that it happens when switching between other windows
than start page and the designer?

Only thing which is for sure, is that it is about some toolbar component (see the stack trace), just don't know which one.
Comment 2 _ krystyna 2007-10-19 00:04:07 UTC
Not limited to navigating to start page, but thta is frequent. See the 
statistics link for other scenarios: sometimes if faces-config.xml is
navigated to...designer to java source.. 
Comment 3 Peter Zavadsky 2007-10-19 20:49:22 UTC
Ah, so not always is the designer involved. It means, that it might be about other toolbar (the designer one is same
like any other views), passing to window sys.
Comment 4 David Simonek 2007-10-22 08:21:32 UTC
pzavadsky, why winsys? Do you see one single winsys class in the call stack? Me not...I think it's not right that core
team is automatically made responsible for all exceptions coming from Swing.

Anyway passing to Standa, perhaps he can do something with this.

Krystyna, on which platforms it happens? I see "XP" in your report but "OS" field is set to "All"?!
Comment 5 Stanislav Aubrecht 2007-10-22 08:27:00 UTC
> Not limited to navigating to start page, but thta is frequent. See the 
> statistics link for other scenarios: sometimes if faces-config.xml is
> navigated to...designer to java source.. 

my understanding is that it happens when switching from vwp editor to other windows - not just the start page. please
evaluate at your end first.
Comment 6 novakm 2007-10-22 10:26:34 UTC
*** Issue 119159 has been marked as a duplicate of this issue. ***
Comment 7 Peter Zavadsky 2007-10-22 21:07:13 UTC
My understanding is that it is not connected to the visual web designer (see also the duplicate issue, there are faces
config editors, not the designer). 

Also the only toolbar designer provides is the one window system uses (via TopComponent#getToolbarRepresentation, .. see
visualweb/designer/jsf/../JsfTopComponent.getToolbarRepresentation). I.e. it is in control of winsys after it is passed
to it. There doesn't seem to be anything special in its implementation.

Passing back to window sys.
Comment 8 Stanislav Aubrecht 2007-10-23 11:58:14 UTC
> My understanding is that it is not connected to the visual web designer (see also the duplicate issue, there are faces
> config editors, not the designer). 

yes, i was thinking that the user switched from designer to config editor but that's probably just my poor command of
english:)
anyway, as winsys doesn't do anything special for designer when switching topcomponents it'll be a bit hard to fix
Comment 9 Stanislav Aubrecht 2007-10-23 16:08:04 UTC
i'm sorry but i wasn't able to reproduce this issue.
pls try to provide better steps to reproduce
Comment 10 _ krystyna 2007-10-23 18:35:29 UTC
I'm sorry but I keep seeing this and just easily reproduced this on XP, 

This is what I did:

1. create a plain web application project (lets call it WebApp1) 
2. create a visual web project ee5  (lets call it Web App2) 
3. added a page to WebApp1 project (cascading style sheet)
4. click on web. xml from project view WebApp1/Configuration Files to open that page
(start to switch now using page locator; maybe that is a factor) 
5. next select page1 tab (of  WebApp2) and context menu on background 
   and select Page Navigation which loads faces-config.xml in multiviewer 
6. using page locator, switch to index.jsp
>Got the exception

In this scenario, start page was not one of the pages in the list as I  had unchecked the page
but perhaps it had something to do with the fact that there were 5 pages in multiviewer, and 
not all the tabs could fit into the viewport.
etBeans IDE Dev (Build 200710220000)
Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b02

java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1800)
        at java.awt.Component.getLocationOnScreen(Component.java:1774)
        at javax.swing.plaf.basic.BasicToolBarUI$Handler.mouseReleased(BasicToolBarUI.java:1162)
        at java.awt.Component.processMouseEvent(Component.java:6038)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5803)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4410)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
        at java.awt.Container.dispatchEventImpl(Container.java:2102)
        at java.awt.Window.dispatchEventImpl(Window.java:2429)
        at java.awt.Component.dispatchEvent(Component.java:4240)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
[catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

Comment 11 _ krystyna 2007-10-23 19:45:35 UTC
And I just reproduced it again on 
NetBeans IDE Dev (Build 200710231200)
using just a plain web project, opening the web.xml,
switching between it and the start page.


Comment 12 Stanislav Aubrecht 2007-10-24 14:23:21 UTC
many thanks for the extra info but i still can't reproduce this bug
Comment 13 _ krystyna 2007-10-24 18:39:28 UTC
And you are using the same JDK 1.6.0_3 ?
Comment 14 Stanislav Aubrecht 2007-10-30 10:45:52 UTC
just to make sure i'm reproducing your steps correctly - the 'dropdown page locator' is the 'down-arrow' button at the
upper right corner of the editor area, right?
Comment 15 Stanislav Aubrecht 2007-11-18 16:48:49 UTC
*** Issue 122025 has been marked as a duplicate of this issue. ***
Comment 16 Alexander Kouznetsov 2007-11-19 09:54:14 UTC
Encountered it many times. Usually have many profiler snapshots opened and use drop-down to switch between them and
other windows.
Comment 17 David Simonek 2008-03-11 16:10:42 UTC
*** Issue 129756 has been marked as a duplicate of this issue. ***
Comment 18 tboerkel 2008-04-07 12:45:16 UTC
Build: NetBeans IDE 6.0 (Build 200711261600)
VM: Java HotSpot(TM) Client VM, 10.0-b19
OS: Windows XP, 5.1, x86

User Comments: 
Comment 19 tboerkel 2008-04-07 12:45:20 UTC
Created attachment 59767 [details]
stacktrace
Comment 20 Lukas Hasik 2008-04-10 21:23:52 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 21 Exceptions Reporter 2008-04-23 02:00:28 UTC
This issue has already 20 duplicates 
Comment 22 fernando_martines 2008-04-29 16:57:35 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.6.0_02-b05, Java(TM) SE Runtime Environment, 1.6.0_02-b05
OS: Windows XP, 5.1, x86

User Comments: 
Comment 23 fernando_martines 2008-04-29 16:57:43 UTC
Created attachment 60811 [details]
stacktrace
Comment 24 jww2nc 2008-05-13 19:31:01 UTC
Created attachment 61348 [details]
stacktrace
Comment 25 Exceptions Reporter 2008-05-25 15:30:26 UTC
This issue has already 20 duplicates 
Comment 26 dcherk 2008-05-29 04:07:24 UTC
Created attachment 62095 [details]
stacktrace
Comment 27 dcherk 2008-06-24 05:05:57 UTC
Created attachment 63310 [details]
stacktrace
Comment 28 Stanislav Aubrecht 2008-07-31 12:25:56 UTC
wild shot fix attempt - please reopen if still reproducible

5a97a0852d78
Comment 29 Quality Engineering 2008-08-01 04:14:15 UTC
Integrated into 'main-golden', available in build *200808010201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/5a97a0852d78
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #119409 - mouseReleased events sometime sent to non-showing components
Comment 30 Exceptions Reporter 2008-10-16 15:08:17 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 200810150201)
http://statistics.netbeans.org/exceptions/detail.do?id=128943
Comment 31 Stanislav Aubrecht 2009-02-03 10:49:53 UTC
*** Issue 157731 has been marked as a duplicate of this issue. ***
Comment 32 Stanislav Aubrecht 2009-02-12 13:00:42 UTC
*** Issue 158435 has been marked as a duplicate of this issue. ***
Comment 33 saeed_z_f 2009-02-17 06:42:32 UTC
Build: NetBeans IDE Dev (Build 200812180001)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows XP, 5.1, x86

User Comments: 


Stacktrace: 
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1828)
        at java.awt.Component.getLocationOnScreen(Component.java:1802)
        at javax.swing.plaf.basic.BasicToolBarUI$Handler.mouseReleased(BasicToolBarUI.java:1162)
        at java.awt.Component.processMouseEvent(Component.java:6134)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5899)
Comment 34 saeed_z_f 2009-02-17 06:42:38 UTC
Created attachment 77055 [details]
stacktrace
Comment 35 cbulcu 2009-06-19 10:56:51 UTC
Build: NetBeans IDE 6.7 RC3 (Build 200906142201)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows XP, 5.1, x86

User Comments: 
trying to copy-paste from a JPanel to another a few components

Stacktrace: 
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1943)
        at java.awt.Component.getLocationOnScreen(Component.java:1917)
        at javax.swing.plaf.basic.BasicToolBarUI$Handler.mouseReleased(BasicToolBarUI.java:1162)
        at java.awt.Component.processMouseEvent(Component.java:6263)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6028)
Comment 36 cbulcu 2009-06-19 10:56:57 UTC
Created attachment 83798 [details]
stacktrace
Comment 37 adam_myatt 2009-06-30 18:27:07 UTC
Build: NetBeans IDE 6.7 (Build 200906241340)
VM: Java HotSpot(TM) Client VM, 11.2-b01, Java(TM) SE Runtime Environment, 1.6.0_12-b04
OS: Windows XP, 5.1, x86

User Comments: 
running profiler on a Java web app. 

Stacktrace: 
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1896)
        at java.awt.Component.getLocationOnScreen(Component.java:1870)
        at javax.swing.plaf.basic.BasicToolBarUI$Handler.mouseReleased(BasicToolBarUI.java:1162)
        at java.awt.Component.processMouseEvent(Component.java:6216)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5981)
Comment 38 adam_myatt 2009-06-30 18:27:17 UTC
Created attachment 84204 [details]
stacktrace
Comment 39 Exceptions Reporter 2009-08-31 13:52:42 UTC
This issue already has 204 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=516
Comment 40 cbulcu 2009-08-31 14:05:31 UTC
Build: NetBeans IDE 6.7.1 (Build 200907230233)
VM: Java HotSpot(TM) Client VM, 14.2-b01, Java(TM) SE Runtime Environment, 1.6.0_16-b01
OS: Windows Vista, 6.0, x86

User Comments: 


Stacktrace: 
java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
        at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1943)
        at java.awt.Component.getLocationOnScreen(Component.java:1917)
        at javax.swing.plaf.basic.BasicToolBarUI$Handler.mouseReleased(BasicToolBarUI.java:1162)
        at java.awt.Component.processMouseEvent(Component.java:6263)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
        at java.awt.Component.processEvent(Component.java:6028)
Comment 41 cbulcu 2009-08-31 14:05:36 UTC
Created attachment 86853 [details]
stacktrace
Comment 42 Stanislav Aubrecht 2009-08-31 15:37:55 UTC
can QE help with reproducing this issue pls?
Comment 43 Stanislav Aubrecht 2009-09-07 13:26:08 UTC
i still can't reproduce this problem but probable cause is that the popup list showing all opened documents reacts to
mouse_pressed events and hides itself at that time. so when user clicks into the list then mouse_released event *may* be
forwarded to the component below the popup list. and if the timing is 'right' that component might be hidden before that
even because the popup switched to a different document.

i tried fixing this in core-main d8d500e647b0
Comment 44 Stanislav Aubrecht 2009-09-07 15:03:07 UTC
*** Issue 165327 has been marked as a duplicate of this issue. ***
Comment 45 Quality Engineering 2009-09-11 21:47:46 UTC
Integrated into 'main-golden', will be available in build *200909111401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/d8d500e647b0
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #119409 - opened documents popup list should react to mouse-clicked events instead of mouse-pressed