VerifyError: Bad type on operand stack

Tal Liron tal.liron at
Thu Sep 12 11:39:22 PDT 2013

Thanks. Unfortunately I can't isolate specific JavaScript code in this 
instance for you to reproduce, because I'm trying to run a rather large 
application that works in Rhino and I don't know what specifically 
causes the failure. The stack trace doesn't tell me much, but it might 
help you. Would be more than happy to help you debug.

Version (the new early release of the JDK):

java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b106)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b48, mixed mode)


java.lang.VerifyError: Bad type on operand stack
Exception Details:
@101: invokevirtual
     Type 'java/lang/Object' (current frame, stack[0]) is not assignable 
to 'jdk/nashorn/internal/runtime/ScriptObject'
   Current Frame:
     bci: @101
     flags: { }
     locals: { 'jdk/nashorn/internal/runtime/ScriptFunction', 
'java/lang/Object', '[Ljava/lang/Object;', 'java/lang/Object', 
'jdk/nashorn/internal/runtime/ScriptObject', top, 
'jdk/nashorn/internal/objects/NativeArray', 'java/lang/Object', 
'java/util/Iterator' }
     stack: { 'java/lang/Object', integer }
     0000000: 2ab6 0018 3a04 2c2a 04b8 007e 4eb2 006b
     0000010: 3a07 08b8 0048 5904 1904 ba00 8100 0053
     0000020: b800 4e3a 062d 03b6 0085 ba00 8800 004e
     0000030: 2db8 008c 3a08 a700 2319 08b9 0092 0100
     0000040: 3a07 1906 59ba 0095 0000 5f2d 1907 ba00
     0000050: 9900 00ba 009a 0000 5719 08b9 009e 0100
     0000060: 9aff d92d 03b6 0085 ba00 a100 0059 ba00
     0000070: a400 005f 1906 ba00 9a00 0057 b200 6bb0
   Stackmap Table:

     at java.lang.Class.getDeclaredFields0(Native Method)
     at java.lang.Class.privateGetDeclaredFields(
     at java.lang.Class.getDeclaredField(
     at jdk.nashorn.internal.codegen.Compiler$
     at jdk.nashorn.internal.codegen.Compiler$
     at Method)
     at jdk.nashorn.internal.codegen.Compiler.install(
     at jdk.nashorn.internal.codegen.Compiler.install(
     at jdk.nashorn.internal.runtime.Context.compile(
     at jdk.nashorn.internal.runtime.Context.compileScript(
     at jdk.nashorn.internal.runtime.Context.compileScript(

On 09/13/2013 02:24 AM, Jim Laskey (Oracle) wrote:
> We're hoping to have the new bug tracking system online soon, but in the meantime to can send an e-mail here.  Describe the problem, a "small" test case that reproduces the problem (we generally don't isolate bugs) and how to reproduce the problem.

More information about the nashorn-dev mailing list