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.

Bug 186820 - [69cat] Refactoring cause a file without name?
Summary: [69cat] Refactoring cause a file without name?
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-27 15:24 UTC by javydreamercsw
Modified: 2010-06-08 15:03 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Picture of the issue (253.36 KB, image/pjpeg)
2010-05-27 15:24 UTC, javydreamercsw
Details
Log (2.08 MB, application/octet-stream)
2010-05-28 11:50 UTC, javydreamercsw
Details
Thread Dump (20.50 KB, text/plain)
2010-06-01 20:43 UTC, javydreamercsw
Details
Log (238.42 KB, text/plain)
2010-06-01 20:46 UTC, javydreamercsw
Details
Part 1 of Heap Dump spliited zip (10.00 MB, application/x-zip-compressed)
2010-06-01 21:49 UTC, javydreamercsw
Details
Part 2 of Heap Dump splitted zip (10.00 MB, application/x-zip-compressed)
2010-06-01 21:52 UTC, javydreamercsw
Details
Subversion message (28.46 KB, image/pjpeg)
2010-06-07 18:52 UTC, javydreamercsw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description javydreamercsw 2010-05-27 15:24:09 UTC
[ BUILD # : 6.9 RC1 ]
[ JDK VERSION : 1.6.20 ]

I had a Entity class named VMUser and I tried renaming it to VmUser. The file
was open in the editor and the tab displays an empty name afterwards (see
attachment). The file is not phisically on the disk anymore, just in the
editor. Classified as P1 since the file is lost.

I got this in the IDE log:

org.openide.filesystems.FileStateInvalidException:
MasterFileObject[Z:\Netbeans\Validation
Manager\VMCore\src\com\validation\master\core\db\VmUser.java@11574c6:20b053,vali
d=false]
        at org.openide.loaders.DataObject.find(DataObject.java:499)
Caused: org.openide.loaders.DataObjectNotFoundException:
MasterFileObject[Z:\Netbeans\Validation
Manager\VMCore\src\com\validation\master\core\db\VmUser.java@11574c6:20b053,vali
d=false]
        at org.openide.loaders.DataObject.find(DataObject.java:519)
        at
org.netbeans.modules.editor.hints.AnnotationHolder.getInstance(AnnotationHolder.
java:145)
        at
org.netbeans.modules.editor.hints.HintsControllerImpl.setErrorsImpl(HintsControl
lerImpl.java:108)
        at
org.netbeans.modules.editor.hints.HintsControllerImpl.setErrors(HintsControllerI
mpl.java:93)
[catch] at
org.netbeans.spi.editor.hints.HintsController$1.run(HintsController.java:79)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
INFO [org.netbeans.modules.editor.hints.AnnotationHolder]
org.openide.filesystems.FileStateInvalidException:
MasterFileObject[Z:\Netbeans\Validation
Manager\VMCore\src\com\validation\master\core\db\VmUser.java@11574c6:20b053,vali
d=false]
        at org.openide.loaders.DataObject.find(DataObject.java:499)
Caused: org.openide.loaders.DataObjectNotFoundException:
MasterFileObject[Z:\Netbeans\Validation
Manager\VMCore\src\com\validation\master\core\db\VmUser.java@11574c6:20b053,vali
d=false]
        at org.openide.loaders.DataObject.find(DataObject.java:519)
        at
org.netbeans.modules.editor.hints.AnnotationHolder.getInstance(AnnotationHolder.
java:145)
        at
org.netbeans.modules.editor.hints.HintsControllerImpl.setErrorsImpl(HintsControl
lerImpl.java:108)
        at
org.netbeans.modules.editor.hints.HintsControllerImpl.setErrors(HintsControllerI
mpl.java:93)
[catch] at
org.netbeans.spi.editor.hints.HintsController$1.run(HintsController.java:79)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
INFO [org.netbeans.modules.editor.hints.AnnotationHolder]
org.openide.filesystems.FileStateInvalidException:
MasterFileObject[Z:\Netbeans\Validation
Manager\VMCore\src\com\validation\master\core\db\VmUser.java@11574c6:20b053,vali
d=false]
        at org.openide.loaders.DataObject.find(DataObject.java:499)
Caused: org.openide.loaders.DataObjectNotFoundException:
MasterFileObject[Z:\Netbeans\Validation
Manager\VMCore\src\com\validation\master\core\db\VmUser.java@11574c6:20b053,vali
d=false]
        at org.openide.loaders.DataObject.find(DataObject.java:519)
        at
org.netbeans.modules.editor.hints.AnnotationHolder.getInstance(AnnotationHolder.
java:145)
        at
org.netbeans.modules.editor.hints.HintsControllerImpl.setErrorsImpl(HintsControl
lerImpl.java:108)
        at
org.netbeans.modules.editor.hints.HintsControllerImpl.setErrors(HintsControllerI
mpl.java:93)
[catch] at
org.netbeans.spi.editor.hints.HintsController$1.run(HintsController.java:79)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
INFO [org.netbeans.modules.editor.hints.AnnotationHolder]
org.openide.filesystems.FileStateInvalidException:
MasterFileObject[Z:\Netbeans\Validation
Manager\VMCore\src\com\validation\master\core\db\VmUser.java@11574c6:20b053,vali
d=false]
        at org.openide.loaders.DataObject.find(DataObject.java:499)
Caused: org.openide.loaders.DataObjectNotFoundException:
MasterFileObject[Z:\Netbeans\Validation
Manager\VMCore\src\com\validation\master\core\db\VmUser.java@11574c6:20b053,vali
d=false]
        at org.openide.loaders.DataObject.find(DataObject.java:519)
        at
org.netbeans.modules.editor.hints.AnnotationHolder.getInstance(AnnotationHolder.
java:145)
        at
org.netbeans.modules.editor.hints.HintsControllerImpl.setErrorsImpl(HintsControl
lerImpl.java:108)
        at
org.netbeans.modules.editor.hints.HintsControllerImpl.setErrors(HintsControllerI
mpl.java:93)
[catch] at
org.netbeans.spi.editor.hints.HintsController$1.run(HintsController.java:79)
        at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Comment 1 javydreamercsw 2010-05-27 15:24:41 UTC
Created attachment 99555 [details]
Picture of the issue
Comment 2 Marian Mirilovic 2010-05-28 06:56:43 UTC
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
Comment 3 javydreamercsw 2010-05-28 11:50:46 UTC
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.
Comment 4 David Strupl 2010-05-31 06:48:21 UTC
Platform people, can you please evaluate why this could happen? Thanks a lot.
Comment 5 John Jullion-ceccarelli 2010-05-31 07:57:20 UTC
Jarda is at a training next few days, is there someone else who can evaluate this issue?
Comment 6 Antonin Nebuzelsky 2010-05-31 08:59:10 UTC
> 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.
Comment 7 Antonin Nebuzelsky 2010-05-31 09:11:32 UTC
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.
Comment 8 Antonin Nebuzelsky 2010-05-31 09:58:34 UTC
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?
Comment 9 javydreamercsw 2010-06-01 20:43:56 UTC
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.
Comment 10 javydreamercsw 2010-06-01 20:46:07 UTC
Created attachment 99731 [details]
Log
Comment 11 javydreamercsw 2010-06-01 20:49:20 UTC
Maybe having version control has to do something with it. Will try again with RC2 when I'm done downloading/installing.
Comment 12 javydreamercsw 2010-06-01 21:49:15 UTC
Created attachment 99733 [details]
Part 1 of Heap Dump spliited zip
Comment 13 javydreamercsw 2010-06-01 21:52:44 UTC
Created attachment 99734 [details]
Part 2 of Heap Dump splitted zip
Comment 14 javydreamercsw 2010-06-01 21:54:04 UTC
Reopening...
Comment 15 Ondrej Vrabec 2010-06-02 10:16:48 UTC
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.
Comment 16 Antonin Nebuzelsky 2010-06-02 12:41:05 UTC
Reassigning to subversion.
Comment 17 Ondrej Vrabec 2010-06-02 13:27:03 UTC
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?
Comment 18 javydreamercsw 2010-06-02 15:55:12 UTC
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.
Comment 19 Tomas Pavek 2010-06-02 16:14:42 UTC
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.
Comment 20 javydreamercsw 2010-06-02 23:21:38 UTC
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.
Comment 21 javydreamercsw 2010-06-07 18:52:43 UTC
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?
Comment 22 javydreamercsw 2010-06-07 18:53:07 UTC
Reopened with new information.
Comment 23 Tomas Pavek 2010-06-08 15:03:04 UTC
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.