glError 1280 on Android 4.2

Started by kiffa, December 12, 2013, 08:05:12 AM

Previous topic - Next topic

kiffa

My game crashes on Android 4.2(test with only one device who has a heavily customized system based on Android 4.2), but runs well on other versions(2.3 - 4.4).

First, seems the engine can't find the default shader-files in jar, so I push all sharder-files into a zip named "jpct_shaders.zip", and put it in "assets" of project, then call

GLSLShader.setShaderLocator(new ShaderLocator(getAssets()));


When I run game again, the engine found shader-files, but crashed when gen VBO, logs:


12-12 14:40:07.394: W/dalvikvm(10293): threadid=15: thread exiting with uncaught exception (group=0x41578930)
12-12 14:40:07.416: W/System.err(10293): java.lang.RuntimeException: [ 1386830407375 ] - ERROR: before: glError 1280
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.Logger.log(Logger.java:193)
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.checkError(GL20.java:147)
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.glGenBuffers(GL20.java:1354)
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.compileToVBO(CompiledInstanceFP.java:1199)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.render(CompiledInstanceFP.java:74)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:2211)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(World.java:1351)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(World.java:1091)
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.renderWorld(GameRenderer.java:596)
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.handleGameRender(GameRenderer.java:516)
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.onDrawFrame(GameRenderer.java:171)
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)




EgonOlsen

Could be everything...most likely a driver problem of some kind. Try to set http://www.jpct.net/jpct-ae/doc/com/threed/jpct/Config.html#internalMipmapCreation to true. It helped with a similar problem on some other device.

kiffa

Setting "Config.internalMipmapCreation = true" resolve it, thanks.

I want to always set this option to true in order to support most devices, but I don't know if there is any disadvantages than GPUMipmapCreation(such as loading time、memory usage\peak、performance and so on).

EgonOlsen

Not really...rumors are that doing it on the cpu is slower, but i never really noticed that. I'll make this setting default in the next version anyway.