Bug 367213 - R4E Array index out of bound exceptions
Summary: R4E Array index out of bound exceptions
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.0   Edit
Assignee: Alvaro Sanchez-Leon CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
: 364622 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-12-20 11:22 EST by Jacques Bouthillier CLA
Modified: 2012-06-25 19:24 EDT (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 Jacques Bouthillier CLA 2011-12-20 11:22:50 EST
Basic review on SOLARIS generated the following error with git project
Use org.eclipse.mylyn.review.frame.core
Then I selected the "more items" a few times, scroll items up and down then:

java.lang.ArrayIndexOutOfBoundsException: 1
        at org.eclipse.jgit.treewalk.TreeWalk.getObjectId(TreeWalk.java:673)
        at org.eclipse.jgit.diff.DiffEntry.scan(DiffEntry.java:119)
        at org.eclipse.mylyn.internal.git.core.GitConnector.getChangeSet(GitConnector.java:124)
        at org.eclipse.mylyn.internal.git.ui.GetChangeSetDialog.updateChangeSet(GetChangeSetDialog.java:461)
        at org.eclipse.mylyn.internal.git.ui.GetChangeSetDialog.populateNextChangeSets(GetChangeSetDialog.java:292)
        at org.eclipse.mylyn.internal.git.ui.GetChangeSetDialog$1.widgetSelected(GetChangeSetDialog.java:258)
        at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1267)
        at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1061)
        at org.eclipse.swt.custom.CCombo.listEvent(CCombo.java:1119)
        at org.eclipse.swt.custom.CCombo$1.handleEvent(CCombo.java:115)
Comment 1 Sebastien Dubois CLA 2012-01-05 11:57:17 EST
Changed to mylyn versions, as the error is located in the versions git connector
Comment 2 Steffen Pingel CLA 2012-03-08 11:29:23 EST
Does this problem still occur with the latest EGit?
Comment 3 Alvaro Sanchez-Leon CLA 2012-03-09 09:04:50 EST
I believe this still happens when the number of commits in the repo is very small e.g. less than 10 (pretty much a brand new repo), the fault shall be within the Git UI connector itself.
Comment 4 Steffen Pingel CLA 2012-05-23 06:37:13 EDT
Are you planning to address this for the 1.0 release?
Comment 5 Alvaro Sanchez-Leon CLA 2012-05-23 13:42:43 EDT
(In reply to comment #4)
> Are you planning to address this for the 1.0 release?

I think it should be feasible to address this one before the GA, 
is it ok to target the fix for the end of next week?
Comment 6 Steffen Pingel CLA 2012-05-23 15:27:54 EDT
Yes, we can then put it into RC3.
Comment 7 Alvaro Sanchez-Leon CLA 2012-06-01 14:47:19 EDT
When the connector is resolviing the changeset list it uses a TreeWalk instance to load two commit trees to compare against (current vs parent), 
However when the first entry is reached no parents are present leaving the TreeWalk with a single Tree and the comparission fails.

The fix is to load the same commit twice in the TreeWalk for this case, this will resolve all the entry files as additions as there is no base to compare.

change is now uploaded to the gerrit server.
Comment 8 Alvaro Sanchez-Leon CLA 2012-06-04 08:18:41 EDT
This is now integrated in the master branch
Comment 9 Alvaro Sanchez-Leon CLA 2012-06-04 08:21:52 EDT
*** Bug 364622 has been marked as a duplicate of this bug. ***