Menu

#39 ClassFormatException

closed-fixed
None
5
2003-12-19
2003-11-14
No

I have isolated this error to 2 source files. The
attached zip has the 2 source files and a build.xml to
recreate the error.

-Place proguard.jar into the prguard_bug directory.
-Run ant
-have ./output/obfuscated.jar to you classpath and
nothing else
-run javap ConvTable1025 and you get the following
error

java.io.UTFDataFormatException
at java.io.DataInputStream.readUTF
(DataInputStream.java:674)
at java.io.DataInputStream.readUTF
(DataInputStream.java:610)
at sun.tools.javap.ClassData.readCP
(ClassData.java:151)
at sun.tools.javap.ClassData.read
(ClassData.java:81)
at sun.tools.javap.ClassData.<init>
(ClassData.java:52)
at sun.tools.javap.JavapPrinter.<init>
(JavapPrinter.java:28)
at sun.tools.javap.Main.displayResults
(Main.java:204)
at sun.tools.javap.Main.perform(Main.java:61)
at sun.tools.javap.Main.entry(Main.java:49)
at sun.tools.javap.Main.main(Main.java:34)
ERROR:fatal exception
Compiled from null
Exception in thread "main" java.lang.NullPointerException
at sun.tools.javap.JavapPrinter.javaclassname
(JavapPrinter.java:788)
at sun.tools.javap.JavapPrinter.printclassHeader
(JavapPrinter.java:57)
at sun.tools.javap.JavapPrinter.print
(JavapPrinter.java:40)
at sun.tools.javap.Main.displayResults
(Main.java:205)
at sun.tools.javap.Main.perform(Main.java:61)
at sun.tools.javap.Main.entry(Main.java:49)
at sun.tools.javap.Main.main(Main.java:34)

I am using versoin 1.7 of proguard.

Ant version 1.5.4

Here is my jvm version (Windows XP)

java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed
mode)

BTW besides I have converted from Retroguard to
ProGuard and besides this bug here it has been VERY
easy and because of ProGuard'a excellent generics our
software builds will be much more flexible (i.e. no
strange bugs because someone added an obfuscation
method and forgot to add it to retroguard) also support
for the .class constracts lets us use the standard log4j
coding pattern (rather than stirng with classnames that
don't refactor nicely).

Related

Bugs: #489
Bugs: #627

Discussion

  • Glen Marchesani

    Glen Marchesani - 2003-11-14

    Logged In: YES
    user_id=749312

    forgot to attach the file....

    Could the error be the unicode strings? If there is support for
    unicode needed I am willing to work on this if someone will
    guide me in the right direction...

     
  • Glen Marchesani

    Glen Marchesani - 2003-11-14
     
  • Eric Lafortune

    Eric Lafortune - 2003-11-14
    • assigned_to: nobody --> lafortune
     
  • Eric Lafortune

    Eric Lafortune - 2003-11-20

    Logged In: YES
    user_id=555208

    I've re-implemented UTF-8 encoding to work around
    the problems with the JRE implementation. The
    new Utf8CpInfo class is attached below. It should
    work for all foreign character sets. Please report
    any problems. This patch will be included in the
    upcoming version 2.0 of ProGuard.

     
  • Eric Lafortune

    Eric Lafortune - 2003-11-20

    proguard/classfile/Utf8CpInfo.java

     
  • Glen Marchesani

    Glen Marchesani - 2003-11-21

    Logged In: YES
    user_id=749312

    That fixed it. Thanks for the quick turn around. I was just
    mangling our build script to work around the issue and the fix
    came just in time :-)

     
  • Eric Lafortune

    Eric Lafortune - 2003-12-19
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB