This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | [69cat] Refactoring cause a file without name? | ||
---|---|---|---|
Product: | platform | Reporter: | javydreamercsw <javydreamercsw> |
Component: | Filesystems | Assignee: | Jaroslav Tulach <jtulach> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | anebuzelsky, mmirilovic, tpavek |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Picture of the issue
Log Thread Dump Log Part 1 of Heap Dump spliited zip Part 2 of Heap Dump splitted zip Subversion message |
Description
javydreamercsw
2010-05-27 15:24:09 UTC
Created attachment 99555 [details]
Picture of the issue
It works for me in NetBeans IDE 6.9 RC2 (Build 201005272201), Ubuntu 9.10 x64, JDK6u20 x64. Reporter could you please attach messages.log file from your userdir ? http://wiki.netbeans.org/FaqLogMessagesFile Created attachment 99605 [details]
Log
I couldn't find the log entry for the exact reported issue (maybe I loaded the logs to the system) but I found another instance in my Daily Build dir. This is on 20100526001 build.
Platform people, can you please evaluate why this could happen? Thanks a lot. Jarda is at a training next few days, is there someone else who can evaluate this issue? > why this could happen?
On Windows the filesystem is not case sensitive, so when seeing an issue with renaming VMUser to VmUser on Windows, this must be related.
The filesystems allows the user to name files with mixture of capital and small letters, but then the file can be referred to with any other mixture of capital/small letters.
It needs to be found out which code in NetBeans fails when renaming the file like this.
Another question is if this is a regression in 6.9 or not.
I tried reproducing on Windows Vista, but I don't see the problem there. Renaming a simple java class Main to MaiN succeeded, and also renaming an entity class VMUser to VmUser did not fail. Maybe XP specific. Unable to reproduce in Vista and XP with 6.9 RC2. Closing as worksforme now. javydreamercsw, are you able to reproduce consistently or did it happen only once? Can you provide more observations under which conditions it happens to you? Created attachment 99730 [details]
Thread Dump
Trying to reproduce this issue led me to an IDE freeze. I'll attach everything I have (logs, dumps, etc). This might be related to issue #186984 but since it happened recreating this scenario I'mm attaching here. Also I tried to do a name change on a different file and I got a subversion error that might show in the logs and might be related as I remember some kind of subversion complaint back when the issue happened.
Created attachment 99731 [details]
Log
Maybe having version control has to do something with it. Will try again with RC2 when I'm done downloading/installing. Created attachment 99733 [details]
Part 1 of Heap Dump spliited zip
Created attachment 99734 [details]
Part 2 of Heap Dump splitted zip
Reopening... If the file is under subversion control, it's probably the subversion module who fails to rename it. On platforms like Windows or Mac, it's impossible to rename a file just by changing case in it's filename. Subversion clients are simply unable to do that (try svn rename a.java A.java on commandline, it fails). A workaround is to do a double rename (e.g. a.java->b.java amd then b.java->A.java), it should work. But i have no idea why the file from the initial reporter's comment was deleted. Reassigning to subversion. Maybe i wasn't clear earlier. Subversion fails to rename the file, but it throws an IOException which should interrupt the refactoring action. We *DO NOT* delete the old file, so reassigning to subversion was a bit hasty, i think. Anyway, javydreamercsw: Were you able to reproduce? You tried again (Comment #9) to change case in a file's name and it failed, but the file was not deleted this time, was it? At least the attached message log does not say otherwise. I tried myself to rename an entity java class but the file was not deleted (was not renamed either but definitely stayed on disk). Could you please try again and describe step by step what you're doing? It may be related to your project's setup, so if you're able to reproduce, could you provide a test case? I tried it and the file didn't get deleted, but the IDE froze. Dunno what's worst. At least in the first issue the fisical file was erased but stayed in the editor. Let me summarize what we now about this so far: Ad Picture of the issue - shows file opened in editor with no name in the tab. Definitely strange. Also the exception (FileStateInvalidException) shows IDE surprise there is an invalid FileObject. It is the main mystery what deleted the file here (or renamed to empty name). But the exception happened afterwards, there is no track of what happened before (missing log file). The first attached log is not from the session where the problem happen, not helpful. There's some other FileStateInvalidException, as well as in the second attached log, but these look like from window system trying to open files after start which are not there anymore (i.e. were opened in editor but not found after IDE restart). Isn't something else deleting the files (external to NB)? Ad Thread Dump (the freeze) - this looks like a bug in jindent plugin. Not related to this issue. Ad second log - shows exception from Subversion failing to rename the file. This is a know problem of subversion client, see bug 118708. I am able to reproduce it, but it's not deleting the file and it's unclear how it could. If you have not seen the error when the file was deleted first time, then it means it did not get so far to rename the file via Subversion, but according to the picture the java refactoring completed. Also the exception shows the new name of the file, like if it was deleted after renaming. Seems like Subversion could not be invoked at all (it can't do this rename). Ad heap dump - not sure how a heap dump could help us here, anyway, there is one part attached twice, i.e. one missing. But we don't need it. So we need a way to reproduce to be able to do something here. Maybe someone else may have a clue how a file with empty name can be created. This have been a one shot issue for me and I haven't been able to reproduce it. I'll try removing jIndent plugin to see if I can reproduce. Created attachment 99878 [details]
Subversion message
Tired of this issue I tried to do this outside of Netbeans and got the prompt in the attachment from Subversion. Seems to be related. Maybe Netbeans support doesn't know how to handle this scenario?
Reopened with new information. Your last comment belongs to bug 118708. As I mentioned, that bug is about the SVN support not handling the case sensitive rename well. I've added a note there. Please reopen this bug only if you find a way to reproduce (or if you have more info about) the file deletion. |