Diddy - Android - Crash on DiddyData + Reflection

Monkey Programming Forums/User Modules/Diddy - Android - Crash on DiddyData + Reflection

GuShh(Posted 2014) [#1]
Hi, whenever we attempt to run the DiddyData example on Android we get a crash on all devices, I contacted the author via email but so far I haven't got a response, maybe someone here could know what's wrong?

Is 76d at fault or what am I missing?

Not only are the compile times massive but the resulting binaries are also huge. Including on html5 target, we get a 7MB or so javascript result, could someone explain why reflection is doing this? is it because of the wildcard used by the example?

Here’s the debugger output of diddydata example on android:

BUILD SUCCESSFUL
Total time: 1 minute 11 seconds
Starting: Intent { cmp=com.monkeycoder.monkeygame/.MonkeyGame }
--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
E/cutils ( 4650): to chown(/mnt/shell/emulated/0, 0, 0)
E/cutils ( 4650): to chown(/mnt/shell/emulated/obb, 0, 0)
E/cutils ( 4650): to chown(/storage/emulated/0/Android, 0, 0)
E/cutils ( 4650): to chown(/storage/emulated/0/Android/obb, 0, 0)
E/jdwp ( 4643): jdwp::setsockopt(SO_SNDTIMEO)
E/jdwp ( 4643): jdwp::setsockopt(SO_RCVTIMEO)
E/cutils ( 4676): to chown(/mnt/shell/emulated/0, 0, 0)
E/cutils ( 4676): to chown(/mnt/shell/emulated/obb, 0, 0)
E/cutils ( 4676): to chown(/storage/emulated/0/Android, 0, 0)
E/cutils ( 4676): to chown(/storage/emulated/0/Android/obb, 0, 0)
E/cutils ( 4696): to chown(/mnt/shell/emulated/0, 0, 0)
E/cutils ( 4696): to chown(/mnt/shell/emulated/obb, 0, 0)
E/cutils ( 4696): to chown(/storage/emulated/0/Android, 0, 0)
E/cutils ( 4696): to chown(/storage/emulated/0/Android/obb, 0, 0)
E/.AppDataSearchProvider( 2871): Could not connect to AppDataSearchClient for registerCorpora, error 2
E/cutils ( 4713): to chown(/mnt/shell/emulated/0, 0, 0)
E/cutils ( 4713): to chown(/mnt/shell/emulated/obb, 0, 0)
E/cutils ( 4713): to chown(/storage/emulated/0/Android, 0, 0)
E/cutils ( 4713): to chown(/storage/emulated/0/Android/obb, 0, 0)
E/.AppDataSearchProvider( 2871): Could not connect to AppDataSearchClient for onTableChanged, error 2
E/cutils ( 4742): to chown(/mnt/shell/emulated/0, 0, 0)
E/cutils ( 4742): to chown(/mnt/shell/emulated/obb, 0, 0)
E/cutils ( 4742): to chown(/storage/emulated/0/Android, 0, 0)
E/cutils ( 4742): to chown(/storage/emulated/0/Android/obb, 0, 0)
I/[Monkey]( 4676): Monkey Runtime Error : Invalid int: ""
I/[Monkey]( 4676): C:/Monkey/MonkeyPro76d/modules/diddy/diddydata.monkey<106>
I/[Monkey]( 4676): C:/Monkey/MonkeyPro76d/modules/diddy/diddydata.monkey<47>
I/[Monkey]( 4676): C:/Monkey/MonkeyPro76d/modules/diddy/framework.monkey<569>
I/[Monkey]( 4676): C:/Monkey/MonkeyPro76d/bananas/diddy/examples/DiddyData/diddydata_example.monkey<23>
I/[Monkey]( 4676): C:/Monkey/MonkeyPro76d/modules/diddy/framework.monkey<213>
I/[Monkey]( 4676): C:/Monkey/MonkeyPro76d/modules/mojo/app.monkey<43>
E/AndroidRuntime( 4676): FATAL EXCEPTION: GLThread 28123
E/AndroidRuntime( 4676): java.lang.NumberFormatException: Invalid int: ""
E/AndroidRuntime( 4676): at java.lang.Integer.invalidInt(Integer.java:138)
E/AndroidRuntime( 4676): at java.lang.Integer.parseInt(Integer.java:359)
E/AndroidRuntime( 4676): at java.lang.Integer.parseInt(Integer.java:332)
E/AndroidRuntime( 4676): at com.monkeycoder.monkeygame.c_DiddyData.p_LoadXMLImages(MonkeyGame.java:8522)
E/AndroidRuntime( 4676): at com.monkeycoder.monkeygame.c_DiddyData.m_DiddyData_new(MonkeyGame.java:8707)
E/AndroidRuntime( 4676): at com.monkeycoder.monkeygame.c_DiddyApp.p_LoadDiddyData(MonkeyGame.java:3036)
E/AndroidRuntime( 4676): at com.monkeycoder.monkeygame.c_MyGame.p_Create(MonkeyGame.java:3672)
E/AndroidRuntime( 4676): at com.monkeycoder.monkeygame.c_DiddyApp.p_OnCreate(MonkeyGame.java:3187)
E/AndroidRuntime( 4676): at com.monkeycoder.monkeygame.c_GameDelegate.StartGame(MonkeyGame.java:3705)
E/AndroidRuntime( 4676): at com.monkeycoder.monkeygame.BBGame.StartGame(MonkeyGame.java:517)
E/AndroidRuntime( 4676): at com.monkeycoder.monkeygame.BBAndroidGame.onDrawFrame(MonkeyGame.java:1306)
E/AndroidRuntime( 4676): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
E/AndroidRuntime( 4676): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
E/AppErrorDialog(14444): Failed to get ILowStorageHandle instance
E/JavaBinder(14444): !!! FAILED BINDER TRANSACTION !!!
E/JavaBinder(14444): !!! FAILED BINDER TRANSACTION !!!
E/FWKEXT (14444): Enter GetCurrentOP
E/FWKEXT (14444): Enter GetCurrentOP
E/FWKEXT (14444): Enter GetCurrentOP
E/FWKEXT (14444): Enter GetCurrentOP
E/FWKEXT (14444): Enter GetCurrentOP
E/FWKEXT (14444): Enter GetCurrentOP
E/InputDispatcher(14444): channel '43029200 com.monkeycoder.monkeygame/com.monkeycoder.monkeygame.MonkeyGame (server)' ~ Channel is unrecoverably broken and will be disposed!
E/hwcomposer_v1.0( 125): [WKR] Timed out waiting for FrameSyncThread...
E/ReaderDataProvider( 4585): In Query READER_LATESTBOOKPATH_ID!!!!!
E/ (14012): AudioCloseDumpPCMFile file== NULL
E/ (14012): AudioCloseDumpPCMFile file== NULL


Any help will be appreciated!
Thanks,


therevills(Posted 2014) [#2]
I contacted the author via email but so far I haven't got a response,

You only emailed me yesterday... I do have a life away from Monkey :/

As to your question, due to the way Monkey and DiddyData uses reflection it currently includes everything causes huge files and long compile times.

And with that error log, it looks like Monkey isn't converting something correctly in LoadXMLImages... Is that just from the example file or your own code?


GuShh(Posted 2014) [#3]
Hi therevills,
Don't get me wrong I wasn't complaining for "lack of support" or anything like that, I just thought in the meantime someone else could chip in while I waited for your answer. I was just stating that I did contact you about it -- But maybe I should have phrased it differently :P

With both my code and the bare example I'm getting the same errors on all Android (4.2.2) devices I tested it with (4 in total now)

Is reflection absolutely required to use DiddyData just as a list for the media files? Should I be looking at some other alternative?

Thanks,
Gus


therevills(Posted 2014) [#4]
Sorry - woken up in a bad mood (got a headache...) :)

Any chance you can post your bare bones example?


GuShh(Posted 2014) [#5]
Hi, it's the same one provided in diddy/examples/DiddyData/