java.lang.VerifyError: Inconsistent stackmap frames at branch target 82 Exception Details: Location: SwitchCompilerErr.switchTo()V @82: new Reason: Type top (current frame, locals[3]) is not assignable to 'java/lang/String' (stack map, locals[3]) Current Frame: bci: @57 flags: { } locals: { 'SwitchCompilerErr', integer, integer } stack: { integer } Stackmap Frame: bci: @82 flags: { } locals: { 'SwitchCompilerErr', integer, integer, 'java/lang/String' } stack: { } Bytecode: 0000000: bb00 0259 b700 03b6 0004 3cbb 0002 59b7 0000010: 0003 b600 043d 1bab 0000 0017 0000 0001 0000020: 0000 0000 0000 0011 1205 4ea7 000d bb00 0000030: 0659 1207 b700 08bf 1cab 0000 0000 0019 0000040: 0000 0001 0000 0000 0000 0013 1205 4ea7 0000050: 000d bb00 0659 1207 b700 08bf b1 Stackmap Table: append_frame(@40,Integer,Integer) same_frame(@46) same_frame(@56) same_frame(@76) append_frame(@82,Object[#19]) chop_frame(@92,1)

JDK Bug System | Webbug Group | 5 months ago
  1. 0

    FULL PRODUCT VERSION : java version "1.8.0_92" Java(TM) SE Runtime Environment (build 1.8.0_92-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode) ADDITIONAL OS VERSION INFORMATION : 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux A DESCRIPTION OF THE PROBLEM : Class compiles but fails to load: Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.VerifyError: Inconsistent stackmap frames at branch target 82 Exception Details: Location: SwitchCompilerErr.switchTo()V @82: new Reason: Type top (current frame, locals[3]) is not assignable to 'java/lang/String' (stack map, locals[3]) Current Frame: bci: @57 flags: { } locals: { 'SwitchCompilerErr', integer, integer } stack: { integer } Stackmap Frame: bci: @82 flags: { } locals: { 'SwitchCompilerErr', integer, integer, 'java/lang/String' } stack: { } Bytecode: 0x0000000: bb00 0259 b700 03b6 0004 3cbb 0002 59b7 0x0000010: 0003 b600 043d 1bab 0000 0017 0000 0001 0x0000020: 0000 0000 0000 0011 1205 4ea7 000d bb00 0x0000030: 0659 1207 b700 08bf 1cab 0000 0000 0019 0x0000040: 0000 0001 0000 0000 0000 0013 1205 4ea7 0x0000050: 000d bb00 0659 1207 b700 08bf b1 Stackmap Table: append_frame(@40,Integer,Integer) same_frame(@46) same_frame(@56) same_frame(@76) append_frame(@82,Object[#19]) chop_frame(@92,1) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) REGRESSION. Last worked in version 7u76 ADDITIONAL REGRESSION INFORMATION: java version "1.7.0_76" Java(TM) SE Runtime Environment (build 1.7.0_76-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.76-b04, mixed mode) STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : compile and run supplied code EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - expected to load and execute ACTUAL - Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.VerifyError: Inconsistent stackmap frames at branch target 82 Exception Details: Location: SwitchCompilerErr.switchTo()V @82: new Reason: Type top (current frame, locals[3]) is not assignable to 'java/lang/String' (stack map, locals[3]) Current Frame: bci: @57 flags: { } locals: { 'SwitchCompilerErr', integer, integer } stack: { integer } Stackmap Frame: bci: @82 flags: { } locals: { 'SwitchCompilerErr', integer, integer, 'java/lang/String' } stack: { } Bytecode: 0x0000000: bb00 0259 b700 03b6 0004 3cbb 0002 59b7 0x0000010: 0003 b600 043d 1bab 0000 0017 0000 0001 0x0000020: 0000 0000 0000 0011 1205 4ea7 000d bb00 0x0000030: 0659 1207 b700 08bf 1cab 0000 0000 0019 0x0000040: 0000 0001 0000 0000 0000 0013 1205 4ea7 0x0000050: 000d bb00 0659 1207 b700 08bf b1 Stackmap Table: append_frame(@40,Integer,Integer) same_frame(@46) same_frame(@56) same_frame(@76) append_frame(@82,Object[#19]) chop_frame(@92,1) at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import java.util.Random; public class SwitchCompilerErr { private void switchTo() throws Exception { int e = new Random().nextInt(); int m = new Random().nextInt(); switch (e) { case 0: String a = ""; break; default: throw new Exception("Unknown "); } // String z = ""; switch (m) { case 0: String b = ""; break; default: throw new Exception("Unknown "); } } public static void main(String[] args) throws Exception { new SwitchCompilerErr().switchTo(); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : inserting variable definition in between switch statements prevents this issue

    JDK Bug System | 5 months ago | Webbug Group
    java.lang.VerifyError: Inconsistent stackmap frames at branch target 82 Exception Details: Location: SwitchCompilerErr.switchTo()V @82: new Reason: Type top (current frame, locals[3]) is not assignable to 'java/lang/String' (stack map, locals[3]) Current Frame: bci: @57 flags: { } locals: { 'SwitchCompilerErr', integer, integer } stack: { integer } Stackmap Frame: bci: @82 flags: { } locals: { 'SwitchCompilerErr', integer, integer, 'java/lang/String' } stack: { } Bytecode: 0000000: bb00 0259 b700 03b6 0004 3cbb 0002 59b7 0000010: 0003 b600 043d 1bab 0000 0017 0000 0001 0000020: 0000 0000 0000 0011 1205 4ea7 000d bb00 0000030: 0659 1207 b700 08bf 1cab 0000 0000 0019 0000040: 0000 0001 0000 0000 0000 0013 1205 4ea7 0000050: 000d bb00 0659 1207 b700 08bf b1 Stackmap Table: append_frame(@40,Integer,Integer) same_frame(@46) same_frame(@56) same_frame(@76) append_frame(@82,Object[#19]) chop_frame(@92,1)
  2. 0

    Java ByteCode on String Array [Bad Type in putstatic]

    Stack Overflow | 11 months ago | Ruo Chun Zeung
    java.lang.VerifyError: (class: foo, method: main signature: ([Ljava/lang/String;)V) Bad type in putfield/putstatic
  3. 0

    Tomcat8 + JDK8 - Exception in thread "main" java.lang.VerifyError

    GitHub | 2 years ago | cougil
    java.lang.VerifyError: Expecting a stackmap frame at branch target 64 Exception Details: Location: org/apache/catalina/startup/Bootstrap.<clinit>()V @37: ifnull Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 1202 b801 bbb3 0046 01b3 0159 1301 bdb8 0x0000010: 01c1 b301 8f13 01c3 b800 d54b 12cc b800 0x0000020: d54c 014d 2bc6 001b bb01 8159 2bb7 01c4 0x0000030: 4e2d b601 c74d a700 0a3a 042d b601 ca4d 0x0000040: 2cc7 0034 bb01 8159 2a13 01cc b701 cf4e 0x0000050: 2db6 01d2 9900 21bb 0181 592a 1301 d4b7 0x0000060: 01cf 3a04 1904 b601 c74d a700 0b3a 0519 0x0000070: 04b6 01ca 4d2c c700 1bbb 0181 592a b701 0x0000080: c44e 2db6 01c7 4da7 000a 3a04 2db6 01ca 0x0000090: 4d2c b301 7f12 ccb2 017f b601 84b8 01d8 0x00000a0: 5712 d1b8 00d5 4e2d c700 0cb2 017f b301 0x00000b0: 86a7 0025 bb01 8159 2db7 01c4 3a04 1904 0x00000c0: b601 c73a 04a7 000c 3a05 1904 b601 ca3a 0x00000d0: 0419 04b3 0186 12d1 b201 86b6 0184 b801 0x00000e0: d857 b1 Exception Handler Table: bci [49, 54] => handler: 57 bci [100, 106] => handler: 109 bci [130, 135] => handler: 138 bci [190, 197] => handler: 200
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    java.lang.VerifyError

    GitHub | 4 years ago | cappelll
    java.lang.VerifyError: (class: rb/test/array/ArraySumApp, method: main signature: ([Ljava/lan g/String;)V) Call to wrong initialization method
  6. 0

    Simplest case of miscompiling compound conditional

    GitHub | 2 years ago | KeenS
    java.lang.VerifyError: Bad type on operand stack Exception Details: Location: If.main([Ljava/lang/String;)V @21: ifeq Reason: Type top (current frame, stack[0]) is not assignable to integer Current Frame: bci: @21 flags: { } locals: { '[Ljava/lang/String;', integer } stack: { top } Bytecode: 0x0000000: 043c 1b99 0007 1ba7 000e 014d 2cc6 0007 0x0000010: 2ca7 0004 0399 000e b200 1312 15b6 001b 0x0000020: a700 0bb2 0013 121d b600 1bb1 Stackmap Table: append_frame(@10,Integer) append_frame(@20,Null) full_frame(@21,{Object[#36],Integer},{Top}) same_frame(@35) same_frame(@43)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.VerifyError

      Inconsistent stackmap frames at branch target 82 Exception Details: Location: SwitchCompilerErr.switchTo()V @82: new Reason: Type top (current frame, locals[3]) is not assignable to 'java/lang/String' (stack map, locals[3]) Current Frame: bci: @57 flags: { } locals: { 'SwitchCompilerErr', integer, integer } stack: { integer } Stackmap Frame: bci: @82 flags: { } locals: { 'SwitchCompilerErr', integer, integer, 'java/lang/String' } stack: { } Bytecode: 0000000: bb00 0259 b700 03b6 0004 3cbb 0002 59b7 0000010: 0003 b600 043d 1bab 0000 0017 0000 0001 0000020: 0000 0000 0000 0011 1205 4ea7 000d bb00 0000030: 0659 1207 b700 08bf 1cab 0000 0000 0019 0000040: 0000 0001 0000 0000 0000 0013 1205 4ea7 0000050: 000d bb00 0659 1207 b700 08bf b1 Stackmap Table: append_frame(@40,Integer,Integer) same_frame(@46) same_frame(@56) same_frame(@76) append_frame(@82,Object[#19]) chop_frame(@92,1)

      at java.lang.Class.getDeclaredMethods0()
    2. Java RT
      LauncherHelper.checkAndLoadMain
      1. java.lang.Class.getDeclaredMethods0(Native Method)
      2. java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
      3. java.lang.Class.getMethod0(Class.java:2866)
      4. java.lang.Class.getMethod(Class.java:1676)
      5. sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
      6. sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
      6 frames