#435 NullPointerException in ProGuard while obfuscating

closed-fixed
7
2012-05-28
2012-01-28
radomir
No

ProGuard 4.7 obfuscation breaks throwing:

java.lang.NullPointerException
at proguard.evaluation.Variables.aload(Variables.java:263)
at proguard.evaluation.Processor.visitVariableInstruction(Processor.java:675)
at proguard.classfile.instruction.VariableInstruction.accept(VariableInstruction.java:306)
at proguard.optimize.evaluation.PartialEvaluator.evaluateSingleInstructionBlock(PartialEvaluator.java:753)
at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlock(PartialEvaluator.java:602)
at proguard.optimize.evaluation.PartialEvaluator.visitExceptionInfo(PartialEvaluator.java:1078)
at proguard.classfile.visitor.ExceptionHandlerFilter.visitExceptionInfo(ExceptionHandlerFilter.java:67)
at proguard.classfile.attribute.CodeAttribute.exceptionsAccept(CodeAttribute.java:186)
at proguard.optimize.evaluation.PartialEvaluator.evaluateExceptionHandlers(PartialEvaluator.java:1018)
at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlockAndExceptionHandlers(PartialEvaluator.java:567)
at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute0(PartialEvaluator.java:264)
at proguard.optimize.evaluation.PartialEvaluator.visitCodeAttribute(PartialEvaluator.java:181)
at proguard.classfile.attribute.CodeAttribute.accept(CodeAttribute.java:101)
at proguard.classfile.ProgramMethod.attributesAccept(ProgramMethod.java:79)
at proguard.classfile.attribute.visitor.AllAttributeVisitor.visitProgramMember(AllAttributeVisitor.java:95)
at proguard.classfile.util.SimplifiedVisitor.visitProgramMethod(SimplifiedVisitor.java:91)
at proguard.classfile.ProgramMethod.accept(ProgramMethod.java:71)
at proguard.classfile.ProgramClass.methodsAccept(ProgramClass.java:504)
at proguard.classfile.visitor.AllMethodVisitor.visitProgramClass(AllMethodVisitor.java:47)
at proguard.classfile.ProgramClass.accept(ProgramClass.java:346)
at proguard.classfile.ClassPool.classesAccept(ClassPool.java:116)
at proguard.optimize.Optimizer.execute(Optimizer.java:372)
at proguard.ProGuard.optimize(ProGuard.java:306)
at proguard.ProGuard.execute(ProGuard.java:115)
at proguard.ant.ProGuardTask.execute(ProGuardTask.java:311)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)

Please let me know if you need any additional info.

Discussion

  • radomir

    radomir - 2012-01-28
    • assigned_to: nobody --> lafortune
    • priority: 5 --> 9
     
  • Eric Lafortune

    Eric Lafortune - 2012-01-28

    Can you provide me a (preferably small) project that allows me to reproduce the problem?

     
  • radomir

    radomir - 2012-01-31

    I'll try to make a small example and send to you later today or tomorrow.

    I've found that the problem appears with certain library jars included. When I don't include those libraries, ProGuard doesn't crash (but then I have another kind if issues with the obfuscated code).

    For now I disabled optimization and it looks like that workarounds the problem for now.

     
  • radomir

    radomir - 2012-02-03

    I prepared a sample of 1.2MB but SourceForge allows up to 256KB files.

    You can download the archive from:
    https://www.yousendit.com/download/T2dlRGx4bEEyWGZMbjhUQw
    (valid for 7 days only)

    Thanks for checking.

     
  • Eric Lafortune

    Eric Lafortune - 2012-02-03
    • priority: 9 --> 7
     
  • Eric Lafortune

    Eric Lafortune - 2012-02-03

    I can reproduce the problem. I'll look into it.

     
  • Eric Lafortune

    Eric Lafortune - 2012-02-10
    • status: open --> open-fixed
     
  • Eric Lafortune

    Eric Lafortune - 2012-02-10

    The problem has now been fixed for the upcoming ProGuard 4.8 beta1.

     
  • Eric Lafortune

    Eric Lafortune - 2012-05-28
    • status: open-fixed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks