Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 101346

Summary: [FastViews][WorkbenchParts] Problems with views drawing when they shouldn't
Product: [Eclipse Project] Platform Reporter: Michael Van Meekeren <michaelvanmeekeren>
Component: UIAssignee: Platform-UI-Inbox <Platform-UI-Inbox>
Status: RESOLVED INVALID QA Contact:
Severity: major    
Priority: P5 CC: curtis.windatt.public, douglas.pollock, eclipse, richa.jain, sxenos
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
note the Cheatsheets view and the fact that all are active none

Description Michael Van Meekeren CLA 2005-06-22 16:08:40 EDT
Attaching an image.  The problem with this is that I can not recreate it.

What I had been doing while testing bug 100737 was:

- opening the debug perspective with every view as a detached view
- had all views as fast views in the java perspective then closed many of them
- had all views as fast views in the CVS perspective then closed some
- opened many editors/closed all but 1
- then deleted a project from (org.eclipse.ui) from package explorer while in
java perspective
- ran delete in the background (from "Run in Background" option in dialog)
- uncheck menu item  Project > Build Automatically
- switched to team perspective then back to java
- poof.
Comment 1 Michael Van Meekeren CLA 2005-06-22 16:09:30 EDT
Created attachment 23777 [details]
note the Cheatsheets view and the fact that all are active
Comment 2 Michael Van Meekeren CLA 2005-06-22 16:09:58 EDT
resetting the perspective fixed it
Comment 3 Michael Van Meekeren CLA 2005-06-24 16:08:54 EDT
might be related to bug 63214
Comment 4 Michael Van Meekeren CLA 2005-07-18 11:44:58 EDT
This is a serious problem, I have placed Help, Cheatsheets and Intro as fast
views in various perspectives and I get frequent NPEs and Graphics is disposed
errors now (did not see the errors when reporting this??).  Usuall it is
occuring when I come back to Eclipse or switch perspectives and the fast view is
trying to be opened/redrawn.


Here are two interesting stack traces, I believe the NPE is a result of the
first "Graphic is disposed" error and me trying to close the help view in this case:

#1 - graphic is disposed
Error 2005-07-18 11:37:02.543 Graphic is disposed
org.eclipse.swt.SWTException: Graphic is disposed
at org.eclipse.swt.SWT.error(SWT.java:2942)
at org.eclipse.swt.SWT.error(SWT.java:2865)
at org.eclipse.swt.SWT.error(SWT.java:2836)
at org.eclipse.swt.graphics.Image.getBounds(Image.java:1087)
at org.eclipse.swt.custom.CTabItem.setImage(CTabItem.java:746)
at
org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabItem.setInfo(DefaultTabItem.java:76)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.initTab(PresentablePartFolder.java:344)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.childPropertyChanged(PresentablePartFolder.java:332)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder.access$2(PresentablePartFolder.java:305)
at
org.eclipse.ui.internal.presentations.util.PresentablePartFolder$3.propertyChanged(PresentablePartFolder.java:84)
at
org.eclipse.ui.internal.presentations.PresentablePart.firePropertyChange(PresentablePart.java:91)
at org.eclipse.ui.internal.ViewPane.updateTitles(ViewPane.java:441)
at org.eclipse.ui.internal.ViewPane.propertyChanged(ViewPane.java:333)
at
org.eclipse.ui.internal.WorkbenchPartReference.immediateFirePropertyChange(WorkbenchPartReference.java:528)
at
org.eclipse.ui.internal.WorkbenchPartReference.dispose(WorkbenchPartReference.java:642)
at org.eclipse.ui.internal.WorkbenchPage.disposePart(WorkbenchPage.java:1432)
at org.eclipse.ui.internal.WorkbenchPage.partRemoved(WorkbenchPage.java:1424)
at org.eclipse.ui.internal.ViewFactory.releaseView(ViewFactory.java:237)
at org.eclipse.ui.internal.Perspective.hideView(Perspective.java:498)
at org.eclipse.ui.internal.WorkbenchPage.hideView(WorkbenchPage.java:2015)
at org.eclipse.ui.internal.FastViewPane$2.close(FastViewPane.java:114)
at org.eclipse.ui.internal.FastViewPane$2.close(FastViewPane.java:119)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$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.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)
at
org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$1.closeButtonPressed(DefaultTabFolder.java:67)
at
org.eclipse.ui.internal.presentations.PaneFolder.notifyCloseListeners(PaneFolder.java:563)
at org.eclipse.ui.internal.presentations.PaneFolder$3.close(PaneFolder.java:190)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2075)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:292)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)

#2 - NPE  - occurs when I try to close the view

Error 2005-07-18 11:37:16.563 java.lang.NullPointerException
java.lang.NullPointerException
	at org.eclipse.ui.internal.FastViewPane.hideView(FastViewPane.java:538)
	at org.eclipse.ui.internal.FastViewPane.showView(FastViewPane.java:377)
	at org.eclipse.ui.internal.Perspective.showFastView(Perspective.java:1632)
	at org.eclipse.ui.internal.Perspective.showView(Perspective.java:1667)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:930)
	at org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPage.java:913)
	at org.eclipse.ui.internal.WorkbenchPage$13.run(WorkbenchPage.java:3148)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3145)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3123)
	at org.eclipse.ui.internal.ShowViewAction.run(ShowViewAction.java:76)
	at org.eclipse.jface.action.Action.runWithEvent(Action.java:996)
	at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
	at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
	at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
	at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
	at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
	at java.lang.reflect.Method.invoke(Method.java:391)
	at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
	at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
	at org.eclipse.core.launcher.Main.run(Main.java:973)
	at org.eclipse.core.launcher.Main.main(Main.java:948)

Comment 5 Michael Van Meekeren CLA 2005-07-20 16:52:26 EDT
Here is another exception I am seeing
Error 2005-07-20 15:01:13.294
org/eclipse/ui/internal/presentations/PresentablePart incompatible with
org/eclipse/ui/IViewReference
java.lang.ClassCastException:
org/eclipse/ui/internal/presentations/PresentablePart incompatible with
org/eclipse/ui/IViewReference
at org.eclipse.ui.internal.FastViewPane$2.close(FastViewPane.java:120)
at org.eclipse.ui.internal.FastViewPane$2.close(FastViewPane.java:126)
at
org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$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.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)
at
org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$1.closeButtonPressed(DefaultTabFolder.java:67)
at
org.eclipse.ui.internal.presentations.PaneFolder.notifyCloseListeners(PaneFolder.java:563)
at org.eclipse.ui.internal.presentations.PaneFolder$3.close(PaneFolder.java:190)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:2075)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:292)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:852)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3137)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2765)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
at java.lang.reflect.Method.invoke(Method.java:391)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
at org.eclipse.core.launcher.Main.run(Main.java:973)
at org.eclipse.core.launcher.Main.main(Main.java:948)

Comment 6 Douglas Pollock CLA 2005-07-21 09:54:02 EDT
I believe this bug is related to (or a duplicate of) one or more of the   
following bugs.  I mention them as they give different steps for reproducing   
these kinds of problems....   
   
+ Bug 63214.  Switching perspectives with fast view open leaves fast view   
partially disposed   
+ Bug 64381.  [FastViews] Changing fast view to normal view while other fast   
view open causes cheese   
+ Bug 64401.  [Workbench] Switching perspectives leaves cheese  
  
It is possible that the exceptions in comment #4 and comment #5 are not 
actually related to the "z-ordering" problem with views. 
 
Comment 7 Stefan Xenos CLA 2005-07-21 14:12:25 EDT
Committed fix for the CCE in comment 5. Can be reproduced by clicking the close
button on an active fast view.

I believe the original PR is a separate issue.
Comment 8 Paul Webster CLA 2006-09-28 14:07:59 EDT
Is this still a problem in 3.3?

PW
Comment 9 Denis Roy CLA 2007-06-22 09:33:01 EDT
Changes requested on bug 193523
Comment 10 Curtis Windatt CLA 2013-05-02 09:40:00 EDT
*** Bug 407040 has been marked as a duplicate of this bug. ***
Comment 11 Curtis Windatt CLA 2013-05-02 09:41:58 EDT
As fast views are no longer available in 4.3 I am marking this bug as INVALID.