Export to GitHub

google-singleton-detector - issue #5

ArrayIndexOutOfBoundsException


Posted on Jul 31, 2007 by Massive Lion

There seem to be a problem with asm library used in GSD. I get ArrayIndexOutOfBoundsException When I try to used it to analyse one of my jars.

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 59806 at org.objectweb.asm.ClassReader.getSuperName(Unknown Source) at com.google.singletondetector.SingletonDetector.validcr(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.getClassReaders(Unknown Source) at com.google.singletondetector.SingletonDetector.<init>(Unknown Source) at com.google.singletondetector.Main.<init>(Unknown Source) at com.google.singletondetector.Main.main(Unknown Source)

Comment #1

Posted on Jul 31, 2007 by Massive Lion

And in another instance, I get the following similar exception. Looks like the problem lies in SingletonDetector.

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 65928 at org.objectweb.asm.ClassReader.(Unknown Source) at org.objectweb.asm.ClassReader.(Unknown Source) at org.objectweb.asm.ClassReader.(Unknown Source) at com.google.singletondetector.SingletonDetector.getClassReader(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.buildCrlist(Unknown Source) at com.google.singletondetector.SingletonDetector.getClassReaders(Unknown Source) at com.google.singletondetector.SingletonDetector.(Unknown Source) at com.google.singletondetector.Main.(Unknown Source) at com.google.singletondetector.Main.main(Unknown Source)

Comment #2

Posted on Jul 31, 2007 by Massive Lion

I think you may need to package the jar with debug info to catch such errors quickly.

Status: New

Labels:
Type-Defect Priority-Medium