Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Use of IProgressService causes WARNING java.lang.RuntimeException: WARNING: Prevented recursive atte
Use of IProgressService causes WARNING java.lang.RuntimeException: WARNING: Prevented recursive atte [message #550835] Wed, 04 August 2010 13:17
sneha is currently offline snehaFriend
Messages: 25
Registered: July 2009
Junior Member
Hi All,

Please refer following link for this issue:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=321503

Build Identifier: Target platform 3.3.2

Reproducible: Always

Steps to Reproduce:
In our myApp application we have 3 views having selection changed event
implemented. Each view listens and reacts to selection changed generated by
other views.
To display figures in a view, a progress service with busy cursor is
implemented
in myApp.part view. A selection of text in com.myApp.view1 view selects
equivalent text in com.myApp.SampleView and draws equivalent diagram in
com.myApp.part view.

We observed this WARNING: Prevented recursive attempt to activate part
when we
select multiple text in com.myApp.view1 and tries to close
com.myApp.SampleView
using close button.
This generates selection changed events from SampleView, and again selection
changes from com.myApp.view1 view. It produces WARNING in error log
view. The
stack trace of warning is copied in Details section.

We observed that avoiding progress service with busy cursor from
com.myApp.part
view, the warning is not observed. However we need busy cursor to indicate
progress small time events.

We verified the setFocus method and tried to execute code in both sync and
async threads. But this does not resolve the problem.

1. We require functionality to "Cancel" the long running tasks. Due to
this we
are using progress service with busyCursorWhile so that monitor dialog is
displayed if selection is taking long time and for short time we do not
see any
dialog box.

2. I tried using BusyIndicator.showWhile() and it works well. But for long
running tasks, it does not provide functionality to cancel the running task.


According to our application requirement we have modified
org.eclipse.workbench
3.3.1 plugin. Due to this we need to use 3.3.2 as target platform.

It logs a Warning related to prevented recursive attempt to activate
part and
also create Unhandled Event loop exceptions.
We did not tested myApp on Target platform 3.6.
The stack trace is observed when I click on Close button on
com.myApp.SampleView.


Any pointers in this issue will be of great help.

Please find stack trace of warning produced. From stack trace it is observed
that till ModelContext.java, progress monitor code was executed and
after that
code to close 1 view started executing.

java.lang.RuntimeException: WARNING: Prevented recursive attempt to activate
part com.myApp.view1 while still in the middle of activating part
com.myApp.SampleView
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(Workbenc hPage.java:3352)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage .java:611)
at org.eclipse.ui.internal.WorkbenchPage.makeActive(WorkbenchPa ge.java:1193)
at
org.eclipse.ui.internal.WorkbenchPage.updateActivePart(Workb enchPage.java:1173)
at org.eclipse.ui.internal.WorkbenchPage.hideView(WorkbenchPage .java:2263)
at org.eclipse.ui.internal.ViewPane.doHide(ViewPane.java:212)
at org.eclipse.ui.internal.PartStack.close(PartStack.java:543)
at org.eclipse.ui.internal.PartStack.close(PartStack.java:526)
at org.eclipse.ui.internal.PartStack$1.close(PartStack.java:122 )
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation$1.handleEvent(TabbedStackPresentation.java:81)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .fireEvent(AbstractTabFolder.java:267)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .fireEvent(AbstractTabFolder.java:276)
at
org.eclipse.ui.internal.presentations.r33.DefaultTabFolder.a ccess$1(DefaultTabFolder.java:1)
at
org.eclipse.ui.internal.presentations.r33.DefaultTabFolder$1 .closeButtonPressed(DefaultTabFolder.java:66)
at
org.eclipse.ui.internal.presentations.r33.PaneFolder.notifyC loseListeners(PaneFolder.java:601)
at
org.eclipse.ui.internal.presentations.r33.PaneFolder$3.close (PaneFolder.java:190)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:21 71)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.j ava:324)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at
org.eclipse.jface.operation.ModalContext$ModalContextThread. block(ModalContext.java:158)
at org.eclipse.jface.operation.ModalContext.run(ModalContext.ja va:326)
at
org.eclipse.jface.dialogs.ProgressMonitorDialog.run(Progress MonitorDialog.java:495)
at
org.eclipse.ui.internal.progress.ProgressMonitorJobsDialog.r un(ProgressMonitorJobsDialog.java:268)
at
org.eclipse.ui.internal.progress.ProgressManager$3.run(Progr essManager.java:909)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:70)
at
org.eclipse.ui.internal.progress.ProgressManager.busyCursorW hile(ProgressManager.java:944)
at
org.eclipse.ui.internal.progress.ProgressManager.busyCursorW hile(ProgressManager.java:919)
at com.myApp.core.Workorder$1.run(Workorder.java:34)
at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.j ava:178)
at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchroniz er.java:118)
at org.eclipse.swt.widgets.Display.syncExec(Display.java:4021)
at com.myApp.Workorder.execute(Workorder.java:67)
at com.myApp.paintSelection(EntityDependencyPart.java:2540)
at com.myApp.selectionChanged(EntityDependencyPart.java:2815)
at
org.eclipse.ui.internal.AbstractSelectionService.fireSelecti on(AbstractSelectionService.java:156)
at
org.eclipse.ui.internal.AbstractSelectionService.setActivePa rt(AbstractSelectionService.java:282)
at
org.eclipse.ui.internal.WWinPartService.updateActivePart(WWi nPartService.java:125)
at
org.eclipse.ui.internal.WWinPartService.access$0(WWinPartSer vice.java:115)
at
org.eclipse.ui.internal.WWinPartService$1.partDeactivated(WW inPartService.java:48)
at
org.eclipse.ui.internal.PartListenerList2$4.run(PartListener List2.java:113)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:857)
at
org.eclipse.ui.internal.PartListenerList2.fireEvent(PartList enerList2.java:53)
at
org.eclipse.ui.internal.PartListenerList2.firePartDeactivate d(PartListenerList2.java:111)
at
org.eclipse.ui.internal.PartService.firePartDeactivated(Part Service.java:116)
at org.eclipse.ui.internal.PartService.setActivePart(PartServic e.java:165)
at
org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePart Changed(WorkbenchPagePartList.java:56)
at org.eclipse.ui.internal.PartList.setActivePart(PartList.java :126)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(Workbenc hPage.java:3402)
at
org.eclipse.ui.internal.WorkbenchPage.requestActivation(Work benchPage.java:2946)
at org.eclipse.ui.internal.PartPane.requestActivation(PartPane. java:265)
at
org.eclipse.ui.internal.presentations.PresentablePart.setFoc us(PresentablePart.java:191)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresen tation$1.handleEvent(TabbedStackPresentation.java:92)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .fireEvent(AbstractTabFolder.java:267)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .fireEvent(AbstractTabFolder.java:272)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder .handleMouseDown(AbstractTabFolder.java:342)
at
org.eclipse.ui.internal.presentations.util.AbstractTabFolder $3.mouseDown(AbstractTabFolder.java:79)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:179)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
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(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at com.myApp.core.Application.run(Application.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hod(EclipseAppContainer.java:572)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:171)
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(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)



Following is stack trace for Unhandled Event loop Exception which is
observed
alongwith WARNING. The workbench is usable after this exception and WARNING
message.


org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:3777)
at org.eclipse.swt.SWT.error(SWT.java:3695)
at org.eclipse.swt.SWT.error(SWT.java:3666)
at org.eclipse.swt.widgets.Widget.error(Widget.java:446)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:384)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:500)
at
org.eclipse.ui.presentations.PresentationUtil$4.handleEvent( PresentationUtil.java:81)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1158)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3401)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :3033)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:22 19)
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(Work bench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at com.myApp.core.Application.run(Application.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.eclipse.equinox.internal.app.EclipseAppContainer.callMet hod(EclipseAppContainer.java:572)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:171)
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(EclipseS tarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1148)

Thanks,
Sneha
Previous Topic:eclipse search dialg box
Next Topic:Missing Plug-in (Flash not working)
Goto Forum:
  


Current Time: Thu Apr 25 08:58:47 GMT 2024

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

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

Back to the top