Cadiboo / NoCubes

A mod for 1.12.2+ that creates smooth terrain in Minecraft
https://Cadiboo.github.io/projects/nocubes/
GNU Lesser General Public License v3.0
140 stars 12 forks source link

nashorn error in bundled jre affects transformer output #42

Closed MamiyaOtaru closed 5 years ago

MamiyaOtaru commented 5 years ago

in block-state-transformer.js (1.14 version), the break on line 462 causes the finally block to execute immediately. It happens before hasFinished set, so it logs a spurious exception (and pops currentlyRunning). Control then returns to the end of the for loop, and finish() gets called (with currentlyRunning empty, so undefined, because of the pop in finally). Then hasFinished gets set and then the finally block happens a second time (without logging another exception at least).

This appears to be a bug in Nashorn (see https://wiki.openjdk.java.net/pages/viewpage.action?pageId=22937606 ). It was fixed in 8u60, while the JRE bundled with Minecraft (on my machine at least) is 8u51. So this error manifests with the bundled JRE but I can confirm it does not when using an up to date non-bundled JRE8.

The practical effect seems to be cosmetic only with respect to loading your transformer, but it may be of interest to you if you are seeing that behavior, and control flow in this or any other transformer that has to do with more than logging might be adversely affected.

Cadiboo commented 5 years ago

Thanks for this info!