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)

JDK Bug System | Webbug Group | 11 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  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 | 11 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: 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)
  2. 0

    GitHub comment 65#191043845

    GitHub | 1 year ago | Storyyeller
    java.lang.VerifyError: Bad instruction: a8 Exception Details: Location: Confusion.main([Ljava/lang/String;)V @0: jsr Reason: Error exists in the bytecode Bytecode: 0x0000000: a800 1cb2 0008 1201 b600 09b1 0304 b800 0x0000010: 0a99 0007 57a7 0007 5f4c a901 a8ff f0b2 0x0000020: 0008 1202 b600 09b1
  3. 0

    StackMapTable attribute not generated automatically

    GitHub | 1 year ago | toddATavail
    java.lang.VerifyError: Expecting a stackmap frame at branch target 25 Exception Details: Location: SumIntegersApp.main([Ljava/lang/String;)V @7: if_icmpge Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 0359 3c3d 1c2a bea2 0012 2a1c 32b8 0006 0x0000010: 1b60 3c84 0201 a7ff eeb2 0007 1bb6 0008 0x0000020: b1
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    FULL PRODUCT VERSION : java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) Client VM (build 25.102-b14, mixed mode) ADDITIONAL OS VERSION INFORMATION : Microsoft Windows [Version 6.1.7601] A DESCRIPTION OF THE PROBLEM : This appears to be quite similar to JDK-8129740 but does not involve lambdas. The code compiles but produces VerifyError when runs. Possibly the compiler should not have allowed it at all, as the anonymous inner class is non-static code in the class being instantiated, and the supertype constructor has not been entered yet. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Compile and run the supplied code. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Probably a compiler error. ACTUAL - Successful compilation, but a runtime error. ERROR MESSAGES/STACK TRACES THAT OCCUR : Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.VerifyError: Bad type on operand stack Exception Details: Location: javacbug.<init>()V @18: invokespecial Reason: Type uninitializedThis (current frame, stack[3]) is not assignable to 'javacbug' Current Frame: bci: @18 flags: { flagThisUninit } locals: { uninitializedThis } stack: { uninitializedThis, uninitialized 1, uninitialized 1, uninitializedThis, 'Outer' } Bytecode: 0x0000000: 2abb 0001 592a bb00 0259 b700 0359 b600 0x0000010: 0457 b700 05b7 0006 b1 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 ---------- class Base { Base(Object o) {} } class Outer { class Inner {} } class javacbug extends Base { javacbug() { super(new Outer().new Inner() {}); } public static void main(String[] args) { new javacbug(); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : Instantiate the Inner object somewhere else; either a static method, or after the supertype constructor has returned.

    JDK Bug System | 8 months ago | Webbug Group
    java.lang.VerifyError: Bad type on operand stack Exception Details: Location: javacbug.<init>()V @18: invokespecial Reason: Type uninitializedThis (current frame, stack[3]) is not assignable to 'javacbug' Current Frame: bci: @18 flags: { flagThisUninit } locals: { uninitializedThis } stack: { uninitializedThis, uninitialized 1, uninitialized 1, uninitializedThis, 'Outer' } Bytecode: 0x0000000: 2abb 0001 592a bb00 0259 b700 0359 b600 0x0000010: 0457 b700 05b7 0006 b1
  6. 0

    GitHub comment 122#210509792

    GitHub | 1 year ago | cflee
    java.lang.VerifyError: Local variable table overflow Exception Details: Location: python/test/__init__.<clinit>()V @233: aload_1 Reason: Local index 1 is invalid Bytecode: 0x0000000: 014b b200 0813 000e bb00 0359 1300 10b8 0x0000010: 0012 b700 18b9 001c 0300 57bb 0022 59bb 0x0000020: 0024 5905 b700 2659 bb00 2959 04b7 002b 0x0000030: b900 2c02 0057 59bb 0029 5905 b700 2bb9 0x0000040: 002c 0200 57b7 0032 4bb2 0008 1300 0eb9 0x0000050: 0035 0200 c000 0313 0039 2ab9 003b 0300 0x0000060: bb00 2259 bb00 2459 04b7 0026 59bb 0029 0x0000070: 5906 b700 2bb9 002c 0200 57b7 0032 4bb2 0x0000080: 0008 1300 0eb9 0035 0200 c000 0313 0041 0x0000090: 2ab9 003b 0300 b200 0813 000e b900 3502 0x00000a0: 00c0 0003 1300 43b9 0045 0200 c000 4904 0x00000b0: bd00 3c59 03b2 0008 1300 0eb9 0035 0200 0x00000c0: c000 0313 0039 b900 4502 00b2 0008 1300 0x00000d0: 0eb9 0035 0200 c000 0313 0041 b900 4502 0x00000e0: 00b2 004b 4b2a b600 512b b600 51a5 001f 0x00000f0: 2ab6 0051 2bb6 0057 a500 142b 2ab9 005b 0x0000100: 0200 4b2a b200 4ba5 0005 2db0 2a2b b900 0x0000110: 5b02 004b 2ab2 004b a500 052a b01c a000 0x0000120: 142b 2ab9 005b 0200 4b2a b200 4ba5 0005 0x0000130: 2ab0 bb00 5f59 1300 6106 bd00 5259 032a 0x0000140: b900 6301 0053 5904 1300 6753 5905 2bb9 0x0000150: 0063 0100 53b8 0068 b700 6ebf 53bb 0071 0x0000160: 59b7 0073 b900 7503 0057 b200 7957 b1b1 0x0000170:

    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: 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()
    2. Java RT
      LauncherHelper.checkAndLoadMain
      1. java.lang.Class.getDeclaredMethods0(Native Method)
      2. java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
      3. java.lang.Class.privateGetMethodRecursive(Class.java:3048)
      4. java.lang.Class.getMethod0(Class.java:3018)
      5. java.lang.Class.getMethod(Class.java:1784)
      6. sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
      7. sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
      7 frames