Menu

#740 Java 11: IllegalArgumentException: Can't remap constant index [63]

v6.0
closed-fixed
None
Medium
2019-05-14
2019-01-16
vincent
No

Using Proguard 6.1.0beta2 with support for java 11.

I've configured jmodsusing openjdk-11 on ubuntu 18.04. But when I run proguard I get a cryptic error:

 [proguard] Initializing...
 [proguard] Ignoring unused library classes...
 [proguard]   Original number of library classes: 30175
 [proguard]   Final number of library classes:    662
 [proguard] Printing kept classes, fields, and methods...
 [proguard] Inlining subroutines...
 [proguard] java.lang.IllegalArgumentException: Can't remap constant index [63]
 [proguard]     at proguard.classfile.editor.ConstantPoolRemapper.remapConstantIndex(ConstantPoolRemapper.java:818)
 [proguard]     at proguard.classfile.editor.ConstantPoolRemapper.remapConstantIndexArray(ConstantPoolRemapper.java:802)
 [proguard]     at proguard.classfile.editor.ConstantPoolRemapper.visitNestMembersAttribute(ConstantPoolRemapper.java:352)
 [proguard]     at proguard.classfile.attribute.NestMembersAttribute.accept(NestMembersAttribute.java:64)
 [proguard]     at proguard.classfile.ProgramClass.attributesAccept(ProgramClass.java:619)
 [proguard]     at proguard.classfile.editor.ConstantPoolRemapper.visitProgramClass(ConstantPoolRemapper.java:102)
 [proguard]     at proguard.shrink.ClassShrinker.visitProgramClass(ClassShrinker.java:122)
 [proguard]     at proguard.classfile.visitor.MultiClassVisitor.visitProgramClass(MultiClassVisitor.java:67)
 [proguard]     at proguard.shrink.UsedClassFilter.visitProgramClass(UsedClassFilter.java:62)
 [proguard]     at proguard.classfile.ProgramClass.accept(ProgramClass.java:430)
 [proguard]     at proguard.classfile.ClassPool.classesAccept(ClassPool.java:125)
 [proguard]     at proguard.shrink.Shrinker.execute(Shrinker.java:158)
 [proguard]     at proguard.ProGuard.shrink(ProGuard.java:392)
 [proguard]     at proguard.ProGuard.execute(ProGuard.java:146)
 [proguard]     at proguard.ProGuard.main(ProGuard.java:586)
 [proguard] Shrinking...

What am I missing?

Please let me know if you need me to provide further details!

Discussion

  • vincent

    vincent - 2019-01-19

    Update: If I provide the option -dontshrink this error is not thrown.

     
  • Eric Lafortune

    Eric Lafortune - 2019-01-20

    Thanks. I can now reproduce the issue. It has been fixed for the upcoming ProGuard 6.1.0 beta3. I'm attaching the patch.

     
  • Eric Lafortune

    Eric Lafortune - 2019-01-20
    • status: open --> open-fixed
    • assigned_to: Eric Lafortune
     
  • Ben Tatham

    Ben Tatham - 2019-04-25

    Any idea when 6.1.0beta3 (or full 6.1.0) will be released to address this issue?

     
  • mstraps

    mstraps - 2019-04-29

    We are encountering the same problem. I would love to give the patch a try and/or rebuild the latest ProGuard binaries myself, but it seems sources are not available anymore?

     
  • Eric Lafortune

    Eric Lafortune - 2019-05-14
    • Status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB