Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Another "Prevented recursive attempt" error - but it's not setFocus
Another "Prevented recursive attempt" error - but it's not setFocus [message #542290] Thu, 24 June 2010 13:13 Go to next message
Matthieu Wipliez is currently offline Matthieu WipliezFriend
Messages: 30
Registered: March 2010
Member
Hi,

I have a GEF editor, and I discovered today that when I opened the editor I had a "Prevented recursive attempt to activate part" error.
A few posts on the web seem to indicate the problem is caused by a listener or an empty setFocus method.
In my case, it seems to be neither.

I'm using Eclipse 3.6 for Linux 64 bits and Gtk.
Note that the problem does not occur on Windows (I have not tested on Mac), and disappears if I do not register the PrintAction in the createActions method in my editor.

The stack trace indicates that when the editor part is activated, the GraphicalEditor updates its actions, calls the calculateEnabled method of PrintAction, which calls Printer#getPrinterList, which somehow fires an event (after going in the Gtk OS layer) that ends up making Eclipse reactivating the part.

Am I doing something wrong? Is this a bug in SWT?

Cheers
Matthieu
Re: Another "Prevented recursive attempt" error - but it's not setFocus [message #542299 is a reply to message #542290] Thu, 24 June 2010 13:33 Go to previous messageGo to next message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
can u provide the logs pls

---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: Another "Prevented recursive attempt" error - but it's not setFocus [message #542332 is a reply to message #542299] Thu, 24 June 2010 14:33 Go to previous messageGo to next message
Matthieu Wipliez is currently offline Matthieu WipliezFriend
Messages: 30
Registered: March 2010
Member
Sure, here it is:
(this is in the Java perspective with the Package Explorer, but there is no difference with the Project Explorer).

The editor is open-source in case you want to have a look at it Smile

!ENTRY org.eclipse.ui.workbench 4 0 2010-06-24 16:13:21.358
!MESSAGE WARNING: Prevented recursive attempt to activate part org.eclipse.jdt.ui.PackageExplorer while still in the middle of activating part net.sf.graphiti.ui.editors.GraphEditor
!STACK 0
java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate part org.eclipse.jdt.ui.PackageExplorer while still in the middle of activating part net.sf.graphiti.ui.editors.GraphEditor
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3487)
	at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:3077)
	at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:279)
	at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:237)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1263)
	at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1531)
	at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:2643)
	at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:2579)
	at org.eclipse.swt.widgets.Composite.gtk_button_press_event(Composite.java:681)
	at org.eclipse.swt.widgets.Tree.gtk_button_press_event(Tree.java:1865)
	at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1731)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4794)
	at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:3485)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:4372)
	at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8163)
	at org.eclipse.swt.widgets.Display.eventProc(Display.java:1239)
	at org.eclipse.swt.internal.gtk.OS._gtk_enumerate_printers(Native Method)
	at org.eclipse.swt.internal.gtk.OS.gtk_enumerate_printers(OS.java:9065)
	at org.eclipse.swt.printing.Printer.getPrinterList(Printer.java:91)
	at org.eclipse.gef.ui.actions.PrintAction.calculateEnabled(PrintAction.java:45)
	at org.eclipse.gef.ui.actions.WorkbenchPartAction.refresh(WorkbenchPartAction.java:131)
	at org.eclipse.gef.ui.actions.WorkbenchPartAction.update(WorkbenchPartAction.java:173)
	at org.eclipse.gef.ui.parts.GraphicalEditor.updateActions(GraphicalEditor.java:458)
	at org.eclipse.gef.ui.parts.GraphicalEditor.selectionChanged(GraphicalEditor.java:401)
	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.WWinPartService.updateActivePart(WWinPartService.java:134)
	at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartService.java:125)
	at org.eclipse.ui.internal.WWinPartService$WWinListener.partDeactivated(WWinPartService.java:50)
	at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:115)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.runtime.Platform.run(Platform.java:888)
	at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:55)
	at org.eclipse.ui.internal.PartListenerList2.firePartDeactivated(PartListenerList2.java:113)
	at org.eclipse.ui.internal.PartService.firePartDeactivated(PartService.java:242)
	at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:300)
	at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:57)
	at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:136)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3537)
	at org.eclipse.ui.internal.WorkbenchPage.internalActivate(WorkbenchPage.java:617)
	at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:589)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2875)
	at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2768)
	at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2760)
	at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2711)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2707)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2691)
	at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2682)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:365)
	at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:168)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:229)
	at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:208)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:274)
	at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:250)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:373)
	at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:526)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:845)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:843)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1131)
	at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1235)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:264)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:258)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:298)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3552)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3171)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Re: Another "Prevented recursive attempt" error - but it's not setFocus [message #542652 is a reply to message #542332] Fri, 25 June 2010 14:31 Go to previous message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
This definetly seems like a bug.

pls log a bug in eclipse bugzila here


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay

[Updated on: Fri, 25 June 2010 14:32]

Report message to a moderator

Previous Topic:[ZEST] Adding CGraphNodes to GraphContainers
Next Topic:Multiple edges between nodes
Goto Forum:
  


Current Time: Fri Apr 26 09:44:56 GMT 2024

Powered by FUDForum. Page generated in 0.03662 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top