#490 Unexpected error while evaluating instruction

v4.11
open
None
7
2014-01-01
2013-12-09
nickrahn
No

I'm trying out the latest 4.11beta8 and get an error on code that worked correctly with 4.9. Here's the error:

 [proguard] Unexpected error while evaluating instruction:
 [proguard]   Class       = [com/mypackage/MyController$3]
 [proguard]   Method      = [<clinit>()V]
 [proguard]   Instruction = [70] isub
 [proguard]   Exception   = [java.lang.IllegalArgumentException] (Value is not an integer value [proguard.evaluation.value.TypedReferenceValue])
 [proguard] Unexpected error while performing partial evaluation:
 [proguard]   Class       = [com/mypackage/MyController$3]
 [proguard]   Method      = [<clinit>()V]
 [proguard]   Exception   = [java.lang.IllegalArgumentException] (Value is not an integer value [proguard.evaluation.value.TypedReferenceValue])
 [proguard] Error: Value is not an integer value [proguard.evaluation.value.TypedReferenceValue]

Here's part of the config file I'm using:

-target 1.6
-optimizationpasses 3
-overloadaggressively
-repackageclasses 'mypkg'
-allowaccessmodification
-adaptresourcefilecontents **/logback*.xml
-adaptresourcefilenames **.*_properties,**.xml,**.xsd,**.xsql

-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-ignorewarnings

-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-keepattributes Signature

There's more to the config, lots of -keep, -keepclassmembers and the default -assumenosideeffects, but I didn't include it here. Let me know if you need it or if I can provide more information.

Thanks,
Nick

Discussion

  • Eric Lafortune
    Eric Lafortune
    2013-12-09

    Thanks for the report. This bug should be fixed for the final ProGuard 4.11, which is planned for release later this week. Until then, you can work around it with

     -optimizations !class/unboxing/enum
    
     
  • Eric Lafortune
    Eric Lafortune
    2013-12-09

    • status: open --> open-fixed
    • assigned_to: Eric Lafortune
    • Priority: 5 --> 6
     
  • Eric Lafortune
    Eric Lafortune
    2013-12-27

    • status: open-fixed --> closed-fixed
     
  • nickrahn
    nickrahn
    2013-12-31

    Sorry, but I'm still seeing this error with the released 4.11 version:

     [proguard] Unexpected error while evaluating instruction:
     [proguard]   Class       = [com/MyController$3]
     [proguard]   Method      = [<clinit>()V]
     [proguard]   Instruction = [70] isub
     [proguard]   Exception   = [java.lang.IllegalArgumentException] (Value is not an integer value [proguard.evaluation.value.TypedReferenceValue])
     [proguard] Unexpected error while performing partial evaluation:
     [proguard]   Class       = [com/MyController$3]
     [proguard]   Method      = [<clinit>()V]
     [proguard]   Exception   = [java.lang.IllegalArgumentException] (Value is not an integer value [proguard.evaluation.value.TypedReferenceValue])
     [proguard] Error: Value is not an integer value [proguard.evaluation.value.TypedReferenceValue]
    

    Is this the same issue or is it something else?

     
  • Eric Lafortune
    Eric Lafortune
    2014-01-01

    Could you attach or mail me a small project that allows me to reproduce the problem?

     
  • Eric Lafortune
    Eric Lafortune
    2014-01-01

    • status: closed-fixed --> open
    • Priority: 6 --> 7