Bug 358600 - R4E Git connector search on LINUX generated exceptions
Summary: R4E Git connector search on LINUX generated exceptions
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: 0.8   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: 0.9   Edit
Assignee: Alvaro Sanchez-Leon CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 359474 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-22 10:26 EDT by Jacques Bouthillier CLA
Modified: 2011-10-24 16:22 EDT (History)
2 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-09-22 10:26:22 EDT
On LINUX environment:
I installed a few GIT project , then I tried to use the "Find Review Item" on the GIT project (Used com.ericsson.r4e.prefstore).
The respond was extremely slow and I got the following two exceptions at the same time, they must be related:

[10:14:27:935] D T=main FindReviewItemsHandler:141 (execute): Resolved Scm Ui connector: org.eclipse.mylyn.internal.git.ui.connector.GitConnectorUi@bf7c56
java.lang.ArrayIndexOutOfBoundsException: 1
!ENTRY org.eclipse.mylyn.git.ui 4 0 
	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:122)
	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.createFormContent(GetChangeSetDialog.java:244)
	at org.eclipse.ui.forms.FormDialog.createDialogArea(FormDialog.java:92)
	at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
	at org.eclipse.jface.window.Window.open(Window.java:790)
	at org.eclipse.mylyn.internal.git.ui.connector.GitConnectorUi.getChangeSet(GitConnectorUi.java:52)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.commands.FindReviewItemsHandler.execute(FindReviewItemsHandler.java:143)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	......
	
	2011-09-22 10:14:46.774
!MESSAGE org.eclipse.core.runtime.CoreException: 1
!STACK 1
org.eclipse.core.runtime.CoreException: 1
	at org.eclipse.mylyn.internal.git.core.GitConnector.getChangeSet(GitConnector.java:147)
	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.createFormContent(GetChangeSetDialog.java:244)
	at org.eclipse.ui.forms.FormDialog.createDialogArea(FormDialog.java:92)
	at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java:760)
	at org.eclipse.jface.window.Window.create(Window.java:431)
	at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1089)
	at org.eclipse.jface.window.Window.open(Window.java:790)
	at org.eclipse.mylyn.internal.git.ui.connector.GitConnectorUi.getChangeSet(GitConnectorUi.java:52)
	at org.eclipse.mylyn.reviews.r4e.ui.internal.commands.FindReviewItemsHandler.execute(FindReviewItemsHandler.java:143)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
	at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
	............
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
!SUBENTRY 1 org.eclipse.mylyn.git.core 4 0 2011-09-22 10:14:46.775
!MESSAGE 1
Comment 1 Jacques Bouthillier CLA 2011-09-22 10:38:58 EDT
 After more investigation, the exceptions occurs also on other GIT project, but not right away. 
 I tried with "com.ericsson.reviews.r4e.mail" and the exceptions occured when I hit the line saying "more items" at the end.  
 May be the list does not contain enough entry to complet a new set of 10 commits to put in the list.
Comment 2 Alvaro Sanchez-Leon CLA 2011-10-19 18:44:29 EDT
This product was moved to Mylyn versions, 
The git connector was adding all the parents to the tree walk before comparison, however the version of egit/jgit from Juno validates the trees to contain exactly two commits.

The fix, is to make sure only one parent is added to the three walk.
For merge commits the presented changeset will be with the first parent.  This is not perfect but a good compromise as all the changes including the resolution of merge conflicts shall be visible in the merged commit.
Comment 3 Alvaro Sanchez-Leon CLA 2011-10-19 18:45:00 EDT
see above fix description
Comment 4 Alvaro Sanchez-Leon CLA 2011-10-19 18:49:09 EDT
*** Bug 359474 has been marked as a duplicate of this bug. ***
Comment 5 Alvaro Sanchez-Leon CLA 2011-10-24 16:21:24 EDT
changing Assigned to
Comment 6 Alvaro Sanchez-Leon CLA 2011-10-24 16:22:19 EDT
done with Assigned to