[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-1281) JMX console gives runtimeexception warning

Rob Stryker (JIRA) jira-events at lists.jboss.org
Tue Jan 22 23:49:21 EST 2008


    [ http://jira.jboss.com/jira/browse/JBIDE-1281?page=comments#action_12396276 ] 
            
Rob Stryker commented on JBIDE-1281:
------------------------------------

Spent some time investigating this today.  In my workspace I've commented out any attempt to call the properties view, to isolate my code from genuine bugs. The problem persisted.

First of all I'm on a linux box so my exception is different than yours, and my use case is also different, though the result is the same.

Use case: 
1) Open Error View, JBoss Servers View and Properties View
2) Click on your server, and its child.
3) Click on Error View
4) Click on Properties View
5) Click on some element deep in the jboss server's view.
6) Watch error log fill up.

Now, the issue that's causing the recurse FOR ME is the following. (I've investigated in windows, as well, with the exact same use case, adn the issue is the same except for slightly different code and line numbers in SWT). 

- When my view is selected, it alerts some listeners.   ( PartListenerList#firePartActivated(part))
- All of these listeners seem to be global (not specific to my view). They are:
   -  OperationHistoryActionHandler  (inside UndoActionHandler)
   -  OperationHistoryActionHandler  (inside RedoActionHandler)
   -  PropertySheet   (*** this is where it fails ***)
   - ContentOutline  ??
    - PropertySheetPage 

These all seem pretty standard. The PropertySheet class is actually the Properties view. It extends PageBookView. So it gets alerted that there's a change, it finds the proper page to set as active, and it moves to PageBook.showPage(Control)

This is where it gets weird.  

        // hide old *after* new page has been made visible in order to avoid flashing
        if (oldPage != null && !oldPage.isDisposed()) {
			oldPage.setVisible(false);
		}

While trying to set the OLD page to false, (the old page being an empty Tree associated with the Error Log in this specific case), is where it finally fails (after much fanfare).   Both on Windows and Linux-64, some version of fixFocus has the effect of setting focus TO the widget it's trying to hide! 

Forcing focus on the very widget it's trying to hide has the effect of trying to activate the part that widget is in, still while my View is still being activated. The exception is logged. 

This seems extraordinarily out of my control. To repeat all of my interesting code has been commented out, and I saw no listeners of mine in any of the lists. It's a very intriguing bug. 

I'm going to open an eclipse bug regarding it. I've traced all the way through. 

> JMX console gives runtimeexception warning
> ------------------------------------------
>
>                 Key: JBIDE-1281
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-1281
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: JBossAS
>    Affects Versions: 2.0.0.CR1
>            Reporter: Max Andersen
>         Assigned To: Rob Stryker
>            Priority: Minor
>             Fix For: 2.1
>
>
> Play around with the JMX console (execute methdos etc.) and eventually you will get:
> java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate part org.eclipse.ui.views.PropertySheet while still in the middle of activating part org.jboss.ide.eclipse.as.ui.views.JBossServerView
> at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3352)
> at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:2946)
> at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:265)
> at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:229)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943)
> at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1273)
> at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2366)
> at org.eclipse.swt.widgets.Widget.wmSetFocus(Widget.java:2176)
> at org.eclipse.swt.widgets.Control.WM_SETFOCUS(Control.java:4282)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3738)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4351)
> at org.eclipse.swt.internal.win32.OS.SetFocus(Native Method)
> at org.eclipse.swt.widgets.Control.forceFocus(Control.java:963)
> at org.eclipse.swt.widgets.Control.setFixedFocus(Control.java:2707)
> at org.eclipse.swt.widgets.Composite.setFixedFocus(Composite.java:802)
> at org.eclipse.swt.widgets.Composite.setFixedFocus(Composite.java:800)
> at org.eclipse.swt.widgets.Control.fixFocus(Control.java:921)
> at org.eclipse.swt.widgets.Control.setVisible(Control.java:3099)
> at org.eclipse.ui.part.PageBook.showPage(PageBook.java:113)
> at org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.JMXPropertySheetPage.pulldownSelectionChanged(JMXPropertySheetPage.java:267)
> at org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.JMXPropertySheetPage$1.handleEvent(JMXPropertySheetPage.java:108)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943)
> at org.eclipse.swt.widgets.Combo.select(Combo.java:1356)
> at org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.JMXPropertySheetPage.setBean(JMXPropertySheetPage.java:190)
> at org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.JMXPropertySheetPage.setInputObject(JMXPropertySheetPage.java:163)
> at org.jboss.ide.eclipse.as.ui.views.server.providers.jmx.JMXPropertySheetPage.selectionChanged(JMXPropertySheetPage.java:151)
> at org.jboss.ide.eclipse.as.ui.views.server.ExtensionTableViewer$TableViewerPropertySheet.selectionChanged(ExtensionTableViewer.java:390)
> at org.eclipse.ui.views.properties.PropertySheet.selectionChanged(PropertySheet.java:214)
> at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156)
> at org.eclipse.ui.internal.AbstractSelectionService.setActivePart(AbstractSelectionService.java:282)
> at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:59)
> at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:126)
> at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3402)
> at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:2946)
> at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:265)
> at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:229)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943)
> at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1273)
> at org.eclipse.swt.widgets.Shell.WM_MOUSEACTIVATE(Shell.java:2015)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3713)
> at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:291)
> at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1554)
> at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1753)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2260)
> at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2260)
> at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2260)
> at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2260)
> at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2260)
> at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2260)
> at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
> at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2260)
> at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
> at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
> at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2179)
> at org.eclipse.swt.widgets.Tree.callWindowProc(Tree.java:1541)
> at org.eclipse.swt.widgets.Control.windowProc(Control.java:3760)
> at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:5370)
> at org.eclipse.swt.widgets.Display.windowProc(Display.java:4364)
> at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method)
> at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:2769)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3288)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
> at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
> at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
> at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
> at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1173)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list