Bug 281623 - [FastView] NPE in FastViewPane$2.setState (was: File Search doesn't work in 3.5.0)
[FastView] NPE in FastViewPane$2.setState (was: File Search doesn't work in 3...
Status: VERIFIED FIXED
Product: Platform
Classification: Eclipse
Component: UI
3.5
All All
: P3 major (vote)
: 3.5.1
Assigned To: Eric Moffatt CLA Friend
Eric Moffatt CLA Friend
:
: 270351 279193 287593 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2009-06-26 04:02 EDT by Hartmut Stein CLA Friend
Modified: 2009-08-27 14:20 EDT (History)
7 users (show)

See Also:
ob1.eclipse: review+


Attachments
.log (6.38 KB, application/octet-stream)
2009-06-26 04:35 EDT, Hartmut Stein CLA Friend
no flags Details
.log (4.97 KB, application/octet-stream)
2009-06-26 05:26 EDT, Hartmut Stein CLA Friend
no flags Details
Patch that implicitly defines a minimized Welcome as being in 'standby' (1.01 KB, patch)
2009-08-06 14:24 EDT, Eric Moffatt CLA Friend
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hartmut Stein CLA Friend 2009-06-26 04:02:54 EDT
Fresh install of Eclipse SDK Version: 3.5.0 Build id: I20090611-1540
New => Java Project
New => Class
Enter some Text
File => Save
Search => File
Enter some Text
Start [Search]
Search View opens, showing only "No search results available. Start a search from the search dialog..."
Comment 1 Dani Megert CLA Friend 2009-06-26 04:07:37 EDT
This works fine for me using a new or old workspace with a build from here:
http://download.eclipse.org/eclipse/downloads/drops/R-3.5-200906111540/index.php

Tried both, Linux and WindowsXP.

Anything in .log? Maybe you used a different install?
Comment 2 Hartmut Stein CLA Friend 2009-06-26 04:35:45 EDT
Created attachment 140200 [details]
.log
Comment 3 Hartmut Stein CLA Friend 2009-06-26 04:37:13 EDT
Here it happens using a new or old workspace.
Using the old workspace, version 3.4 worked as expected.
I'm also using
http://download.eclipse.org/eclipse/downloads/drops/R-3.5-200906111540/index.php
(MD5 checked).
OS: Ubuntu 8.04.2
.log see Comment  #2
Installation is without any plugins, above file untared and started...
Comment 4 Dani Megert CLA Friend 2009-06-26 04:43:36 EDT
>Here it happens using a new or old workspace.
Strange. Are you applying some settings before, e.g. using different presentation or something? Any additional plug-ins that might get started due to using a script?

Another explanation could be a VM/JIT bug. Can you try with disabled JIT?
Comment 5 Dani Megert CLA Friend 2009-06-26 04:57:38 EDT
Moving to Platform UI as there's a NPE in FastViewPane$2.setState(...).

Still not convinced that this can happen out of the box without modifying anything.


!ENTRY org.eclipse.ui 4 0 2009-06-26 10:28:03.563
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ui.internal.FastViewPane$2.setState(FastViewPane.java:91)
	at org.eclipse.ui.internal.FastViewPane.setState(FastViewPane.java:598)
	at org.eclipse.ui.internal.Perspective.setFastViewState(Perspective.java:2426)
	at org.eclipse.ui.internal.WorkbenchPage.setState(WorkbenchPage.java:3908)
	at org.eclipse.ui.internal.WorkbenchPage.toggleZoom(WorkbenchPage.java:3987)
	at org.eclipse.ui.internal.WorkbenchIntroManager.setIntroStandby(WorkbenchIntroManager.java:201)
	at org.eclipse.ui.internal.WorkbenchPage.checkIntro(WorkbenchPage.java:1120)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1090)
	at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1062)
	at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3816)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3813)
	at org.eclipse.search2.internal.ui.SearchViewManager.activateSearchView(SearchViewManager.java:101)
	at org.eclipse.search2.internal.ui.InternalSearchUI.runSearchInBackground(InternalSearchUI.java:162)
	at org.eclipse.search.ui.NewSearchUI.runQueryInBackground(NewSearchUI.java:132)
	at org.eclipse.search.ui.NewSearchUI.runQueryInBackground(NewSearchUI.java:105)
	at org.eclipse.search.internal.ui.text.TextSearchPage.performAction(TextSearchPage.java:228)
	at org.eclipse.search.internal.ui.SearchDialog.performAction(SearchDialog.java:459)
	at org.eclipse.search.internal.ui.util.ExtendedDialogWindow.buttonPressed(ExtendedDialogWindow.java:164)
	at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
	at org.eclipse.jface.window.Window.open(Window.java:801)
	at org.eclipse.search.internal.ui.OpenSearchDialogAction.run(OpenSearchDialogAction.java:54)
	at org.eclipse.search.ui.NewSearchUI.openSearchDialog(NewSearchUI.java:299)
	at org.eclipse.search.internal.ui.OpenFileSearchPageAction.run(OpenFileSearchPageAction.java:46)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	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:368)
	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:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Comment 6 Dani Megert CLA Friend 2009-06-26 05:00:32 EDT
!ENTRY org.eclipse.ui 4 4 2009-06-26 10:27:46.371
!MESSAGE Could not create view: 'org.eclipse.ui.internal.introview'.

!ENTRY org.eclipse.ui 4 0 2009-06-26 10:27:49.577
!MESSAGE Problems occurred restoring workbench.

This also indicates that an existing workbench was used (of course this should work too and not fail with an NPE).
Comment 7 Hartmut Stein CLA Friend 2009-06-26 05:08:58 EDT
@Comment #6
For preparation of the initial bug message, I generated a fresh workspace.
To generate a minimal .log I reused this workspace.
On request I could provide the original .log (~76kB).
Comment 8 Dani Megert CLA Friend 2009-06-26 05:15:53 EDT
Yes, please start with a completely new workspace (indicate a not yet existing folder), start with -debug and then attach the .log you get.
Comment 9 Hartmut Stein CLA Friend 2009-06-26 05:20:13 EDT
@Comment #4

> Are you applying some settings before, e.g. using different presentation or something?
I'm not aware, but what do you mean with "different presentation or something"?

> Any additional plug-ins that might get started due to using a script?
I'm starting from the shell with "~/eclipse/eclipse". (The 3.5 eclipse installation is in my home directory, not in /usr/lib/...)

> Another explanation could be a VM/JIT bug. Can you try with disabled JIT?
disabled JIT (-Xint): same behaviour
(java version 1.6.0_07 - Ubuntu standard)
Comment 10 Dani Megert CLA Friend 2009-06-26 05:24:10 EDT
>I'm not aware, but what do you mean with "different presentation or something"?
This doesn't apply if you simply start the executable without any special command line arguments.
Comment 11 Hartmut Stein CLA Friend 2009-06-26 05:26:32 EDT
Created attachment 140207 [details]
.log

@Comment #8
Comment 12 Dani Megert CLA Friend 2009-06-26 05:32:21 EDT
How does eclipse come up the first time? Is the Intro/Welcome page shown?
Comment 13 Hartmut Stein CLA Friend 2009-06-26 05:37:46 EDT
Yes, the Intro/Welcome page is shown.
Comment 14 Remy Suen CLA Friend 2009-06-26 21:07:33 EDT
Probably a duplicate of bug 209333.
Comment 15 Dani Megert CLA Friend 2009-06-27 03:17:59 EDT
>Probably a duplicate of bug 209333.
Difference is that this bug here happens with fresh workspace.
Comment 16 Remy Suen CLA Friend 2009-06-27 08:32:52 EDT
From the stack trace, I deduced that the 'Welcome' view was either not closed or in some kind of zoomed/fast view state and have successfully reproduced the problem on I20090603-2000.

1. $ eclipse/eclipse -data tmp-ws
2. Minimize the 'Welcome' view so it docks on the bottom right.
3. Toolbar is missing (no idea what's going on here).
4. Ctrl+H to bring up search.
5. Type something, hit enter.
6. Dialog does not close, 'Search' view shows up in the back of the bottom stack.
7. NPE is logged.

java.lang.NullPointerException
        at org.eclipse.ui.internal.FastViewPane$2.setState(FastViewPane.java:91)
        at org.eclipse.ui.internal.FastViewPane.setState(FastViewPane.java:598)
        at org.eclipse.ui.internal.Perspective.setFastViewState(Perspective.java:2426)
        at org.eclipse.ui.internal.WorkbenchPage.setState(WorkbenchPage.java:3908)
        at org.eclipse.ui.internal.WorkbenchPage.toggleZoom(WorkbenchPage.java:3987)
        at org.eclipse.ui.internal.WorkbenchIntroManager.setIntroStandby(WorkbenchIntroManager.java:201)
        at org.eclipse.ui.internal.WorkbenchPage.checkIntro(WorkbenchPage.java:1120)
        at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1090)
        at org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1069)
        at org.eclipse.ui.internal.WorkbenchPage$20.run(WorkbenchPage.java:3816)
        at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
        at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3813)
        at org.eclipse.search2.internal.ui.SearchViewManager.activateSearchView(SearchViewManager.java:101)
        at org.eclipse.search2.internal.ui.InternalSearchUI.runSearchInBackground(InternalSearchUI.java:162)
        at org.eclipse.search.ui.NewSearchUI.runQueryInBackground(NewSearchUI.java:132)
        at org.eclipse.search.ui.NewSearchUI.runQueryInBackground(NewSearchUI.java:105)
        at org.eclipse.search.internal.ui.text.TextSearchPage.performAction(TextSearchPage.java:228)
        at org.eclipse.search.internal.ui.SearchDialog.performAction(SearchDialog.java:459)
        at org.eclipse.search.internal.ui.util.ExtendedDialogWindow.buttonPressed(ExtendedDialogWindow.java:164)
        at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1176)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3493)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3112)
        at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
        at org.eclipse.jface.window.Window.open(Window.java:801)
        at org.eclipse.search.internal.ui.OpenSearchDialogAction.run(OpenSearchDialogAction.java:54)
        at org.eclipse.search.internal.ui.OpenSearchDialogAction.run(OpenSearchDialogAction.java:45)
        at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:289)
Comment 17 Remy Suen CLA Friend 2009-06-27 08:40:15 EDT
(In reply to comment #16)
> 3. Toolbar is missing (no idea what's going on here).

That'd be bug 178302 I suppose.
Comment 18 Hartmut Stein CLA Friend 2009-06-27 10:32:57 EDT
@Comment #16
That's right: I hadn't closed the Welcome screen, but minimized it.
With the Welcome screen closed, File Search seems to work. Thank your very much!
(So it's an irritating problem, but probably no longer of severity major)
(But why is there a coupling of Welcome screen and File Search dialog?)
Comment 19 Remy Suen CLA Friend 2009-06-27 10:50:53 EDT
(In reply to comment #18)
> (But why is there a coupling of Welcome screen and File Search dialog?)

It's not exactly a coupling between the two. If you try to open any other view that's not currently visible while the 'Welcome' view is minimized, the same problem will occur.
Comment 20 Dani Megert CLA Friend 2009-06-29 05:00:08 EDT
>(So it's an irritating problem, but probably no longer of severity major)
This is at least major as everyone who minimizes the Welcome page will run into it.

Regression compared to 3.4.x.
Comment 21 Susan McCourt CLA Friend 2009-07-06 16:52:41 EDT
Looks like the FastViewPane.currentPane is null when DefaultStackPresentationSite.setState is called.

Agree that this should remain major since this is a regression from 3.4.
Comment 22 Dani Megert CLA Friend 2009-07-07 03:05:12 EDT
Boris, can we target this for 3.5.1 please?
Comment 23 Eric Moffatt CLA Friend 2009-07-07 08:39:25 EDT
Done.
Comment 24 Eric Moffatt CLA Friend 2009-08-06 14:24:37 EDT
Created attachment 143701 [details]
Patch that implicitly defines a minimized Welcome as being in 'standby'
Comment 25 Eric Moffatt CLA Friend 2009-08-06 14:57:53 EDT
Did some archeology to figure out how this regressed. There was a call to 'checkIntro' introduced into 'busyShowView' during the fix for bug 231627. This, in turn, attempted to place the Welcome into 'standby' mode which calls 'setState' to RESTORED. This failed because of bug 279193, causing the observed effects.

Even had I already fixed bug 279193 we'd still have had an issue since it would have 'restored' the welcome (causing it to appear 'magically') so I'm going to commit this patch (and still fix 279193...;-).
Comment 26 Eric Moffatt CLA Friend 2009-08-06 15:10:42 EDT
Oleg, can you take a quick look at the patch ?
Comment 27 Eric Moffatt CLA Friend 2009-08-06 15:11:39 EDT
Ooops, wrong button...
Comment 28 Oleg Besedin CLA Friend 2009-08-06 15:28:38 EDT
+1, makes sense to me.
Comment 29 Eric Moffatt CLA Friend 2009-08-06 15:29:52 EDT
Committed in >20090806. Also updated the copyright.
Comment 30 Eric Moffatt CLA Friend 2009-08-06 15:36:02 EDT
*** Bug 279193 has been marked as a duplicate of this bug. ***
Comment 31 Eric Moffatt CLA Friend 2009-08-06 15:49:41 EDT
Sheesh, please replace everywhere I talked about bug 279193 with bug 209333. I went to fix bug 279193 and realized it was the wrong defect...
Comment 32 Markus Keller CLA Friend 2009-08-25 14:09:52 EDT
*** Bug 270351 has been marked as a duplicate of this bug. ***
Comment 33 Markus Keller CLA Friend 2009-08-25 14:11:26 EDT
*** Bug 287593 has been marked as a duplicate of this bug. ***
Comment 34 Dani Megert CLA Friend 2009-08-27 06:38:00 EDT
Verified in M20090826-1100.
Comment 35 Eric Moffatt CLA Friend 2009-08-27 14:20:51 EDT
Thanks Dani...me too :)