But "debugging" on the phone, without debugger at the ready, is a whole lot of fun. Mainly because on the phone, you don't have backtraces.
(Next time I might try OTA debugging, but right now I don't even know what exactly that is...)
The Lua VM must be triggering some bug in the emulator, I thought, too bad for me. And I released a testing version that worked perfectly on my phone.
Oddly enough, the Lua VM managed to trigger a bug in Nokia phones too. They would freeze or reset when attempting to run the midlet.
Solution? Let me quote a mail from Kristofer Karlsson, developer of Kahlua:
Someone previously mentioned that the function System.identityHashcodeIsn't that funny?
crashed for some strings such as "error"
Fortunately, the solution is simple: instead of System.identityHashcode(a), use a.hashCode().
Apparently, the identityHashcode function was slightly broken in older JVM's (and the WTK too, apparently. oh, and in Nokia phones. but oh well, i never liked Nokia anyway) and it couldn't cope with too many internalized strings.