pombreda / nbgit

Automatically exported from code.google.com/p/nbgit
0 stars 0 forks source link

java.nio.BufferUnderflowException #57

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Attempt to do anything with git.

What is the expected output? What do you see instead?
Expected output is that git functions as it had before. Instead, NB throws
an exception:

java.nio.BufferUnderflowException
    at java.nio.Buffer.nextGetIndex(Buffer.java:480)
    at java.nio.DirectByteBuffer.getInt(DirectByteBuffer.java:620)
    at org.spearce.jgit.lib.GitIndex$Entry.<init>(GitIndex.java:433)
    at org.spearce.jgit.lib.GitIndex.read(GitIndex.java:240)
    at org.spearce.jgit.lib.GitIndex.rereadIfNecessary(GitIndex.java:150)
    at org.spearce.jgit.lib.Repository.getIndex(Repository.java:933)
    at org.spearce.jgit.lib.IndexDiff.<init>(IndexDiff.java:63)
    at org.nbgit.util.GitCommand.getInterestingStatus(GitCommand.java:562)
    at org.nbgit.StatusCache.scanFolder(StatusCache.java:695)
    at org.nbgit.StatusCache.getScannedFiles(StatusCache.java:434)
    at org.nbgit.StatusCache.refresh(StatusCache.java:331)
    at org.nbgit.StatusCache.refresh(StatusCache.java:419)
    at org.nbgit.StatusCache.refreshCached(StatusCache.java:542)
    at org.nbgit.StatusCache.refreshCached(StatusCache.java:581)
    at org.nbgit.task.StatusTask.perform(StatusTask.java:76)
    at org.nbgit.GitProgressSupport.performIntern(GitProgressSupport.java:105)
    at org.nbgit.GitProgressSupport.run(GitProgressSupport.java:97)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030)

What versions of NbGit, NetBeans and Java are you using?
On what operating system?
nbgit 0.3 (previously 0.2b, I upgraded and the problem persisted)
Product Version: NetBeans IDE 6.7 (Build 200906241340)
Java: 1.6.0_14; Java HotSpot(TM) Client VM 14.0-b16
System: Linux version 2.6.26-2-686 running on i386; UTF-8; en_US (nb)
(Debian GNU/Linux, 4.1.2-25, Lenny)

Please provide any additional information below.
This happened all of a sudden. Everything was working fine, and now I get
exceptions working with Git. I can use command line if I have to, but
ideally I'd like to be able to use Git within my IDE as I had before. 

Additionally, I'm a PHP developer, not Java, so I probably can't be of much
assistance helping with this; otherwise I would.

Original issue reported on code.google.com by sett...@gmail.com on 24 Sep 2009 at 6:11

Attachments:

GoogleCodeExporter commented 9 years ago
Actually, an update. 

I can't run command line git on the repo I was working with immediately prior to
these errors. Git segfaults all over itself, throws glibc errors, etc. 

I tested with both git on my local machine and on the fileserver (the repo 
actually
resides on a NAS and is accessed via NFS) and the errors with git occur on both
machines (local: Debian, NAS: CentOS) but only for this specific repo. I tested 
other
repos which appear to be fine. 

The long and skinny is I don't know if this NetBeans/nbgit snafu messed up my 
repo,
or something else. I'm not familiar enough with git or Java to know where to 
look to
find out, but I will report back here if I figure anything out. 

Any help is appreciated. 

Original comment by sett...@gmail.com on 24 Sep 2009 at 6:42

GoogleCodeExporter commented 9 years ago
It might be the index file that is corrupted. Try to remove the .git/index file 
and 
regenerate it by running `git status`

Original comment by jonas.fonseca on 24 Sep 2009 at 7:17

GoogleCodeExporter commented 9 years ago
I moved .git/index to .git/index.corrupt and regenerated as instructed and that 
seems
to have done the trick. I'm not at my work machine right now so I can't test the
NetBeans environment, but it seems command line git is working again on that 
repo.

Thanks a ton for the poke in the right direction. I will update this again 
tomorrow
with a report on NetBeans status.

Original comment by sett...@gmail.com on 25 Sep 2009 at 12:48

GoogleCodeExporter commented 9 years ago
It seems like that was the problem. I can't be certain as to what caused it, 
though.
I wish I was more familiar with the technologies. 

Thanks again for your help. 

nbgit is great and does everything I need it to do ('cept reading .gitignore 
files ;D) 

- John

Original comment by sett...@gmail.com on 25 Sep 2009 at 6:50

GoogleCodeExporter commented 9 years ago
If NbGit version 0.3 does not handle your .gitignore files correctly please
file an issue. This was one of the main additions of version 0.3 ...

Original comment by jonas.fonseca on 17 Oct 2009 at 12:56

GoogleCodeExporter commented 9 years ago
Ah, I didn't realize that .gitignore support was added in 0.3! I didn't read the
changelog when updating; I updated to see if it would fix the issue at hand at 
the
time... though I have noticed that files seem to be ignored that I didn't 
explicitly
ignore before with nbgit... so, obviously, it must be working.

Thanks :)

Original comment by sett...@gmail.com on 18 Oct 2009 at 9:35