Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Error when commiting
Error when commiting [message #650059] Fri, 21 January 2011 15:19 Go to next message
Matic  is currently offline Matic
Messages: 5
Registered: January 2011
Junior Member
On a linux server, I created a git repo, which I share with my desktop with Samba as a mounted network drive in Windows 7. Until now, I've been using Notepad++ to code in and I've done Git operations directly on the server.

Now I've installed Eclipse (I have never used it before) and have imported the Git repo (on the mounted network drive) and created a project. I can now add files to Git with Eclipse, but when I try to commit I get the following error:

Error occurred computing diffs
java.lang.NullPointerException

I've tried both stable and nightly versions of EGit, but both produce the same error. When I commited directly on the server, it worked.

Whats the problem and how can I solve it?
Re: Error when commiting [message #650145 is a reply to message #650059] Fri, 21 January 2011 22:44 Go to previous messageGo to next message
Matic  is currently offline Matic
Messages: 5
Registered: January 2011
Junior Member
Update:
The problem exists only if the git repository is on the mounted network drive. If I copy the git repository to local storage, it works perfectly. Why?
Re: Error when commiting [message #650152 is a reply to message #650145] Fri, 21 January 2011 23:20 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 330
Registered: July 2009
Senior Member
Matic skrev 2011-01-21 23:44:
> Update:
> The problem exists only if the git repository is on the mounted network
> drive. If I copy the git repository to local storage, it works
> perfectly. Why?

Can you produce a start trace and a diff-stat between HEAD and what you
are about to commit, an post it on bugs.eclipse.org.

-- robin
Re: Error when commiting [message #650216 is a reply to message #650059] Sun, 23 January 2011 09:10 Go to previous messageGo to next message
Matic  is currently offline Matic
Messages: 5
Registered: January 2011
Junior Member
I don't know how to create a start trace, but I've found out that it doesn't matter what I commit. In fact, if I create a new empty project on the network drive and start sharing it with Git (repo is the same folder as the project), it will produce the same error when I try to commit, even though there are no files to commit or in the repo.
Re: Error when commiting [message #650293 is a reply to message #650059] Mon, 24 January 2011 09:28 Go to previous messageGo to next message
Daniel  is currently offline Daniel
Messages: 3
Registered: January 2011
Junior Member
Hello!

I have the same problem. I posted it before here:

http://www.eclipse.org/forums/index.php?t=rview&goto=650 147#msg_650147

If you explain me how to give you more info I can file a bug. But I don't know what is a "start trace" sorry :S.

The problem is that if the git repo is on a network share, if you try to commit from another computer to that repo it always fails. No matter what I commit, it always fails.

Thanks Smile
Re: Error when commiting [message #650663 is a reply to message #650216] Tue, 25 January 2011 21:52 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 330
Registered: July 2009
Senior Member
Matic skrev 2011-01-23 10:10:
> I don't know how to create a start trace, but I've found out that it
> doesn't matter what I commit. In fact, if I create a new empty project
> on the network drive and start sharing it with Git (repo is the same
> folder as the project), it will produce the same error when I try to
> commit, even though there are no files to commit or in the repo.

oops. I meant a stack trace. Usually you'll get one on the
workspace/.metadata/.log file. Nevertheless, I have one, but I never
got to even add a file.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=335388

Possibly related is also:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=318777

-- robin
Re: Error when commiting [message #651503 is a reply to message #650059] Mon, 31 January 2011 13:14 Go to previous messageGo to next message
Matic  is currently offline Matic
Messages: 5
Registered: January 2011
Junior Member
I've seen some changes in the bug tracker and I've updated my version of egit to the latest nightly, but I still get the same error. All that I do to get this error is to create a new project, share it with Git on the network drive and commit. It doesn't matter if I have any files in the project or not. I get the error before the commit interface where you get to specify the commit message.

My stack trace:

!SESSION 2011-01-31 14:09:09.451 -----------------------------------------------
eclipse.buildId=M20100909-0800
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=sl_SI
Framework arguments: -product org.eclipse.epp.package.javascript.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.javascript.product

!ENTRY org.eclipse.egit.ui 4 0 2011-01-31 14:10:00.313
!MESSAGE Error occurred computing diffs
!STACK 0
java.lang.NullPointerException
at org.eclipse.egit.ui.internal.actions.CommitActionHandler.inc ludeList(CommitActionHandler.java:366)
at org.eclipse.egit.ui.internal.actions.CommitActionHandler.bui ldIndexHeadDiffList(CommitActionHandler.java:341)
at org.eclipse.egit.ui.internal.actions.CommitActionHandler.acc ess$0(CommitActionHandler.java:297)
at org.eclipse.egit.ui.internal.actions.CommitActionHandler$1.r un(CommitActionHandler.java:105)
at org.eclipse.jface.operation.ModalContext$ModalContextThread. run(ModalContext.java:121)
Re: Error when commiting [message #651578 is a reply to message #650059] Mon, 31 January 2011 17:36 Go to previous messageGo to next message
Chris Aniszczyk is currently offline Chris Aniszczyk
Messages: 674
Registered: July 2009
Senior Member
Eclipse has historically had issues with network drives and performance. I generally recommend people to not use a network drive when using Eclipse... however, we'll still look into these issues when they come up.
Re: Error when commiting [message #720050 is a reply to message #651578] Mon, 29 August 2011 18:29 Go to previous messageGo to next message
Hugh Messenger is currently offline Hugh Messenger
Messages: 17
Registered: January 2010
Junior Member
Did this ever get resolved? The https://bugs.eclipse.org/bugs/show_bug.cgi?id=335388 report says it did, but I've just installed the latest egit on Indigo:

Eclipse EGit 1.0.0.201106090707-r org.eclipse.egit.feature.group Eclipse EGit

... and am having the exact same problem described by the OP. Can't commit from a project sitting on a Samba share. Unfortunately, for a variety of reason, I don't have the option of running from a local file system.

I'm about to take the plunge and see if running a nightly build fixes it.

-- hugh
Re: Error when commiting [message #720527 is a reply to message #720050] Tue, 30 August 2011 19:02 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin Rosenberg
Messages: 330
Registered: July 2009
Senior Member
Hugh Messenger skrev 2011-08-29 20.29:
> Did this ever get resolved? The
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=335388 report says it did,
> but I've just installed the latest egit on Indigo:
>
> Eclipse EGit 1.0.0.201106090707-r org.eclipse.egit.feature.group Eclipse
> EGit
>
> .. and am having the exact same problem described by the OP. Can't
> commit from a project sitting on a Samba share. Unfortunately, for a
> variety of reason, I don't have the option of running from a local file
> system.
>
> I'm about to take the plunge and see if running a nightly build fixes it.
>
> -- hugh
>

Works here with latest nightly. The fix for the problem was long before
the 1.0.0 release and I'm not aware of any broken versions in between.

If you still see an issue, please open a new issue and try to get a
stack trace and whatever other useful information regarding the samba
share that you can find.

-- robin
Re: Error when commiting [message #720600 is a reply to message #720527] Tue, 30 August 2011 22:39 Go to previous messageGo to next message
Hugh Messenger is currently offline Hugh Messenger
Messages: 17
Registered: January 2010
Junior Member
Robin,

Thanks for the reply. I ended up working round the issue by installing x11vnc and Eclipse on my Centos box, and running TightVNC on my Windows machine. So I can work from "here", but Eclipse itself is now sitting on a local file system. A little clunky, but works well, and solves all the other performance issues of running an Eclipse project via a share. If I find I need to still run in my previous configuration and still have a problem, I will indeed open a new issue.

BTW, I'm kind of new to git, am migrating to it from SVN. Can you give me an opinion on how feasible it would be to run this as a git server on my Centos box, with a clone of that git locally? The project I'm working on is actually hosted on github, so my Centos box is a clone of that, and I push changes directly back to github. Was wondering how much of a pain it would be to keep my dev box and the server in sync with git, and push changes through that way. I must confess I'm still struggling a little with The Git Way, after about 30 years using the SCCS / CVS / SVN model.

Once again, thanks for the reply. Enjoying egit, great plugin.

-- hugh

[Updated on: Tue, 30 August 2011 22:41]

Report message to a moderator

Re: Error when commiting [message #724188 is a reply to message #720600] Sun, 11 September 2011 09:45 Go to previous message
Matthias Sohn is currently offline Matthias Sohn
Messages: 588
Registered: July 2009
Senior Member
Could you explain why you need the additional repo on your CentOS box ?
Previous Topic:SOLVED - Newbie - compiling a branch
Next Topic:Symbolic links in Linux
Goto Forum:
  


Current Time: Fri Oct 24 21:31:00 GMT 2014

Powered by FUDForum. Page generated in 0.02665 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software