5.3 optimization fails with NullPointerException
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
I'm using ProGuard on Scala program. Works a treat with 5.2.1, but on 5.3 optimization step fails with NullPointerException. Exception output doesn't mention any program/library classes, only ProGuard ones, so I'm not sure how to produce a test case. Maybe the issue is purely with ProGuard?
I'm on Linux x86_64, openjdk 1.8.0_102.
Attaching PG config and outputs from 5.2.1 and 5.3.
Output from successful 5.2.1 run
Output from failed 5.3 run
Thanks for your report. The problem is probably triggered by the missing referenced classes in some of the libraries. Can you attach or mail me a sample project that allows me to reproduce the problem?
I'll try to narrow it down to a test case, give me some time.
However, I didn't change any program code/libraries when going from PG 5.2.1 to 5.3. The only change is PG version.
I have the same problem with 5.3.1. I checked the proguard code:
The method proguard.optimize.info.MethodOptimizationInfo.getMethodOptimizationInfo(method) returns null and it should be handled in the method proguard.optimize.info.NonEmptyStackReturnMarker.setReturnsWithNonEmptyStack
Is there some workaround or possible solution with changing of configuration for this problem?
I still have this problem on 5.3.2.
Kristina, you have a better grasp on this - can you please make a test case to demonstrate this issue to Eric?
Pease apply this patch. It solves this issue for me.
That patch works indeed. The upcoming version 5.3.3 already has a OptimizationInfoMemberFilter in Optimizer.java and this (redundant) check.