Bug 232857 - [logview] NPE when updating properties
Summary: [logview] NPE when updating properties
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 RC2   Edit
Assignee: Jacek Pospychala CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
: 233355 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-05-19 16:23 EDT by Olivier Thomann CLA
Modified: 2008-05-21 18:01 EDT (History)
5 users (show)

See Also:
jacek.pospychala: review? (caniszczyk)
caniszczyk: review+


Attachments
.log file showing the exceptions (7.04 KB, text/x-log)
2008-05-19 17:51 EDT, Martin Oberhuber CLA
no flags Details
patch (710 bytes, patch)
2008-05-20 11:49 EDT, Jacek Pospychala CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2008-05-19 16:23:09 EDT
Using 3.4RC1, from bug 232787, a NPE was found in Martin's log:

java.lang.NullPointerException
        at
org.eclipse.ui.internal.views.log.EventDetailsDialog.updateProperties(EventDetailsDialog.java:344)
        at
org.eclipse.ui.internal.views.log.EventDetailsDialog.createDialogArea(EventDetailsDialog.java:500)
        at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
        at org.eclipse.jface.window.Window.create(Window.java:431)
        at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
        at
org.eclipse.ui.internal.views.log.EventDetailsDialog.create(EventDetailsDialog.java:173)
        at
org.eclipse.ui.internal.views.log.EventDetailsDialogAction.run(EventDetailsDialogAction.java:96)
        at
org.eclipse.ui.internal.views.log.LogView$15.doubleClick(LogView.java:512)
        [...]

No steps to reproduce so far.
Comment 1 Martin Oberhuber CLA 2008-05-19 17:51:37 EDT
Created attachment 100977 [details]
.log file showing the exceptions

I can reproduce the issue easily in my installation, by cleaning project "org.eclipse.tm.discovery.engine" such that the API Analysis builder re-builds and creates its NPE Entry in the Error Log according to bug 232787.

When I dbl click on the Error Log Entry reading "Problems occurred when invoking code from plug-in: "org.eclipse.core.resources". Now, the jface NPE is shown as a pop-up dialog, as well as added to my error log.

.log file attached.
Comment 2 Ismael Juma CLA 2008-05-20 06:21:17 EDT
I get the same exception if I double-click an item on the Log Error View.
Comment 3 Chris Aniszczyk CLA 2008-05-20 09:41:56 EDT
Jacek!
Comment 4 Jacek Pospychala CLA 2008-05-20 11:41:14 EDT
Ok I can reproduce. It's a side effect of bug 232041.
As of that bug, we more closely check what is current log session and what is not.
As a result now currentSession may be null if there was no any entries in log file. (because in that case there's simply no log session).

But this bug shows that LogView can be tricked to think there's a log entry for null session. Fix is to get session from log, if we didn't have it (e.g. it not existed previously).
Comment 5 Jacek Pospychala CLA 2008-05-20 11:49:06 EDT
Created attachment 101078 [details]
patch

patch!
Comment 6 Olivier Thomann CLA 2008-05-20 11:53:29 EDT
You need two reviewers.
Comment 7 Chris Aniszczyk CLA 2008-05-20 11:54:14 EDT
marking contributed
Comment 8 Chris Aniszczyk CLA 2008-05-20 12:02:21 EDT
Looks good, once Curtis approves I will commit.

Those side-effects will get you at times when they are tricky to reproduce.
Comment 9 Curtis Windatt CLA 2008-05-20 12:17:27 EDT
Weird.  I received the email requesting the review, but I don't see my review request on the bugzilla page.

+1 from me though.
Comment 10 Chris Aniszczyk CLA 2008-05-20 12:19:38 EDT
done.

> 20080520
Comment 11 Chris Aniszczyk CLA 2008-05-21 18:01:20 EDT
*** Bug 233355 has been marked as a duplicate of this bug. ***