Luaj 2.0.3 works, but 3.0 does not
Brought to you by:
ian_farmer,
jim_roseborough
On Cinterion TC65i JME platform, luaj 2.0.3 works. After switching to 3.0, the following error started appearing:
JAVA ERROR: Unrecoverable error in MIDlet.startApp() java.lang.Error: 137 java.lang.Error: 137 - org.luaj.vm2.LuaTable$Entry.find(), bci=2 - org.luaj.vm2.LuaTable.hashset(), bci=47 - org.luaj.vm2.LuaTable.rawset(), bci=22 - org.luaj.vm2.LuaTable.set(), bci=57 - org.luaj.vm2.LuaValue.set(), bci=6 - org.luaj.vm2.lib.BaseLib.call(), bci=49 - org.luaj.vm2.LuaValue.load(), bci=5 - org.luaj.vm2.lib.jme.JmePlatform.standardGlobals(), bci=16 - org.pictus.jean.Jean.initApp(), bci=338 - org.pictus.jean.Jean.startApp(), bci=46 - javax.microedition.midlet.Main.run(), bci=3
The following statement is enough for the error to occur:
Globals globals = JmePlatform.standardGlobals();
The error seems to happen in src/core/org/luaj/vm2/LuaTable.java in the StrongSlot find(LuaValue) method of the "Entry" class.
I have found that this issue can be solved by the following patch:
I am no expert in Java. (This is why I need Lua :-) So I cannot tell if it is an error to omit the keyeq() and keyindex() methods in the abstract class. However, after adding them as shown above the code executes correctly on my JME platform.
Last edit: Rostislav Opocensky 2014-08-20
Applying this patch for version 3.0.1, however, I have no way to reproduce this so can't verify that it is really fixed.
Is fixed in version 3.0.1.