Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSuchFileException in SessionModel because of .lock files in .git directory #210

Closed
connellyj opened this issue Jun 24, 2016 · 3 comments
Closed

Comments

@connellyj
Copy link
Collaborator

I've been able to replicate this by creating and then removing a file called index.lock from the .git directory for a repo. After removing it, Elegit shows this error. I have not been able to replicate the error through normal manipulation of a repo, but that is when it initially occurred. I've run in to this bug multiple times in the past.

The weirdest thing is that once it happens in one repo, it happens in any new clones afterwards as well.

Stack trace:

java.io.UncheckedIOException: java.nio.file.NoSuchFileException: /Accounts/connellyj/Desktop/UnitTest/NoSuchFileTestRepo/.git/index.lock at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:88) at java.nio.file.FileTreeIterator.hasNext(FileTreeIterator.java:104) at java.util.Iterator.forEachRemaining(Iterator.java:115) at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) at elegit.SessionModel.getAllRepoFiles(SessionModel.java:463) at elegit.AllFilesPanelView.getFilesToDisplay(AllFilesPanelView.java:150) at elegit.FileStructurePanelView.drawDirectoryView(FileStructurePanelView.java:77) at elegit.SessionController.lambda$gitStatus$10(SessionController.java:923) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) Caused by: java.nio.file.NoSuchFileException: /Accounts/connellyj/Desktop/UnitTest/NoSuchFileTestRepo/.git/index.lock at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55) at sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:144) at java.nio.file.Files.readAttributes(Files.java:1737) at java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:219) at java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:276) at java.nio.file.FileTreeWalker.next(FileTreeWalker.java:372) at java.nio.file.FileTreeIterator.fetchNextIfNeeded(FileTreeIterator.java:95) ... 17 more

@connellyj
Copy link
Collaborator Author

It's also very inconsistent, like it doesn't happen every single time I start Elegit if a repo has been giving me the error before.

@connellyj
Copy link
Collaborator Author

It was a concurrency issue: I had to pause the repository monitor for all of Main, not in master yet, in file_not_found_test

@connellyj
Copy link
Collaborator Author

Fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant