JDK-8059138 : Optimistic typing turned off crashes Nashorn
  • Type: Bug
  • Component: core-libs
  • Sub-Component: jdk.nashorn
  • Affected Version: 8u40
  • Priority: P2
  • Status: Resolved
  • Resolution: Duplicate
  • Submitted: 2014-09-25
  • Updated: 2014-09-26
  • Resolved: 2014-09-26
Related Reports
Duplicate :  
Startup time is a big issue for avatar. 

Michel says: "This bug is a big issue for avatar:  JDK-8051911.   I tested this on my own machine, and startup time is 4x slower (8u20 to 8u40).   When I turn off OT, it crashes."

We need to make sure that 8u40 runs with optimistic typing turned off without crashing and test both configurations.

Definitely a duplicate of JDK-8058561. I tested with 8u40 b07, and indeed got TypeError: Cannot call undefined in jar:file:/Users/attila/Documents/projects/avatar/avatar-js/dist/avatar-js.jar!/lib/process.js at line number 245 Replacing nashorn.jar in the 8u40 b07 JRE with the one I build from 8u-dev tip, the test passes OK.

Thank you, Michel.

I am running this on the mac. I have uploaded all necessary files, run with: ~/java/jdk8_40_b07_2014_09_23/jdk1.8.0_40/bin/java -Dnashorn.args='--optimistic-types=false' -Djava.library.path=. -jar avatar-js.jar test-assert.js

verified that this does happen with 8u40 b07 on ubuntu

This could be a duplicate of JDK-8058561 which Attila fixed a few days ago. I ran into this issue with Avatar, and it ran fine with Attila's fix.