How do I find the cause of an optimization issue?

Help
2013-02-15
2013-02-20
  • Matthew Jaggard

    Matthew Jaggard - 2013-02-15

    I am trying to obfuscate and optimize a reasonably large project. The obfuscation works well, however when I allow optimization too, I get a heap or stack overflow issue (I've got the heap set to 6GB - I get a stack overflow unless I increase the stack size to 4MB in which case I get a GC overhead limit exceeded error).

    How can I tell which part of my code might be causing the error, and/or which optimization could be causing the issue (so I can disable it)?

    java.lang.OutOfMemoryError: GC overhead limit exceeded
    at proguard.optimize.evaluation.PartialEvaluator.initializeArrays(PartialEvaluator.java:1114)
    at proguard.optimize.evaluation.PartialEvaluator.evaluateSubroutine(PartialEvaluator.java:916)
    at proguard.optimize.evaluation.PartialEvaluator.evaluateSingleInstructionBlock(PartialEvaluator.java:869)
    at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlock(PartialEvaluator.java:587)
    at proguard.optimize.evaluation.PartialEvaluator.visitExceptionInfo(PartialEvaluator.java:1071)
    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:1011)
    at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlockAndExceptionHandlers(PartialEvaluator.java:567)
    at proguard.optimize.evaluation.PartialEvaluator.evaluateSubroutine(PartialEvaluator.java:919)
    at proguard.optimize.evaluation.PartialEvaluator.evaluateSingleInstructionBlock(PartialEvaluator.java:869)
    at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlock(PartialEvaluator.java:602)
    at proguard.optimize.evaluation.PartialEvaluator.evaluateInstructionBlockAndExceptionHandlers(PartialEvaluator.java:560)
    at proguard.optimize.evaluation.PartialEvaluator.evaluateSubroutine(PartialEvaluator.java:919)
    ...
    
     
    • Eric Lafortune

      Eric Lafortune - 2013-02-20

      This appears to be an infinite loop in processing subroutines ("finally" blocks, compiled for JRE 1.5 or older). You should check if ProGuard 4.9 beta2 solves the issue. Otherwise, you may be able to work around it by making sure all code is compiled with JDK 1.6 or higher, or by specifying "-target 1.6". If you can mail me a sample project that allows me to reproduce the problem, I'll look into it.

      Eric

       

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

Sign up for the SourceForge newsletter:





No, thanks