Android not working - apk crash on start

Monkey Targets Forums/Android/Android not working - apk crash on start

Tibit(Posted 2013) [#1]
I get it to work with a plain simple monkey demos, but anything bigger fails.

It seems the App crash on start. Same in simulator as on my Nexus 10.

Someone mentioned this could do with sound?

The game are fairly small but still have some art - they are not using texture atlases? Can this be it?

Any thing you can suggest I should try to disable or enable to debug this?


AdamRedwoods(Posted 2013) [#2]
are you getting a crash report in debug mode? copy a few lines of that and post in in a codebox.


ziggy(Posted 2013) [#3]
It will crash with sound if volume gets higher than 1, also there was a limit on pitch (rate) not sure if anything else.


Tibit(Posted 2013) [#4]
Crashes on iOS also, for all three games.

Btw - Using version v71b!

This error on iOS: http://www.monkeycoder.co.nz/Community/posts.php?topic=5381


AdamRedwoods(Posted 2013) [#5]
my guess is it's running out of image memory.
...but also make sure to delete the .build folder (if you haven't modified it).

also, is this only in release mode? any error dumps when using debug mode?


Tibit(Posted 2013) [#6]
It seems monkey don't like my nexus 10, so it won't auto copy at run & debug. However what I do is that I build and go into the android/bin/ folder and find the apk file and transfer it to my nexus 10 and install the game.

If it is image mem (worthwhile to test). How can I calculate image memory and make sure I'm below?

However launching the app installed from the APK file (called monkey game) I only get a popup when I click the icon that says "Unfortunately, Monkey Game has stopped." OK.


Amon(Posted 2013) [#7]
I get this error too sometimes and nearly each and every time it was because it couldn't find a certain image in the image bank. Make sure there is no typo etc..


Volker(Posted 2013) [#8]
My app, working fine on V66, crashes on V71b with an out of memory error
under android. HTML5 works fine.
I guess it has to do with MonkeyV71.




AdamRedwoods(Posted 2013) [#9]
E/AndroidRuntime(31032): at com.monkey.c_GameImage.p_Load(MonkeyGame.java:5478)

E/AndroidRuntime(31032): at com.monkey.c_GameImage.p_LoadTileset(MonkeyGame.java:5512)

that looks like the heap hitting its limit from an image that's too big.


Tibit(Posted 2013) [#10]
Yes it works better on an older version.

Not I have managed to get it to run --> I changed to version 70f, but now when I start the App I instead only see a black screen :(

I'm not sure my game even runs in v66, but I'll test that!


Tibit(Posted 2013) [#11]
> that looks like the heap hitting its limit from an image that's too big.

Is there anything I can do about that?

I added Texture Packer and now everything is in one texture instead of many small. I hope that did not make it worse?


Tibit(Posted 2013) [#12]
v66 won't even build. Get's lots of errors.

v68c does build, however I have the same "Black screen" problem.


Tibit(Posted 2013) [#13]
Here I uploaded the full source code /w art and sound, feel free to test on your android/ios system and please let me know if you can make it work, or find the debug output.


Ironstorm(Posted 2013) [#14]
I've got it working here on my HTC One X with Monkey V69 so far.

There seems to be a problem with Chartboost. I had to comment out all chartboost related lines and now it's working.


Tibit(Posted 2013) [#15]
Oh that is awesome!

I'll do that and take it from there, many thanks! :)

btw how did you arrive at that? did you get any specific android debug output? Just want to make sure I learn this to next time :)


Tibit(Posted 2013) [#16]
Yes disabling chartboost got it working for me too. Phew! :)