App runs on all android mobile devices except the galaxy s4

Anyone else experienced this? I’m wondering if it’s to do with the impressively high resolution on this phone.

The game loads for a few seconds, then exits with no error message.

For those that are interested, you can download the demo of my game here:

https://play.google.com/store/apps/details?id=com.mycompany.mygame&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5teWNvbXBhbnkubXlnYW1lIl0.

Any feedback would be greatly appreciated.

what version of the engine do you use?

I downloaded the game, and it also does not work on my HTC one. It is open for about half a second then crashes.

Also, that one app with the jmonkeyengine beta 1 demos does not work on my phone either. The menu with the list of examples does, but once I select one it crashes.

@nehon

I am using SDK 3.0RC2.

I use older libraries however, I have had issues with the latest nifty libs, as well as the core jme libraries (when the app goes to sleep, upon waking it up it crashes). Also I have noticed a performance decrease in the newer libs.

I use libs I downloaded 28/11/2012.

Could the issue perhaps be related to the Galaxy S4’s high resolution? (1080 x 1920 pixels) ?

Unfortunately I do not own an S4 myself, so I am unable to debug the issue…

edit: the HTC also boasts a 1,920 by 1,080 resolution, can’t help but think this is a bit much of a coincidence.

I can confirm that the android demo will not work on the s4
https://code.google.com/p/jmonkeyengine/downloads/detail?name=Jme3Beta1Demo.apk&can=1&q=
Cannot get anything more than a black screen for any of them.

Is there a way to use VA instead of VBO’s as someone did here that is documented?
Using his application nothing works with VBO’s but with VA everything that has it implemented works (the last two tests dont support VA).

Also heres some logs when I run HelloJME3 with VBO’s: http://pastebin.com/S3KqX9s9

Again all of this on a Galaxy S4

Wasn’t there a fix sometime ago to support devices which support a lot of texture compression formats ? There was an index to small in jME or something like that. I thought someone figured this out with a Nexus 4. I don’t have time to search the forum. I have to go to sleep now…

@Vortex said: Wasn't there a fix sometime ago to support devices which support a lot of texture compression formats ? There was an index to small in jME or something like that. I thought someone figured this out with a Nexus 4. I don't have time to search the forum. I have to go to sleep now...
Yes there was. @jon81 see this issue http://hub.jmonkeyengine.org/forum/topic/nexus-4-problem/

For completion’s sake, I’d like to add that the nightly works on my GS4.

(not flawlessly, resuming from lock screen crashes, but it seems to work otherwise)

@maxyme said: (not flawlessly, resuming from lock screen crashes, but it seems to work otherwise)
Did you get this with the basic app? Could you post the crash?
<cite>@nehon said:</cite> Did you get this with the basic app? Could you post the crash?
Yes this happens with BasicGame

The log from ddms (happened when phone was unlocked):
[java]06-14 00:56:10.384: E/AndroidRuntime(30482): FATAL EXCEPTION: GLThread 53128
06-14 00:56:10.384: E/AndroidRuntime(30482): com.jme3.renderer.RendererException: An OpenGL error has occurred: invalid value
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.android.RendererUtil.checkGLError(RendererUtil.java:49)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.android.OGLESShaderRenderer.updateUniform(OGLESShaderRenderer.java:655)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.android.OGLESShaderRenderer.updateShaderUniforms(OGLESShaderRenderer.java:769)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.android.OGLESShaderRenderer.setShader(OGLESShaderRenderer.java:973)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.material.Material.render(Material.java:1116)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.RenderManager.renderGeometry(RenderManager.java:523)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.queue.RenderQueue.renderGeometryList(RenderQueue.java:322)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.queue.RenderQueue.renderQueue(RenderQueue.java:374)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.RenderManager.renderViewPortQueues(RenderManager.java:763)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.RenderManager.flushQueue(RenderManager.java:719)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:983)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.renderer.RenderManager.render(RenderManager.java:1029)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.app.SimpleApplication.update(SimpleApplication.java:252)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.app.AndroidHarness.update(AndroidHarness.java:467)
06-14 00:56:10.384: E/AndroidRuntime(30482): at com.jme3.system.android.OGLESContext.onDrawFrame(OGLESContext.java:349)
06-14 00:56:10.384: E/AndroidRuntime(30482): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
06-14 00:56:10.384: E/AndroidRuntime(30482): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
06-14 00:56:10.724: E/android.os.Debug(736): !@Dumpstate > sdumpstate -k -t -z -d -o /data/log/dumpstate_app_error[/java]

JME3 IDE Log (crash happened right when phone was locked):

[java]W/AppWidgetHostView( 736): updateAppWidget couldn’t find any view, using error view
W/AppWidgetHostView( 736): android.view.InflateException: Binary XML file line #13: Error inflating class android.widget.FrameLayout
W/AppWidgetHostView( 736): at android.view.LayoutInflater.createView(LayoutInflater.java:619)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
W/AppWidgetHostView( 736): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:666)
W/AppWidgetHostView( 736): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:691)
W/AppWidgetHostView( 736): at android.view.LayoutInflater.rInflate(LayoutInflater.java:752)
W/AppWidgetHostView( 736): at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
W/AppWidgetHostView( 736): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
W/AppWidgetHostView( 736): at android.widget.RemoteViews.apply(RemoteViews.java:2365)
W/AppWidgetHostView( 736): at android.appwidget.AppWidgetHostView.updateAppWidget(AppWidgetHostView.java:402)
W/AppWidgetHostView( 736): at android.appwidget.AppWidgetHost.createView(AppWidgetHost.java:380)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.keyguard.sec.ShortCutWidgetFrame.create(ShortCutWidgetFrame.java:73)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.keyguard.KeyguardHostView.addDefaultWidgets(KeyguardHostView.java:1690)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.keyguard.KeyguardHostView.onFinishInflate(KeyguardHostView.java:493)
W/AppWidgetHostView( 736): at android.view.LayoutInflater.rInflate(LayoutInflater.java:765)
W/AppWidgetHostView( 736): at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
W/AppWidgetHostView( 736): at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.keyguard.KeyguardViewManager.inflateKeyguardView(KeyguardViewManager.java:431)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.keyguard.KeyguardViewManager.maybeCreateKeyguardLocked(KeyguardViewManager.java:350)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.keyguard.KeyguardViewManager.show(KeyguardViewManager.java:181)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.keyguard.KeyguardViewMediator.handleShow(KeyguardViewMediator.java:1741)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.keyguard.KeyguardViewMediator.access$1700(KeyguardViewMediator.java:113)
W/AppWidgetHostView( 736): at com.android.internal.policy.impl.keyguard.KeyguardViewMediator$4.handleMessage(KeyguardViewMediator.java:1575)
W/AppWidgetHostView( 736): at android.os.Handler.dispatchMessage(Handler.java:99)
W/AppWidgetHostView( 736): at android.os.Looper.loop(Looper.java:137)
W/AppWidgetHostView( 736): at android.os.HandlerThread.run(HandlerThread.java:60)
W/AppWidgetHostView( 736): Caused by: java.lang.reflect.InvocationTargetException
W/AppWidgetHostView( 736): at java.lang.reflect.Constructor.constructNative(Native Method)
W/AppWidgetHostView( 736): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
W/AppWidgetHostView( 736): at android.view.LayoutInflater.createView(LayoutInflater.java:593)
W/AppWidgetHostView( 736): … 24 more
W/AppWidgetHostView( 736): Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f020018 a=-1 r=0x7f020018}
W/AppWidgetHostView( 736): at android.content.res.Resources.loadDrawable(Resources.java:2816)
W/AppWidgetHostView( 736): at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
W/AppWidgetHostView( 736): at android.view.View.<init>(View.java:3460)
W/AppWidgetHostView( 736): at android.view.ViewGroup.<init>(ViewGroup.java:446)
W/AppWidgetHostView( 736): at android.widget.FrameLayout.<init>(FrameLayout.java:101)
W/AppWidgetHostView( 736): at android.widget.FrameLayout.<init>(FrameLayout.java:97)
W/AppWidgetHostView( 736): … 27 more[/java]

@iwgeric
I think the ogl context get screwed when this happens. I has similar issues when switching activities.

@maxyme @nehon

That looks just like the error fixed by the last update to NativeObjectManager. The invalid value was thrown when the context was restarted due to some of the native objects not being reset.

Make sure you are using the latest svn version (ie, build it locally) until the sdk nightly updates are fixed.

<cite>@iwgeric said:</cite> @maxyme @nehon

That looks just like the error fixed by the last update to NativeObjectManager. The invalid value was thrown when the context was restarted due to some of the native objects not being reset.

Make sure you are using the latest svn version (ie, build it locally) until the sdk nightly updates are fixed.


Hmm I didnt know the nightly wasn’t updating.

Yes building from the SVN fixes the issues with locking the screen.

I have one final question, upon unlocking the screen, rotating the screen (with rotation set to use the sensor), hitting home then re-opening the app, there is a 5-20 second pause which is as long as it takes to launch. What is it doing during that time?
Its worth noting that BasicGame does the same as my game almost instantly. Does it reload the textures every time or something? Also that my game is horribly unoptimized, but I’m looking where to start to improve the speed of rotating the screen ext…

@maxyme said: I have one final question, upon unlocking the screen, rotating the screen (with rotation set to use the sensor), hitting home then re-opening the app, there is a 5-20 second pause which is as long as it takes to launch. What is it doing during that time? Its worth noting that BasicGame does the same as my game almost instantly. Does it reload the textures every time or something? Also that my game is horribly unoptimized, but I'm looking where to start to improve the speed of rotating the screen ext....

If you change the logging level in MainActivity to ALL, you’ll see everything that is going on during a rotation and unlocking. There are logs printed for when textures are reloaded and registered in NativeObjectManager.

[java]
// Set the default logging level (default=Level.INFO, Level.ALL=All Debug Info)
LogManager.getLogManager().getLogger(“”).setLevel(Level.ALL);
[/java]