java.io.IOException: Buffer underflow
See original GitHub issueHello,
I ran into an issue while using ClassGraph version 4.8.65 with Java 8. ClassGraph is able to find most classes on my classpath, but there is one top-level class in particular for which it always throws a java.io.IOException: Buffer underflow
error in the verbose output. I cloned down the classgraph repo, and updated the error handling to print the full stacktrace and got this:
java.io.IOException: Buffer underflow
at nonapi.io.github.classgraph.fileslice.reader.ClassfileReader.readTo(ClassfileReader.java:209)
at nonapi.io.github.classgraph.fileslice.reader.ClassfileReader.skip(ClassfileReader.java:395)
at io.github.classgraph.Classfile.readMethods(Classfile.java:1463)
at io.github.classgraph.Classfile.<init>(Classfile.java:1663)
at io.github.classgraph.Scanner$ClassfileScannerWorkUnitProcessor.processWorkUnit(Scanner.java:664)
at io.github.classgraph.Scanner$ClassfileScannerWorkUnitProcessor.processWorkUnit(Scanner.java:587)
at nonapi.io.github.classgraph.concurrency.WorkQueue.runWorkLoop(WorkQueue.java:246)
at nonapi.io.github.classgraph.concurrency.WorkQueue.runWorkQueue(WorkQueue.java:161)
at io.github.classgraph.Scanner.processWorkUnits(Scanner.java:342)
at io.github.classgraph.Scanner.performScan(Scanner.java:902)
at io.github.classgraph.Scanner.openClasspathElementsThenScan(Scanner.java:1044)
at io.github.classgraph.Scanner.call(Scanner.java:1079)
at io.github.classgraph.Scanner.call(Scanner.java:78)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I can’t post the source code due to IP issues. So I tried to create a test class that resembled my issue as closely as possible, but was unable to reproduce the issue with that class.
I did, however, find 2 publicly available classes which produce the issue:
org.apache.datasketches.cpc.CompressionData
fromorg.apache.datasketches:datasketches-java-1.1.0-incubating
com.google.thirdparty.publicsuffix.PublicSuffixPatterns
fromcom.google.guava:guava:25.0-jre
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Buffer Underflow Exception java - Stack Overflow
The problem is you are mapping in a small region, e.g. 4 KB and then attempting to read the whole file which I...
Read more >BufferUnderflowException (Java Platform SE 7 )
public class BufferUnderflowException extends RuntimeException. Unchecked exception thrown when a relative get operation reaches the source buffer's limit.
Read more >[#HIVE-12779] Buffer underflow when inserting data to table
I face a buffer underflow problem when inserting data to table from hive ... getMapWork(Utilities.java:296) at org.apache.hadoop.hive.ql.io.
Read more >KryoException: Buffer underflow - Google Groups
at java.lang.Thread.run(Thread.java:744) Caused by: com.esotericsoftware.kryo.KryoException: Buffer underflow. at com.esotericsoftware.kryo.io.
Read more >How to fix buffer underflow error for MP servers
ERROR: General , 1647354472404> 9,048,211> GameServer.main> Exception thrown java.io.IOException: Error loading GlobalModData. at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released in 4.8.66. Thanks again!
That’s the goal 😀 :
https://github.com/classgraph/classgraph/blob/master/Zero-Bugs-Commitment.md