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 195840 - Git plugin does not work, getting CorruptObjectException
Summary: Git plugin does not work, getting CorruptObjectException
Status: RESOLVED FIXED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Git (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Ondrej Vrabec
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-23 10:09 UTC by Martin Krauskopf
Modified: 2011-05-03 14:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
COE (3.82 KB, text/plain)
2011-02-23 10:10 UTC, Martin Krauskopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Krauskopf 2011-02-23 10:09:31 UTC
Git stopped to work with upgrade to 0.2.4. There are no diff annotations in editor, Show Changes show nothing, Commit action shows empty list....

Likely due to the exception in the log logged under INFO level.

Considered P1 since Git plugin does nothing actually.

git from command line or git-cola work without any issues.

Build & System info:

 Product Version: NetBeans IDE Dev (Build 110223-bc6c8f6726f8)
 Java: 1.7.0-ea; Java HotSpot(TM) Client VM 21.0-b01
 System: Linux version 2.6.35-25-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Martin Krauskopf 2011-02-23 10:10:14 UTC
Created attachment 106321 [details]
COE
Comment 2 Ondrej Vrabec 2011-02-23 10:40:27 UTC
What is the result of following commands?
git show --pretty=raw HEAD
git show --pretty=raw 7d0d05e197448f26619d3be2f48c8d81a99395c3
Comment 3 Martin Krauskopf 2011-02-23 10:55:43 UTC
The commits are shown appropriately:

  $ git show --pretty=raw HEAD
  commit dad75b3111601b8379263e63bc3c524b5c9b7d5e
  tree 9b777a360f46520826bc94baa71139c927bb18c9
  parent 7d0d05e197448f26619d3be2f48c8d81a99395c3
  author Martin Krauskopf <martin.krauskopf@gmail.com> 1298457312 +0100
  committer Martin Krauskopf <martin.krauskopf@gmail.com> 1298457312 +0100
  --%<--

  $ git show --pretty=raw 7d0d05e197448f26619d3be2f48c8d81a99395c3
  commit 7d0d05e197448f26619d3be2f48c8d81a99395c3
  tree 4b2a405909c48b05772a074c0a8d17ff126ed396
  parent 2aa092072155750720d2f13ff252fb682c6e53b0
  author mkrauskopf <mkrauskopf@49e4c094-2506-43e2-a2f4-0612cfb500bd> 1298447439 +0000
  committer mkrauskopf <mkrauskopf@49e4c094-2506-43e2-a2f4-0612cfb500bd> 1298447439 +0000
  --%<--

The head has changed since then, but showing dad75b3111601b8379263e63bc3c524b5c9b7d5e works as well. COE is now reported with this SHA1, so seemingly always with HEAD.

Sorry I cannot show the diff itself. The product is not open-source.

Worth to note that I'm running git-over-svn. But it has worked up to "now".

Also tried with clean userdir for sanity check - the same.
Comment 4 Martin Krauskopf 2011-02-23 11:19:06 UTC
I've just tried to:

1) create empty Java application in NB
2) exited NB
3) go to the Java application directory, git init, git add ., git commit -a
4) run NB where application is opened

The same problem. So not relate to git-over-svn.
Comment 5 Ondrej Vrabec 2011-02-23 12:41:51 UTC
(In reply to comment #4)
> I've just tried to:
> 
> 1) create empty Java application in NB
> 2) exited NB
> 3) go to the Java application directory, git init, git add ., git commit -a
> 4) run NB where application is opened
> 
> The same problem. So not relate to git-over-svn.

And if you follow this scenario fully in the IDE? Git -> Initialize, Git -> Add, Git -> Commit, then restart? I mean if you ignore the commandline client?
Comment 6 Martin Krauskopf 2011-02-23 13:17:29 UTC
The same. The exception is logged after I submit the commit dialog.

My Git's version is 1.7.1 if that somehow helps.
Comment 7 Ondrej Vrabec 2011-02-23 15:15:01 UTC
This seems to manifest only with Java 1.7, something with java.util.zip.Inflater, it seems to return different bytes than in Java6, god knows why.
Comment 8 Martin Krauskopf 2011-02-23 15:30:35 UTC
Indeed. Thanks for evaluation.

I'm forced to use JDK 7 (due to XMonad). Are you planning to fix this any time soon, i.e. this or next week, (god bless you if so) or should I try to find another workaround (like downgrading to older JDK 7 build).
Comment 9 Ondrej Vrabec 2011-02-23 15:39:59 UTC
I am really sorry, even though i want to fix that asap, i am unfortunately unable to. The problem is in jgit external library, we don't have that one under control, we'll have to wait for that one to be fixed. Even though i'll evaluate this further to know the *exact* cause, i can't promise any exact date. I urge you to run on Java6.
Comment 10 Martin Krauskopf 2011-02-23 15:46:08 UTC
I just found out that build 1.7.0-ea-b98 works. So it had to happen somewhere between b98 a b127. This workaround works well enough for me. Thanks for the help.
Comment 11 Ondrej Vrabec 2011-05-03 14:11:26 UTC
fixed with the JGit upgrade: http://hg.netbeans.org/core-main/rev/c9a4be3f05ba