Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 335180 - Remote debugging and virtual folders => java.lang.NullPointerException
Summary: Remote debugging and virtual folders => java.lang.NullPointerException
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 8.0   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 8.4.0   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact: Ken Ryall CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-24 07:46 EST by Thomas Arnbjerg CLA
Modified: 2014-04-10 16:22 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Arnbjerg CLA 2011-01-24 07:46:59 EST
Build Identifier: 20100917-0705

I have created a new C++ project (ARM Cross Target application). 
The project contains imported files as links and virtual folders. When engaging a remote debug session a java.lang.NullPointerException is shown. This happens regardless of the type of link used (relative to project location, workspace location, eclipse location etc). Importing the same files normally eliminates the problem. The exception stack is as follows: 
java.lang.NullPointerException
at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.getSourceLookupPath(CDebugTarget.java:1862)
at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.getSourceLookupPath(CDebugTarget.java:1884)
at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.getSourceLookupPath(CDebugTarget.java:1884)
at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.getSourceLookupPath(CDebugTarget.java:1884)
at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.setSourceLookupPath(CDebugTarget.java:1838)
at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.initializeSourceLookupPath(CDebugTarget.java:386)
at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.initialize(CDebugTarget.java:285)
at org.eclipse.cdt.debug.internal.core.model.CDebugTarget.<init>(CDebugTarget.java:278)
at org.eclipse.cdt.debug.core.CDIDebugModel$1.run(CDIDebugModel.java:104)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
at org.eclipse.cdt.debug.core.CDIDebugModel.newDebugTarget(CDIDebugModel.java:109)
at org.eclipse.cdt.launch.remote.RemoteRunLaunchDelegate.launch(RemoteRunLaunchDelegate.java:191)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


Reproducible: Always

Steps to Reproduce:
1.Create a new application
2.Import source code using virtual folders.
3.Initiate a remote debug session.
Comment 1 Chris Nuernberger CLA 2011-11-10 15:34:26 EST
This happens on windows; I ran across this and it stopped my development on an android mixed java/c++ project
Comment 2 Nobody - feel free to take it CLA 2014-04-10 16:22:31 EDT
Added NPE protection to CDebugTarget.getSourceLookupPath().