[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [jgit-dev] IllegalStateException in DirCacheBuilder
- From: Robin Rosenberg <robin.rosenberg@xxxxxxxxxx>
- Date: Mon, 23 May 2011 22:04:22 +0200
- Delivered-to: firstname.lastname@example.org
- User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:220.127.116.11) Gecko/20110414 Thunderbird/3.1.10
On 2011-05-23 17.25, Shawn Pearce wrote:
> On Mon, May 23, 2011 at 00:58, Akos Tajti <akos.tajti@xxxxxxxxx> wrote:
>> I got the following exception during checkout:
>> java.lang.IllegalStateException: Duplicate stages not allowed: 0 Ð ½¨ WinRAR
>> Could you please tell me what situations can cause this exception?
> Somehow there are two DirCacheEntry records in the DirCache for the
> same file path, and the same stage number. This should never occur and
> is a programming error in whatever code write the $GIT_DIR/index to
> disk like that, or created it that way in memory.
> I'm pretty sure *nobody* writes it to disk like this, and the
> exception came out of JGit after it tried to write the index out like
> this. So you would need to back track and find what code modified the
> DirCache in memory, and start looking there for the culprit. Its
> possible there is a bug somewhere in JGit's DirCache related code that
> tries to create a DirCache with this duplicate stage 0.
It is easy to accomplish this mistake if you use the DirCache, API, in
particular DirCacheEditor API, the wrong way. E.g. don't call finish AND