Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339320 - Internal error occurred when checkout branch
Summary: Internal error occurred when checkout branch
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: 0.11   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 1.2   Edit
Assignee: Matthias Sohn CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 01:20 EST by hotgoodway CLA
Modified: 2011-12-09 14:06 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hotgoodway CLA 2011-03-09 01:20:34 EST
Hello

when I first checkout branch it occurred the problem.
my Eclipse Build id is 20110301-1815
and EGit version is 0.11.3

error detail:
An internal error occurred during: "Checking out refs/heads/first-iteration2".

java.lang.NullPointerException
	at org.eclipse.egit.core.internal.util.ProjectUtil.getValidProjects(ProjectUtil.java:46)
	at org.eclipse.egit.core.op.BranchOperation$1.run(BranchOperation.java:98)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
	at org.eclipse.egit.core.op.BranchOperation.execute(BranchOperation.java:125)
	at org.eclipse.egit.ui.internal.branch.BranchOperationUI$1.run(BranchOperationUI.java:106)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Session Data:
eclipse.buildId=M20110210-1200
java.version=1.6.0_11
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ja_JP
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product
Comment 1 Jens Baumgart CLA 2011-03-22 08:20:28 EDT
This is really strange. There seems to be a project with location null in your workspace:

45	String projectFilePath = p.getLocation()
46		.append(".project").toOSString(); //$NON-NLS-1$

Can you check the projects in your workspace? Execute "Properties" on the project node and check the location.
Comment 2 Vlad CLA 2011-06-29 20:36:16 EDT
I have the same problem with any version of Eclipse or Egit. As long as I have I have a Remote Project in the same workspace, I get the same error as the reporter of this bug.
The remote projects have the following pattern in Properties - Location: "rse://xxx.xxxx.COM/home/vlad"
______________________________________________________________________
!ENTRY org.eclipse.core.jobs 4 2 2011-06-29 19:29:07.322
!MESSAGE An internal error occurred during: "Checking out Puppet-VGH - refs/remotes/origin/master".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.egit.core.internal.util.ProjectUtil.getValidProjects(ProjectUtil.java:47)
	at org.eclipse.egit.core.op.BranchOperation$1.run(BranchOperation.java:76)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2344)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2326)
	at org.eclipse.egit.core.op.BranchOperation.execute(BranchOperation.java:103)
	at org.eclipse.egit.ui.internal.branch.BranchOperationUI$1.run(BranchOperationUI.java:162)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
______________________________________________________________________
Comment 3 Paul McIntyre CLA 2011-08-20 00:37:42 EDT
I get the same error (see below) if I have any projects that are closed in my workspace. Opening the projects back up solves the problem. At least until I close a project again. 


java.lang.NullPointerException
	at org.eclipse.egit.core.internal.util.ProjectUtil.getValidProjects(ProjectUtil.java:46)
	at org.eclipse.egit.core.op.BranchOperation$1.run(BranchOperation.java:98)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1957)
	at org.eclipse.egit.core.op.BranchOperation.execute(BranchOperation.java:125)
	at org.eclipse.egit.ui.internal.branch.BranchOperationUI$1.run(BranchOperationUI.java:106)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Comment 4 Matthias Sohn CLA 2011-10-09 05:45:34 EDT
pushed patch for review http://egit.eclipse.org/r/#change,4335
Comment 5 Matthias Sohn CLA 2011-12-09 14:06:23 EST
merged as e35bfac11a258776ab8596d3563aa07f5a053ac5