Please fix the StackOverFlowError. This is affecting a lot of people. It happens because Nashorn relies on Java serialization but the way the AST is structured causes extremely deep nesting for certain expressions. Yes, the scripts that cause this are poorly written but other JS engines have no problems handling them – so it needs to be fixed in Nashorn.
Link for details: https://youtrack.jetbrains.com/issue/IDEA-157806