Community
Participate
Working Groups
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.
Could you attach the log?
Created attachment 4220 [details] .log file containing info re. the null pointer exception
Looks like the PluginActionSet got a null IActionBars somehow. Please investigate as potential RC4 candidate.
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!
Verified that it occurs with a brand new workspace in RC2.
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?
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.
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.
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
Augh! Please ignore last comment: wrong bug #! (sorry)
Created attachment 4340 [details] stack trace: 1st time
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.
Also occurs on HP-UX 11.00, Eclipse V2.1 Build ID: 200303192032 (RC3) (fully patched and up-to-date server).
See also bug# 35254, for a similar problem with the Hierarchy view.
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.
Created attachment 4346 [details] contains tracepoints as requested prior to NullPointerException
Comment on attachment 4346 [details] contains tracepoints as requested prior to NullPointerException corrupted data. will attach corrected version.
Created attachment 4347 [details] contains tracepoints as requested prior to NullPointerException
Doesn't seem to happen when there is any editor open. Can you confirm this?
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...
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.
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?
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.
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.
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.
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.
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.
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.
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.
Should readme this.
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)
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.
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.
Fixed > 0409 by fix for bug 19228.
Fix released to 2.1.1 stream with SN.