Bug 35244 - [Action Sets] Hierarchy fast view causes unhandled exceptions
Summary: [Action Sets] Hierarchy fast view causes unhandled exceptions
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.1   Edit
Hardware: Sun Solaris
: P2 major (vote)
Target Milestone: 2.1.1   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords: readme
Depends on:
Blocks:
 
Reported: 2003-03-18 14:32 EST by Rob Hounsell CLA
Modified: 2003-04-24 11:49 EDT (History)
3 users (show)

See Also:


Attachments
.log file containing info re. the null pointer exception (24.22 KB, text/plain)
2003-03-18 15:34 EST, Rob Hounsell CLA
no flags Details
stack trace: 1st time (1.53 KB, text/plain)
2003-03-25 11:36 EST, Rob Hounsell CLA
no flags Details
stack trace: 2nd time (3.53 KB, text/plain)
2003-03-25 11:37 EST, Rob Hounsell CLA
no flags Details
contains tracepoints as requested prior to NullPointerException (499 bytes, text/plain)
2003-03-25 15:55 EST, Rob Hounsell CLA
no flags Details
contains tracepoints as requested prior to NullPointerException (499 bytes, text/plain)
2003-03-25 16:00 EST, Rob Hounsell CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Hounsell CLA 2003-03-18 14:32:11 EST
Problem Description:
Creating a fast view out of a Hierarchy view and then trying to open it from 
the short cut bar causes an "Unhandled exception caught in event loop. Reason:
java.lang.NullPointerException" message to be printed in the shell window that 
Eclipse was launched from. The fast view never is displayed on the workbench.

Steps to reproduce:
1. Open a new resource perspective and reset it.

2. Use "Window->Show View->Other" to open a Hierarchy view (under the Java item 
in the dialog). A hierarchy view opens.

3. Drag the hierarchy view to the shortcut bar and drop it there. A fast view 
icon for the hierarchy view will be created in the task bar.

4. Click on the hierarchy fast view icon. !BUG! The error message ""Unhandled 
exception caught in event loop. Reason: java.lang.NullPointerException" is 
displayed in the launch shell, and the view is not displayed correctly on the 
workbench screen.

Found in:
OS: Solaris 7  Eclipse: V2.1 Build Id: 200303071024 (RC2)

Comments: the fast view icon can be removed by right clicking it and 
selecting "Close" from the context menu.
Comment 1 Andrew Irvine CLA 2003-03-18 14:52:02 EST
Could you attach the log?
Comment 2 Rob Hounsell CLA 2003-03-18 15:34:36 EST
Created attachment 4220 [details]
.log file containing info re. the null pointer exception
Comment 3 Nick Edgar CLA 2003-03-21 15:40:40 EST
Looks like the PluginActionSet got a null IActionBars somehow.
Please investigate as potential RC4 candidate.
Comment 4 Simon Arsenault CLA 2003-03-21 17:00:41 EST
If I take the 2.1 RC2 build, start it on a new workspace and follow the steps 
provided above by Rob, I cannot reproduce it on Windows 2000. Will track down a 
Solaris box to test on that.

Meanwhile, Rob, can you verify if you start with a 2.1 RC2 build with a new 
workspace, that you can reproduce this problem. Thanks!
Comment 5 Rob Hounsell CLA 2003-03-24 09:25:40 EST
Verified that it occurs with a brand new workspace in RC2.
Comment 6 Simon Arsenault CLA 2003-03-24 12:22:46 EST
I just tried on a Solaris box. Installed a new 2.1 RC2 with new workspace. 
Start up Eclipse, open Hierarchy View (which opens on top of Task view in 
Resource perspective), d&d Hierarchy view onto shortcut bar, click on Hierarchy 
view icon to make it visible. No problems. I could not reproduce the problem.

Can you give me the steps you did. Can you tell me what version of Solaris you 
are running? What vm and version you are using?
Comment 7 Rob Hounsell CLA 2003-03-24 12:28:56 EST
java -version
java version "1.3.1_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_07-b02)
Java HotSpot(TM) Client VM (build 1.3.1_07-b02, mixed mode)

uname -a
SunOS robin 5.7 Generic_106541-23 sun4u sparc SUNW,Ultra-60

Steps to reproduce are exactly as listed, except that I deleted the workspace 
directory before starting Eclipse.
Comment 8 Simon Arsenault CLA 2003-03-24 14:46:59 EST
I still have not been able to reproduce this problem. Rob, would you be willing 
to debug this for us given you have no problem reproducing it. You simply need 
to lauch a target eclipse in debug mode from your host eclipe (Run > Debug, 
then create a new "Run-time Workbench")

The stack trace seems to indicate that PluginActionSet has a null value 
for "bars". Not sure how that can be. Either we

1) created an instance of this without calling init (doing a code search, that 
is not the case)

2) we happen to past null in the init argument (again, doing a code search, 
that is not the case)

3) dispose() was called (again, doing a code search, that should not happen)

I would setup everything and then just before showing the Hierarchy view (when 
its a fast view), place a breakpoint in ActionPresentation.setActionSets

Please let me know what you find out.
Comment 9 Rob Hounsell CLA 2003-03-24 16:01:28 EST
I have reproduced the problem in RC3, and using a much easier method.

1. remove any existing workspace directory, and start Eclipse

2. Use window->open perspective and choose Java

3. once the Java perspective opens, click on the "hierarchy" tab. The error 
message will appear in the launch shell window.

OS: HP-UX 11.0, Eclipse V2.1 Build ID: 200303192032 (RC3),  Java version 
1.3.1_08
Comment 10 Rob Hounsell CLA 2003-03-24 16:04:43 EST
Augh! Please ignore last comment: wrong bug #! (sorry)
Comment 11 Rob Hounsell CLA 2003-03-25 11:36:05 EST
Created attachment 4340 [details]
stack trace: 1st time
Comment 12 Rob Hounsell CLA 2003-03-25 11:37:55 EST
Created attachment 4341 [details]
stack trace: 2nd time

"Stack" occured immediately after clicking hierarchy fast view. "stack 2" is
2nd time at breakpoint (but still only 1 original click on fast view button.
Comment 13 Rob Hounsell CLA 2003-03-25 12:42:17 EST
Also occurs on HP-UX 11.00, Eclipse V2.1 Build ID: 200303192032 (RC3) (fully 
patched and up-to-date server).
Comment 14 Rob Hounsell CLA 2003-03-25 12:44:51 EST
See also bug# 35254, for a similar problem with the Hierarchy view.
Comment 15 Simon Arsenault CLA 2003-03-25 14:45:14 EST
SWT team was able to reproduce this problem on their Solaris box. Moving to SWT 
team to investigate why the focus change event while creating the tool item.
Comment 16 Rob Hounsell CLA 2003-03-25 15:55:53 EST
Created attachment 4346 [details]
contains tracepoints as requested prior to NullPointerException
Comment 17 Rob Hounsell CLA 2003-03-25 15:58:48 EST
Comment on attachment 4346 [details]
contains tracepoints as requested prior to NullPointerException

corrupted data. will attach corrected version.
Comment 18 Rob Hounsell CLA 2003-03-25 16:00:06 EST
Created attachment 4347 [details]
contains tracepoints as requested prior to NullPointerException
Comment 19 Grant Gayed CLA 2003-03-26 09:52:08 EST
Doesn't seem to happen when there is any editor open.  Can you confirm this?
Comment 20 Rob Hounsell CLA 2003-03-26 10:10:45 EST
The behaviour is slightly different (same preparation as before, but closed 
the "Welcome" editor prior to opening the Hierarchy view). 

The first time Hierarchy fast view is clicked, there is no longer a null 
pointer exception, but the hierarchy view is not displayed properly on the 
workbench screen (there is a grey outline/border of where it should appear, but 
no content - the navigator and outline views can still be seen beneath it). 
Clicking the hierarchy fast view a second time removes this border but now also 
produces the following error message in the launch shell: Unhandled exception 
caught in event loop.
Reason:
java.lang.NullPointerException

Repeatedly clicking the hierarchy fast view toggles between the two results: 
border with invisible contents, or unhandled exception...
Comment 21 Grant Gayed CLA 2003-03-26 10:49:50 EST
SN says, Kevin, can this be worked around in UI for today's build?

It's going to take us a while to find out the difference between Solaris Motif
and Linux Motif that is causing the problem.  Even when we find this out,
changing code in the area of focus at the 11th hour is not likely to happen.
Comment 22 Kevin Haaland CLA 2003-03-26 15:15:09 EST
No changes in UI are risky as well.Suggest lowering the priority of this defect 
to P2 and the SWT team document this bug and suggest workaround in their readme.

Also recommend that the SWT and UI teams work to find a real fix to the problem 
post 2.1. 

Rob do you agree with this resolution?
Comment 23 Veronika Irvine CLA 2003-03-26 15:18:29 EST
Fixing in SWT by changing setFocus is too risky.  We should make this a ReadMe 
item instead.  Since it doesn't happen if an editor is open and it does not 
result in the loss of work, it does not sound like a stop ship bug.
Comment 24 Rob Hounsell CLA 2003-03-26 15:25:18 EST
I will advise ASAP re. acceptability of downgrading.

Veronika and Grant, note that if an editor is open, it DOES happen. I see that 
I've misinterpreted comment #19.

To clarify: it DOES happen when an editor is open. My comment #20 refers to the 
test case wherein the editor window (i.e. the lone "Welcome" editor) is closed 
before clicking the fast view icon. Either way, a problem ensues. 
Comment 25 Veronika Irvine CLA 2003-03-26 16:23:55 EST
We have not been able to reproduce the error when an editor is open.  We can 
cause the error easily when all editors are closed.

If you cause the error once, this may account for continued problems later 
when an editor is open.

Please give steps to make error happen when an editor is open.
Comment 26 Rob Hounsell CLA 2003-03-27 09:31:29 EST
The steps I use are as follows:

1. Remove the Eclipse workspace directory

2. Launch Eclipse. Eclipse opens with the default resource view and a "Welcome" 
editor. 

3. Use "Window->Show View->Other" to open a Hierarchy view (under the Java item 
in the dialog). A hierarchy view opens stacked over top of the Tasks view.

4. Drag the hierarchy view to the shortcut bar and drop it there. A fast view 
icon for the hierarchy view will be created in the task bar.

5. Click on the hierarchy fast view icon. !BUG! The error message ""Unhandled 
exception caught in event loop. Reason: java.lang.NullPointerException" is 
displayed in the launch shell, and the view is not displayed correctly on the 
workbench screen.

Unless Eclipse stores state information someplace other than the workspace 
directory, I don't know how a previous error could cause repeat occurrences.
Comment 27 Rob Hounsell CLA 2003-03-27 10:51:42 EST
After reviewing the impact with the team here, I've lowered the priority to P2 
and impact to "major" due to loss of functionality. We would like to review the 
release note when it is ready. We believe that the problem needs to be fixed, 
but ASAP after 2.1 is released.
Comment 28 Simon Arsenault CLA 2003-03-27 12:33:40 EST
Veronika,

Grant and I were able to reproduce the problem on the SWT Solaris machine with 
the editor open. It happens on the host eclipse, but not on the target eclipse.
Comment 29 Grant Gayed CLA 2003-03-27 14:09:40 EST
Actually I don't think it ever happened for us with an open editor.  
Regardless, I guess this isn't the interesting case since it's not consistent 
anyways.
Comment 30 Nick Edgar CLA 2003-03-28 13:07:00 EST
Should readme this.
Comment 31 Nick Edgar CLA 2003-04-01 10:37:13 EST
Here is the readme item that Jim wrote, which we decided not to include in the 
2.1 readme, since it turned out that this problem only occurred on an older 
version of Motif.

Certain fast views broken (Solaris Motif only)
On Solaris, creating a fast view sometime causes an internal exception when the 
fast view is opened from the short cut bar, and the fast view is not displayed 
on the workbench. The problem only seems to happen if the fast view does not 
have a control that takes focus. Examples of problematic views are an empty 
Hierarchy view and an empty Outline view. (bug 35244)
Comment 32 Nick Edgar CLA 2003-04-01 10:40:00 EST
Correction: it was bug 34648 that was only seen on an older version of Motif, 
not this one.  We still decided not to reopen the RC4 candidate to add this 
readme item.

Comment 33 Nick Edgar CLA 2003-04-01 10:51:58 EST
Note that it is also inaccurate for the readme to state that it is Solaris only.
As mentioned above in comment #9, this also occurs on HP-UX.
Comment 34 Grant Gayed CLA 2003-04-09 12:39:47 EDT
Fixed > 0409 by fix for bug 19228.
Comment 35 Grant Gayed CLA 2003-04-24 11:49:47 EDT
Fix released to 2.1.1 stream with SN.