Community
Participate
Working Groups
This is a rare exception thrown based on a race condition when the project is closed in the middle of a a background thread execution. The root cause of the Exception is the method IFile.getLocationURI() returning null in CModelManager.createBinaryFile(). The stack trace reported is as follows: !ENTRY org.eclipse.core.jobs 4 2 2013-05-31 07:19:21.611 !MESSAGE An internal error occurred during: "Reading Debug Symbol Information: libexample.so". !STACK 0 java.lang.NullPointerException at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCore.java:104) at org.eclipse.core.filesystem.EFS.getStore(EFS.java:470) at org.eclipse.cdt.internal.core.model.Util.isNonZeroLengthFile(Util.java:445) at org.eclipse.cdt.internal.core.model.CModelManager.createBinaryFile(CModelManager.java:675) at org.eclipse.cdt.debug.internal.core.executables.StandardSourceFilesProvider.createBinaryFile(StandardSourceFilesProvider.java:41) at org.eclipse.cdt.debug.internal.core.executables.StandardSourceFilesProvider.getSourceFiles(StandardSourceFilesProvider.java:117) at org.eclipse.cdt.debug.core.executables.ExecutablesManager.getSourceFiles(ExecutablesManager.java:549) at org.eclipse.cdt.debug.core.executables.Executable.getSourceFiles(Executable.java:206) at org.eclipse.cdt.debug.internal.ui.views.executables.SourceFilesContentProvider$QuickParseJob.run(SourceFilesContentProvider.java:53) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Fix pushed through gerrit as: https://git.eclipse.org/r/16789
I just ran into the same problem (on a branch that was made before this fix went in). I found this bug when I tried to create one of my own. Although this patch fixes the exact problem, my patch was slightly different. I put the null check at the top of Util.isNonZeroLengthFile so that it would get all possible callers, not just the #createBinaryFile case. The two other callers are: Util.isNonZeroLengthFile(IPath) which I think could have the exact same problem. When this method receives a null IPath, it will pass the null to the #isNonZeroLengthFile(URI) implementation. CModelManager.createTranslationUnitFrom, which has a few callers, but I didn't follow back far enough to see if they could wind up passing in null.
*** Bug 409898 has been marked as a duplicate of this bug. ***