Community
Participate
Working Groups
Created attachment 164230 [details] Eclipse log of exception Refactoring Java code on Windows XP or Vista causes an error. The refactoring will not complete and the source will be left in an inconsistent state. The error message that shows during refactoring: ==== "An exception has been caught while processing the refactoring 'Rename Compilation Unit'. Reason: Problems encountered while moving resources. ==== The "Details >>" button of the error dialog shows nothing. However the eclipse workspace .log file shows the exception. I have tried to reproduce this on Linux and OS X without success. I can reproduce this faithfully on Windows. How to reproduce: 1. Rename a Java class with a large Java project with Egit enabled on Windows. 2. After 1, refactor again. 3. Repeat until the error occurs (usually only two or three tries). Eclipse 3.5, Egit 0.7.1, Windows XP
Comment on attachment 164230 [details] Eclipse log of exception MIME Type changed
Created attachment 164420 [details] Workaround for Windows refactoring After some investigation into this issue it appears that the .git/index file is being read by multiple threads at once. This particular re-factoring problem is caused when the FileLock of DirCache tries to FileLock.commit. FileLock.commit tries to delete the old .git/index, however, if at the same time DirCache may be reading .git/index and since Windows has locked the file FileLock.commit cannot delete the file. There may be better ways to fix this however this works for now.
Fix proposed: http://egit.eclipse.org/r/#change,1172
Fixed with db82b8d7eb646a2d31f1b4e52ab4a623743192e9
The same problem on W7. Version: Luna Service Release 2 (4.4.2)