Bug 299298 - [spy] NullPointerException while invoking the Plug-in Spy
Summary: [spy] NullPointerException while invoking the Plug-in Spy
Status: VERIFIED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 4.3 M3   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2010-01-11 12:02 EST by fabian.knoll CLA
Modified: 2012-10-18 15:00 EDT (History)
5 users (show)

See Also:


Attachments
Stacktrace of the NullPointerException (4.00 KB, text/plain)
2010-01-11 12:04 EST, fabian.knoll CLA
no flags Details
fix v01 (1.53 KB, patch)
2012-10-10 15:43 EDT, Tomasz Zarna CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fabian.knoll CLA 2010-01-11 12:02:55 EST
Build Identifier: M20090917-0800

Invoking the Plug-in Spy via ALT+SHIFT+F1 in the "Test Editor" of the org.eclipse.hyades.test.ui-plug-in ends with a NullPointerException.

Reproducible: Always

Steps to Reproduce:
1.Test Editor is in focus
2.Pressing ALT+SHIFT+F1 for calling the plug-in spy.
3.NullPointerException appears.
Comment 1 fabian.knoll CLA 2010-01-11 12:04:41 EST
Created attachment 155765 [details]
Stacktrace of the NullPointerException
Comment 2 Paul Slauenwhite CLA 2010-01-11 12:13:46 EST
Stack trace does not contain TPTP API.
Comment 3 saurav sarkar CLA 2010-05-25 01:25:44 EDT
(In reply to comment #2)
> Stack trace does not contain TPTP API.


Hi,

I am getting the same error.
Any idea what could be the cause or when is this planned to be solved?.

Thanks and Regards,
Saurav
Comment 4 Curtis Windatt CLA 2010-05-25 10:46:15 EDT
The cause is likely that there is no active page set in the current form editor at the time the spy page is created.  In that case the page is left as null, but we still try and work with it.

The solution is probably to have a null check to avoid creating contents with a null page.

There are no plans to work on this in 3.6.
Comment 5 Tomasz Zarna CLA 2012-10-10 15:43:49 EDT
Created attachment 222144 [details]
fix v01
Comment 6 Curtis Windatt CLA 2012-10-11 12:51:39 EDT
Fixed in master.  Thanks Tomasz

http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=9ef4503f0768199d5b3e12ec91488a044a0a3ddc
Comment 7 Tomasz Zarna CLA 2012-10-18 15:00:08 EDT
Verified in I20121016-2240.