Community
Participate
Working Groups
Build F2 I selected a declaration of a public static method (createJavaSnippetImpl) in a CompilationUnitEditor, and chose 'Search'->'References'->'Workspace'. The progress dialog completes about 10% when a dialog appears saying that an error has occurred. The error below is recorded in my .log file. The problem seems to be repeatable, but I haven't tried exiting and restarting yet. !ENTRY org.eclipse.jdt.ui 4 1 Jun 03, 2002 17:08:44.890 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException: java.lang.NullPointerException Stack trace: java/lang/Throwable.<init>()V java/lang/Throwable.<init>(Ljava/lang/String;)V java/lang/NullPointerException.<init>(Ljava/lang/String;)V org/eclipse/jdt/internal/core/Util.quickSort([Ljava/lang/String;II)V org/eclipse/jdt/internal/core/Util.sort([Ljava/lang/String;)V org/eclipse/jdt/internal/core/search/matching/MatchLocator.locateMatches ([Ljava/lang/String;Lorg/eclipse/core/resources/IWorkspace; [Lorg/eclipse/jdt/core/IWorkingCopy;Lorg/eclipse/core/runtime/IProgressMonitor; )V org/eclipse/jdt/core/search/SearchEngine.search (Lorg/eclipse/core/resources/IWorkspace;Lorg/eclipse/jdt/core/search/ISearchPat tern;Lorg/eclipse/jdt/core/search/IJavaSearchScope;Lorg/eclipse/jdt/core/search /IJavaSearchResultCollector;)V org/eclipse/jdt/core/search/SearchEngine.search (Lorg/eclipse/core/resources/IWorkspace;Lorg/eclipse/jdt/core/IJavaElement;ILor g/eclipse/jdt/core/search/IJavaSearchScope;Lorg/eclipse/jdt/core/search/IJavaSe archResultCollector;)V org/eclipse/jdt/internal/ui/search/JavaSearchOperation.execute (Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/ui/actions/WorkspaceModifyOperation$1.run (Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/core/internal/resources/Workspace.run (Lorg/eclipse/core/resources/IWorkspaceRunnable;Lorg/eclipse/core/runtime/IProg ressMonitor;)V org/eclipse/ui/actions/WorkspaceModifyOperation.run (Lorg/eclipse/core/runtime/IProgressMonitor;)V org/eclipse/jface/operation/ModalContext$ModalContextThread.run()V
I had recently deleted a file from the same package as this message.
I just noticed that the deleted file was still open in an editor, somehow. I've also zipped up the contents of my D:\eclipse\workspace\.metadata\.plugins\org.eclipse.jdt.core directory. For some reason I can't add them as an attachment (it's 5MB). Please e-mail me if you want these. Or you can just FTP it from ott2f/.../accounts/peterb/public/index-for-18920.zip
Closing the open editor seems to have made the bug go away.
Steps to repeat: - open a Java file and modify it - switch editors so that the dirty file isn't the active editor - from a second window, in the Resource perspective, delete the dirty file - perform a search
Thanks for the test case Peter. Note that leaving the dirty editor open is a feature from JDT/UI (so that you don't loose your changes). When collecting the paths of the working copies, the match locator was incorrectly using getUnderlyingResource().getFullPath() that would throw an exception and leave the file path list with <null> if the file did not exist. Fixed by using the handle only method getPath() on the java element instead.
Verified. I got a OutOfMemoryError, but this is related to the VM args I used to start the self hosting workspace.
Verified.