Author Topic: glError 1280 on Android 4.2  (Read 917 times)

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
glError 1280 on Android 4.2
« on: December 12, 2013, 08:05:12 am »
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
Code: [Select]
GLSLShader.setShaderLocator(new ShaderLocator(getAssets()));

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

Code: [Select]
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)


« Last Edit: December 12, 2013, 08:18:22 am by kiffa »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: glError 1280 on Android 4.2
« Reply #1 on: December 12, 2013, 09:47:18 pm »
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.

Offline kiffa

  • long
  • ***
  • Posts: 199
    • View Profile
Re: glError 1280 on Android 4.2
« Reply #2 on: December 14, 2013, 06:00:09 am »
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).

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: glError 1280 on Android 4.2
« Reply #3 on: December 16, 2013, 11:12:40 am »
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.