Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325642 - Synchronize View: ArrayIndexOutOfBoundsException while trying to use Synchronize
Summary: Synchronize View: ArrayIndexOutOfBoundsException while trying to use Synchronize
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 0.10.0-M1   Edit
Assignee: Dariusz Luksza CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 14:51 EDT by Karsten Voigt CLA
Modified: 2010-09-27 13:11 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karsten Voigt CLA 2010-09-17 14:51:03 EDT
Build Identifier: 20100617-1415

I tried to use the new synchronize view (egit version 0.9.3). Everytime I try to synchronize my local repo (<local .git> with the remote repo (origin - master) I get an error; the following log statement occurrs:

!ENTRY org.eclipse.team.core 4 4 2010-09-17 20:31:00.031
!MESSAGE Errors have occurred while calculating the synchronization state for Git without local changes.
!SUBENTRY 1 org.eclipse.team.core 4 0 2010-09-17 20:31:00.031
!MESSAGE An internal error occurred processing subscriber events.
!STACK 1
org.eclipse.team.core.TeamException: An internal error occurred processing subscriber events.
	at org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.processEvent(SubscriberEventHandler.java:330)
	at org.eclipse.team.internal.core.BackgroundEventHandler.processEvents(BackgroundEventHandler.java:369)
	at org.eclipse.team.internal.core.BackgroundEventHandler$1.run(BackgroundEventHandler.java:203)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
	at org.eclipse.jgit.revwalk.RevCommit.getParent(RevCommit.java:285)
	at org.eclipse.egit.ui.internal.synchronize.mapping.GitTreeTraversal.<init>(GitTreeTraversal.java:40)
	at org.eclipse.egit.ui.internal.synchronize.mapping.GitRepositoryMapping.getTraversals(GitRepositoryMapping.java:42)
	at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.addMappingsToScope(SynchronizationScopeManager.java:389)
	at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.internalPrepareContext(SynchronizationScopeManager.java:200)
	at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.access$0(SynchronizationScopeManager.java:187)
	at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager$1.run(SynchronizationScopeManager.java:167)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.team.core.mapping.provider.SynchronizationScopeManager.initialize(SynchronizationScopeManager.java:165)
	at org.eclipse.team.core.subscribers.SubscriberScopeManager.access$0(SubscriberScopeManager.java:1)
	at org.eclipse.team.core.subscribers.SubscriberScopeManager$1.run(SubscriberScopeManager.java:81)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975)
	at org.eclipse.team.core.subscribers.SubscriberScopeManager.initialize(SubscriberScopeManager.java:79)
	at org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler.prepareScope(SubscriberDiffTreeEventHandler.java:149)
	at org.eclipse.team.internal.core.subscribers.SubscriberDiffTreeEventHandler$1.run(SubscriberDiffTreeEventHandler.java:122)
	at org.eclipse.team.internal.core.BackgroundEventHandler$RunnableEvent.run(BackgroundEventHandler.java:176)
	at org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.executeRunnable(SubscriberEventHandler.java:364)
	at org.eclipse.team.internal.core.subscribers.SubscriberEventHandler.processEvent(SubscriberEventHandler.java:304)

Reproducible: Always
Comment 1 Dariusz Luksza CLA 2010-09-18 15:25:46 EDT
This issue will only occur when initial commit is included in comparison. Unfortunately I can't reproduce this issue in my environment. 

I think that this path should fix it:
http://egit.eclipse.org/r/1624
Comment 2 Chris Aniszczyk CLA 2010-09-27 13:11:44 EDT
Should be fixed with e6fdf8d71ce861a350be53474d4c4a21454cd97e.

Check tomorrow's nightly.