When using the Native JSON libraries, I experience much instability, which is worse on Android devices (through a built APK) than on Windows (through the Gideros Player).
The Player gives a Runtime Error once every while when trying to decode JSON, and the Android app crashes almost every time when decoding JSON. I haven't got around to properly debugging the Android crash yet, but it seems like some errors exist in the implementation. I followed the HTML ReadMe provided in the JSON zip for installation.
Comments
Can you please provide a small Gideros project example, which has the crash and I will look int that
Fragmenter - animated loop machine and IKONOMIKON - the memory game
For me, after some testing the native json works fine in the android player and also in the windows player, no crashes so far. I just use the datasaver module and changed every occurence of Json.Decode to json.decode and Json.Encode to json.encode so that it uses the native json instead of the json lua file it used before.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Thats why I thought thats some special occasion which might have the problem.
But good idea updating dataSaver, will update it in github repo, since NativeJson is now bundled with Gideros
What's weird about this is that we load a menu (tabs, max 5 strings) and messages (max 10 objects with about 10 parameters each), but the menu always loads and the app crashes at loading the messages.
Will debug this properly monday (no phone connector cable at the office)
Likes: ar2rsawseen
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Does it crash even through pcall?
https://deluxepixel.com
https://play.google.com/store/apps/developer?id=Into-It+Games
http://appstore.com/LidiaMaximova
And from what I see in the code, there is a json.safe , which has same encode/decode methods.
But from my tests it still did crash on some occasions. But maybe it would help someone
On the built-in one if you try json in an empty string then instead of returning nil, it crashes.
https://deluxepixel.com
Likes: SinisterSoft
Thanks in advance
http://www.lua.org/pil/22.1.html