Bug 247274 - NullPointerException in Modules view
Summary: NullPointerException in Modules view
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 5.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 5.0.2   Edit
Assignee: Anton Leherbauer CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
: 250929 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-15 07:31 EDT by Anna Dushistova CLA
Modified: 2009-10-14 01:25 EDT (History)
2 users (show)

See Also:


Attachments
snapshot of error (107.73 KB, image/png)
2008-09-15 07:31 EDT, Anna Dushistova CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anna Dushistova CLA 2008-09-15 07:31:26 EDT
Created attachment 112534 [details]
snapshot of error

Create simple C project with one simple file test.c with the following content:
#include <stdio.h>
#include <stdlib.h>

int main()
{
	printf("Testing\n");
	return 0;
}

Create Remote C/C++ application debug configuration and launch it.
Switch to modules view and expand it. NPE occurs.

I'm filing this bug against remotecdt plugin because I wasn't able to see it with 
local C/C++ configuration.
Comment 1 Anna Dushistova CLA 2008-09-15 07:33:09 EDT
Exception stack trace:
java.lang.NullPointerException
at org.eclipse.jface.resource.JFaceResources.getResources(JFaceResources.java:207)
at org.eclipse.jface.resource.JFaceResources.getResources(JFaceResources.java:232)
at org.eclipse.ui.model.WorkbenchLabelProvider.<init>(WorkbenchLabelProvider.java:77)
at org.eclipse.cdt.ui.CElementLabelProvider.<init>(CElementLabelProvider.java:98)
at org.eclipse.cdt.ui.CElementLabelProvider.<init>(CElementLabelProvider.java:94)
at org.eclipse.cdt.internal.ui.CWorkbenchAdapter.<init>(CWorkbenchAdapter.java:35)
at org.eclipse.cdt.internal.ui.CElementAdapterFactory.getWorkbenchAdapter(CElementAdapterFactory.java:104)
at org.eclipse.cdt.internal.ui.CElementAdapterFactory.getAdapter(CElementAdapterFactory.java:73)
at org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:291)
at org.eclipse.core.runtime.PlatformObject.getAdapter(PlatformObject.java:66)
at org.eclipse.cdt.internal.core.model.CElement.getAdapter(CElement.java:85)
at org.eclipse.cdt.debug.internal.ui.views.modules.ModuleLabelProvider.getLabel(ModuleLabelProvider.java:43)
at org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider.retrieveLabel(ElementLabelProvider.java:212)
at org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider$LabelUpdater.run(ElementLabelProvider.java:157)
at org.eclipse.debug.internal.ui.model.elements.ElementLabelProvider$LabelJob.run(ElementLabelProvider.java:71)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 2 Anna Dushistova CLA 2008-09-15 07:44:04 EDT
I've done more testing on that and found out that it happens only when you launch debug configuration for the first time. After that it all works successfully.
And it happens with local as well.
Comment 3 Anna Dushistova CLA 2008-09-15 07:45:27 EDT
Reassigning.
Comment 4 Nobody - feel free to take it CLA 2008-09-15 13:05:51 EDT
Reassigning to cdt-ui. Same problem as in https://bugs.eclipse.org/bugs/show_bug.cgi?id=176871.
Comment 5 Anton Leherbauer CLA 2008-09-24 06:37:15 EDT
Fixed in CDT 5.0.2 and HEAD > 20080924.
Comment 6 Ken Ryall CLA 2009-10-14 01:25:33 EDT
*** Bug 250929 has been marked as a duplicate of this bug. ***