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 114075 - Click in output window as os shifts focus to browser throws exception
Summary: Click in output window as os shifts focus to browser throws exception
Status: RESOLVED DUPLICATE of bug 137370
Alias: None
Product: platform
Classification: Unclassified
Component: Output Window (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker (vote)
Assignee: t_h
URL:
Keywords: REGRESSION
Depends on: 119409 129756
Blocks:
  Show dependency tree
 
Reported: 2007-08-29 06:19 UTC by _ tboudreau
Modified: 2008-12-22 14:52 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2007-08-29 06:19:53 UTC
I remember fixing this (or at least surpressing the exception) in the old button of CloseButtonTabbedPane.  It's an event-ordering problem that Swing does 
not handle well.

The code to deal with this should already be in cvs history in output2's version of CloseButtonTabbedPane and should be simple to port.

java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
	at java.awt.Component.getLocationOnScreen_NoTreeLock(Component.java:1678)
	at java.awt.Component.getLocationOnScreen(Component.java:1652)
	at javax.swing.JPopupMenu.show(JPopupMenu.java:950)
	at org.netbeans.core.output2.Controller.postPopupMenu(Controller.java:896)
	at org.netbeans.core.output2.OutputWindow.postPopupMenu(OutputWindow.java:259)
	at org.netbeans.core.output2.OutputTab.postPopupMenu(OutputTab.java:154)
	at org.netbeans.core.output2.OutputPane.postPopupMenu(OutputPane.java:65)
	at org.netbeans.core.output2.ui.AbstractOutputPane.mousePressed(AbstractOutputPane.java:534)
	at org.netbeans.core.output2.OutputPane.mousePressed(OutputPane.java:148)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222)
	at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
	at java.awt.Component.processMouseEvent(Component.java:5551)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3126)
	at java.awt.Component.processEvent(Component.java:5319)
	at java.awt.Container.processEvent(Container.java:2010)
	at java.awt.Component.dispatchEventImpl(Component.java:4021)
	at java.awt.Container.dispatchEventImpl(Container.java:2068)
	at java.awt.Component.dispatchEvent(Component.java:3869)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3933)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3866)
	at java.awt.Container.dispatchEventImpl(Container.java:2054)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3869)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Milos Kleint 2007-09-11 11:50:18 UTC
not output related, output2 now uses the shared CloseButtonTabbedPane from openide/awt.
reassigning
Comment 2 David Simonek 2007-09-11 16:39:52 UTC
Tim, could you write steps for reproduction, if they exists?

I searched old CloseButtonTabbedPane in cvs history and didn't find any code that catches mentioned exception. Only code
I found is
 protected void processMouseEvent (MouseEvent me) {
        try {
            super.processMouseEvent (me);
        } catch (ArrayIndexOutOfBoundsException aioobe) {
            //Bug in BasicTabbedPaneUI$Handler:  The focusIndex field is not
            //updated when tabs are removed programmatically, so it will try to
            //repaint a tab that's not there
            Exceptions.attachLocalizedMessage(aioobe,
                                              "Suppressed AIOOBE bug in BasicTabbedPaneUI"); //NOI18N
            Logger.getAnonymousLogger().log(Level.WARNING, null, aioobe);
        }

starting at line 360, but I guess it's not the right piece.

Anyway, passing to Standa who did move of CloseButtonTabbedPane.
Comment 3 Stanislav Aubrecht 2007-09-11 17:01:56 UTC
i thought i'd refactored the complete closebuttontabbedpane out to openide/awt but i'll check the cvs history
Comment 4 Stanislav Aubrecht 2007-09-18 10:34:03 UTC
there's no closebuttontabbedpane in the stack trace, milosi, pls re-evaluate, thanks.
Comment 5 Milos Kleint 2008-02-21 08:44:03 UTC
output -> t_h
Comment 6 t_h 2008-02-25 14:42:04 UTC
Is it possible to reproduce this bug?
Comment 7 David Simonek 2008-03-11 16:13:03 UTC
Same error is mentioned in 119409 and 129756. Btw i never was able to reproduce this.
Comment 8 _ tboudreau 2008-03-11 18:50:58 UTC
In every one of these cases, a component is trying to respond to a mouse event after a previous mouse listener hid the component.  The solution might be as 
simple as to ensure that any mouse listeners that affect the component hierarchy call consume() on the mouse event they're handling - at least in theory that 
should stop further processing of the event.
Comment 9 t_h 2008-11-10 14:36:02 UTC

*** This issue has been marked as a duplicate of 137370 ***