Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] DirCacheTree: ArrayIndexOutOfBoundsExceptio

The problem has been reported again now by another user. It was
reproducible for him, unfortunately he already threw away his repository.

Could sparse working trees play a role here? To trace this problem,
would it be helpful to dump the Index and the HEAD commit, once the
problem has occurred?

--
Best regards,
Marc Strapetz
=============
syntevo GmbH
http://www.syntevo.com
http://blog.syntevo.com



On 14.12.2010 10:18, Marc Strapetz wrote:
> On 13.12.2010 17:30, Shawn Pearce wrote:
>> On Mon, Dec 13, 2010 at 12:47 AM, Marc Strapetz
>> <marc.strapetz@xxxxxxxxxxx> wrote:
>>> According to his bug report, he had to re-clone the repository to get
>>> rid of the problem. Shall I ask user for anything else which may be
>>> helpful to track down the cause?
>>
>> Was the TreeWalk an instance of TreeWalk, or NameConflictTreeWalk?
> 
> It's a plain TreeWalk.
> 
>> You said the user got rid of the problem by re-cloning the repository.
>>  That seems to suggest that the user just needed to throw away his
>> current $GIT_DIR/index file and start from scratch, which meant the
>> DirCacheIterator above is an iterator over the current $GIT_DIR/index
>> file.  Somehow the trees within that file confused the iterator state.
> 
> You are right:
> 
> final DirCache dirCache = new DirCache(repository.getIndexFile(), fs);
> dirCache.read();
> 
> final TreeWalk treeWalk = new TreeWalk(repository);
> treeWalk.setRecursive(true);
> treeWalk.reset();
> treeWalk.addTree(new DirCacheIterator(dirCache));
> treeWalk.setFilter(new SkipWorkTreeFilter(0));
> treeWalk.addTree(repository.resolve(Constants.HEAD));
> 
> Then treeWalk is used in a loop which basically looks like:
> 
> while (treeWalk.next()) {
> 	// Only treeWalk.getXXX()-access, no back() call
> }
> 
>>  Do you know if he ever used C Git against that repository?
> 
> Unfortunately, I don't have that information. However, I would expect
> that he has at least used C Git before problems occurred in SmartGit,
> because SmartGit performs all non-read-only operations with C Git. Clone
> is also performed using C Git.
> 
> Is there some helpful information I should log to the bug-report-file in
> case of this ArrayIndexOutOfBoundsException?
> 
> --
> Best regards,
> Marc Strapetz
> =============
> syntevo GmbH
> http://www.syntevo.com
> http://blog.syntevo.com
> _______________________________________________
> jgit-dev mailing list
> jgit-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jgit-dev
> 
> 


Back to the top