title: VerifyError: Stack size too large (what does it mean?)
body: <p>I'm fairly new to Java bytecode.  I'm using BCEL to generate bytecode, but I get an error message when I try to use the generated code.  (In hindsight, it looks like ObjectWeb ASM is more advanced and more commonly used than BCEL.)</p>
  
  <p>Here is the error message:</p>
  
  <pre><code>Exception in thread "main" java.lang.VerifyError: 
  (class: cb/io/FileDescriptor, method: set 
   signature: (I)J) 
  Stack size too large
  </code></pre>
  
  <p>Here is the method:</p>
  
  <pre><code>// Method descriptor #4 (I)J
  // Stack: 0, Locals: 1
  private static long set(int arg1);
    0  lconst_0
    1  lreturn
      Local variable table:
        [pc: 0, pc: 2] local: arg1 index: 0 type: int
  </code></pre>
  
  <p>From what I understand, the local variable table is correct because it matches the input parameter.  I haven't added a 'this' variable because the method is static.</p>
  
  <p>If I'm not mistaken, lconst_0 loads a long value of 0 onto the stack, and lreturn consumes that value and returns it.</p>
  
  <p>What am I doing wrong?  Is there enough information here to tell?</p>
  
  <p>Thanks!</p>