3r1co / hg4j

Automatically exported from code.google.com/p/hg4j
GNU General Public License v2.0
0 stars 1 forks source link

IllegalArgumentException: Underflow in FilterDataAccess.readBytes #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. hg clone http://hg.netbeans.org/releases/
2. Open it with HgRepoFacade#initFrom
3. Invoke createLogCommand#execute(Handler)

What is the expected output? What do you see instead?
Should iterate all commits, instead at commit 62 following is thrown:

java.lang.IllegalArgumentException: Underflow
    at org.tmatesoft.hg.internal.FilterDataAccess.readBytes(FilterDataAccess.java:103)
    at org.tmatesoft.hg.internal.RevlogStream.apply(RevlogStream.java:392)
    at org.tmatesoft.hg.internal.RevlogStream.iterate(RevlogStream.java:266)
    at org.tmatesoft.hg.repo.HgChangelog.range(HgChangelog.java:62)
    at org.tmatesoft.hg.core.HgLogCommand.execute(HgLogCommand.java:199)
    at com.marcwi.hg2git.Main.run(Main.java:32)
    at com.marcwi.hg2git.Main.main(Main.java:15)

What version of the product are you using? On what operating system?
r180 (42fe9a94b9d0) on Win7/x64 JDK6u24/x86

Please provide any additional information below.

Original issue reported on code.google.com by mwisnicki@gmail.com on 12 Apr 2011 at 2:56

GoogleCodeExporter commented 8 years ago
Similar exception is thrown with http://hg.python.org/cpython/

Original comment by tikhomir...@gmail.com on 14 Apr 2011 at 12:08

GoogleCodeExporter commented 8 years ago
Attempt to read 0 bytes from (an empty) stream.

To reproduce, it's enough to hg pull -r 64e0e86d5f72 
http://hg.netbeans.org/releases/, complete repository is horribly huge.

Fixed, facfd8518367

Original comment by tikhomir...@gmail.com on 14 Apr 2011 at 3:41

GoogleCodeExporter commented 8 years ago
Fix confirmed, thanks!
I can now iterate whole history and it's rather quick, except accessing 
added/removed files (just List#count) which is very slow and quickly runs out 
of memory :(

Original comment by mwisnicki@gmail.com on 14 Apr 2011 at 10:53

GoogleCodeExporter commented 8 years ago
I came across OOME performing log --debug analog on another huge repository 
(able to read about just 1000 elements or so). I've committed few optimization 
fixes and now it goes far beyond few thousand changesets (and keeps going, with 
memory consumption about 50 mb according to rough guess from TaskManager), and 
almost as fast as console Hg (but with much more CPU time, again guessing from 
Task Manager).

Original comment by tikhomir...@gmail.com on 19 Apr 2011 at 2:08