CustomNPCs will not compatible with RTM.
fixRTM 2.0.20 may fixes this problem so please try fixRTM 2.0.20.
The problem is caused by CustomNPCs so It's hard to fix by fixRTM but there's a workaround.
To workaround this problem, please remove '-strict' from the property NashorArguments in CustomNpcs.cfg like in the image.
Both RTM and CustomNPCs uses Nathorn to execute JavaScript. The CustomNPCs sets -struct
to nashorn.args
system property to make all scripts on CustomNPCs run on struct mode. However, RTM is depens on non-struct mode of JavaScript. That's why there's incompatiblity.
The way to completely fix this problem is that make CustomNPCs not depneds on nathorn.args
system property. Of cource, we can temporally clean system property but the problem still can be happened randomlly.
I found that thread of calling Nashorn in RTM is different from in CustomNPCs. So I made thread-local properties implementation and use it to reset nashorn.args
for RTM.