Can't run anything on Android 5 Lollipop

Monkey Targets Forums/Android/Can't run anything on Android 5 Lollipop

arawkins(Posted 2015) [#1]
I've been getting reports that my game is crashing on Android 5, so I decided today to try to start work on an update. However after setting up a few devices on the Android Emulator I've found that I can't get anything to run, including some simpler bananas. I've tested using v82b and v83b. Android 4 seems to still work fine for me.

At first I started getting this error:

java.lang.IllegalArgumentException: No config chosen


After a quick google I ended up implementing this solution: http://stackoverflow.com/questions/14167319/android-opengl-demo-no-config-chosen

By adding this line:
_view.setEGLConfigChooser(8, 8, 8, 8, 16, 0);

To line 616 of MonkeyXPro83b\targets\android_new\modules\native\androidgame.java (right before the call to _view.setRenderer( this );)

That seemed to fix the error, but it still crashes. This is what I get for output:

BUILD SUCCESSFUL
Total time: 10 seconds
Starting: Intent { cmp=com.monkeycoder.monkeygame/.MonkeyGame }

--------- beginning of main

E/memtrack( 2524): Couldn't load memtrack module (No such file or directory)

E/android.os.Debug( 2524): failed to load memtrack module: -2

--------- beginning of system

E/art     ( 2524): Thread attaching while runtime is shutting down: Binder_1

E/libprocessgroup( 2534): failed to make and chown /acct/uid_10053: Read-only file system

I/[Monkey]( 2534): Display modes:

--------- beginning of crash

F/libc    ( 2534): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 2549 (GLThread 182)


I get the same results using both the android_new and android targets. I have the latest Android sdk installed (sdk-21), as well as two different older ones (sdk-13 and sdk-19). I've also tried playing with the min and target sdk numbers in the manifest but it doesn't seem to have any effect.

Has anyone else been able to get something running Android 5, or have any idea what I'm doing wrong? I think I am a little out of my depth here as that second crash error message makes absolutely no sense to me.


skid(Posted 2015) [#2]
I have had no problem running monkey apps on lollipop (nvidia shield).


arawkins(Posted 2015) [#3]
Hmmm, ok. That's good to know. Maybe it is an issue specific to the emulator. I will try to upgrade my phone to lollipop and see if it runs there.


Xaron(Posted 2015) [#4]
No problems here as well. My old apps run too. HTC One M8 with Lollipop.


Sensei(Posted 2015) [#5]
Using Monkey-X V80c and tested on both my Nexus 10 and Nexus 5 running lollipop, as well as HTC One running 4.4.2 and all works fine for me too.


silentshark(Posted 2015) [#6]
Good news. There was an earlier Android update (I forget, 4.1 or something) which broke all my Android apps :-(

Glad things look positive to lollipop


slenkar(Posted 2015) [#7]
Talking of android lollipop has anyone tried compiling a monkey android app in debug mode (monkey debug mode) opening the app, minimizing it and then bringing it back on screen?

It crashes on my tablet.

the bouncyaliens demo can be used


arawkins(Posted 2015) [#8]
Thanks everyone for the info. Thought I would update with my progress in case it helps anyone. I ended up getting a Nexus 7 with Lollipop on it for testing and was able to sort out my problems. My game was still crashing on device, but it was an out of memory crash, which I was able to troubleshoot and fix. So I guess the moral is don't trust the emulator :)

@slenkar I tried reproducing that but had no luck. My game suspends/resumes ok with a debug build.


slenkar(Posted 2015) [#9]
ok thanks for testing

How did you troubleshoot the out of memory error?

Im getting that error on android but not on desktop or html5


arawkins(Posted 2015) [#10]
I added android:largeHeap=true to the <application> tag in the manifest. I think it was a bit of a kludge fix, but the out of memory error I was getting was saying something like "requested 10MB, only 4MB available", which seemed kind of silly on a tablet with 2gb of memory. The same art assets loaded onto my Android 4 phone worked fine as well, so I decided to just go with the quick fix. I haven't had any crash reports on the new version I put out on Google Play so I think it's working for people.


SLotman(Posted 2016) [#11]
Hmmm. I just got a bug report on Google Play about the exact same issue.

java.lang.IllegalArgumentException: No config chosen
	at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:882)
	at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:1032)
	at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1409)
	at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1248)


On Adroid 4.2, the device a Galaxy Ace3 Duos TV (logandsdtv)

I have no other bug reported of this version - neither do I have that phone to test my game... looking on Google for an answer, I found the same suggestion on the first post, to use setEGLConfigChooser(8, 8, 8, 8, 16, 0); - but I'm afraid to break things if I add that... does anyone have any advice?

If someone have that specific cell model, would you mind running this game and telling me if it works or not? The game is free :)