java.lang.VerifyError: Inconsistent stackmap frames
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
Environment: ProGuard 4.11, Oracle JDK 1.7.0_51 64bit, Windows 8.1
To reproduce the issue, run Ant in the attached project.
Only happens when optimization is disabled, enabling the "field/propagation/value" optimization seems to fix the problem.
Also happens with ProGuard 4.9.
Exception in thread "main" java.lang.VerifyError: Inconsistent stackmap frames at branch target 13
Exception Details:
Location:
com/cloveretl/gui/editors/query/SQLQueryEditor.<init>(Ljava/lang/Object;Ljava/lang/String;I)V @13: ldc
Reason:
Type 'java/sql/Connection' (current frame, stack[1]) is not assignable to null (stack map, stack[1])
Current Frame:
bci: @6
flags: { flagThisUninit }
locals: { uninitializedThis, 'java/lang/Object', 'java/lang/String', integer }
stack: { uninitializedThis, 'java/sql/Connection', 'java/lang/String' }
Stackmap Frame:
bci: @13
flags: { flagThisUninit }
locals: { uninitializedThis, top, top, integer }
stack: { uninitializedThis, null }
Bytecode:
0000000: 2a01 c000 062c c600 072c a700 0512 021d
0000010: b700 07b1
Stackmap Table:
full_frame(@13,{UninitializedThis,Top,Top,Integer},{UninitializedThis,Null})
full_frame(@15,{UninitializedThis,Top,Top,Integer},{UninitializedThis,Null,Object[#5]})
at com.cloveretl.gui.main.Test.main(Unknown Source)
Thanks for the concise report. I'll see what I can do.
The "code/simplification/advanced" optimization is sufficient to work around the problem.
This bug has been fixed in ProGuard 5.0 beta3, which you can find in the download section.