Community
Participate
Working Groups
Hi, when I opened a simple C-Project this weekend Eclipse hung while "searching for binaries" A deeper look with the jdb showed that I had an Unix named pipe in the project directory and the thread tried to read data from it. This, of course, blocked it. So I consider to first look at the filesize before opening a file, if it has 0 bytes it will propably not be executable.
We have a similar problem. One of our build trees contains a Linux fs for an embedded target - complete with device nodes... The Binary Parser seems to deadlock nicely on this tree. Should probably confirm that the file is a regular file before attempting to read it.
Created attachment 47479 [details] Don't try to parse files of 0 length.
Applied to HEAD
This should really use the EFS API in org.eclipse.core.filesystem, instead of java.io.File
(In reply to comment #4) > This should really use the EFS API in org.eclipse.core.filesystem, instead of > java.io.File Very true ... I'll take this one back until I fix it.
Created attachment 48528 [details] Patch to use EFS instead of java.io.file I changed the patch to use EFS and IFileStore/IFileInfo. I think it's correct, but don't have a suitable build tree here to check. Will confirm at work tomorrow. There were also a couple of other instances of java.io.File. I've replaced those with the equivalent EFS incantation, again unchecked - that said, the patch is trivial... Of note there doesn't seem to be an equivalent java.io.File.isFile() method. Instead I've checked for !isDirectory() (which may or may not be equivalent http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html#isFile() ...)
Created attachment 48533 [details] 2nd time lucky (struggling with bugzilla upload this evening...)
Just to confirm: no problems with the Binary Parser on the dodgy source tree with the EFS patch. (Haven't applied the other java.io.File patches to my tree... :P)
Thanks for looking at this James, sorry it took so long.
A slightly different version then the propose patch was committed to the head, we simply use IFileInfo.getLength() == EFS.NONE to make the distinction.
*** Bug 208808 has been marked as a duplicate of this bug. ***
*** Bug 220163 has been marked as a duplicate of this bug. ***