Menu

#623 5.3 optimization fails with NullPointerException

v5.3
closed-fixed
None
5
2017-04-01
2016-09-30
Aleksei
No

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.

1 Attachments

Discussion

  • Aleksei

    Aleksei - 2016-09-30

    Output from successful 5.2.1 run

     
  • Aleksei

    Aleksei - 2016-09-30

    Output from failed 5.3 run

     
  • Eric Lafortune

    Eric Lafortune - 2016-10-23

    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?

     
  • Eric Lafortune

    Eric Lafortune - 2016-10-23
    • status: open --> open-works-for-me
    • assigned_to: Eric Lafortune
    • Group: v5.2 --> v5.3
     
  • Aleksei

    Aleksei - 2016-10-24

    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.

     
  • Kristina

    Kristina - 2016-11-10

    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?

     
  • Aleksei

    Aleksei - 2016-12-13

    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?

     
  • Roman Leukin

    Roman Leukin - 2017-03-27

    Pease apply this patch. It solves this issue for me.

     
  • Eric Lafortune

    Eric Lafortune - 2017-04-01

    That patch works indeed. The upcoming version 5.3.3 already has a OptimizationInfoMemberFilter in Optimizer.java and this (redundant) check.

     
  • Eric Lafortune

    Eric Lafortune - 2017-04-01
    • status: open-works-for-me --> open-fixed
     
  • Eric Lafortune

    Eric Lafortune - 2017-04-03
    • Status: open-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB