我的基於OpenGL的Live Wallpaper項目遇到了很大的問題。我設法將我的2D動態壁紙從畫布移動到opengl,並且所有外觀都很好,但是...該死的總有一些東西Android OpenGL動態壁紙崩潰 - 馬裏EGL錯誤?
當我設置livewallpaper並重新打開動態壁紙設置菜單時,選擇了相同的壁紙,然後返回或接受它崩潰...但它只在我的三星Galaxy Note(Android 4.04)崩潰。它也崩潰時,我設置了一些其他壁紙後,我的壁紙,但總是相同的。我試過三星Ace(android 2.37) - 並且工作得很好。那到底是什麼?
我已經根據http://www.learnopengles.com/how-to-use-opengl-es-2-in-an-android-live-wallpaper/項目製作了它。你知道什麼 - 原始項目會引發同樣的錯誤。那麼它只是SG Note問題。我一直工作在2個月以來這個項目,我已經完成的allmost - 現在我有點desperated所以請幫助:)
11-26 20:13:41.853: I/dalvikvm-heap(26738): Grow heap (frag case) to 13.956MB for 1048592-byte allocation
11-26 20:13:41.873: D/dalvikvm(26738): GC_CONCURRENT freed <1K, 78% free 14064K/63495K, paused 2ms+3ms
11-26 20:13:43.238: D/dalvikvm(26738): GC_CONCURRENT freed 1667K, 80% free 12786K/63495K, paused 6ms+20ms
11-26 20:13:46.978: E/SurfaceTextureClient(26738): queueBuffer: error queuing buffer to SurfaceTexture, -19
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_queue_buffer(mali_base_ctx_type*, egl_buffer*):851 [EGL-ERROR] unable to queue buffer (0x3222ec)
11-26 20:13:46.988: E/SurfaceTextureClient(26738): queueBuffer: error queuing buffer to SurfaceTexture, -19
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_queue_buffer(mali_base_ctx_type*, egl_buffer*):851 [EGL-ERROR] unable to queue buffer (0x2d3fac)
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.988: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.993: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:46.998: E/MaliEGL(26738): void __egl_platform_dequeue_buffer(egl_surface*):1094 [EGL-ERROR] failed to dequeue buffer from native window (0x2d4358); err = -19, buf = 0x0
11-26 20:13:47.028: E/SurfaceTextureClient(26738): ISurfaceTexture::setBufferCount(0) returned No such device
11-26 20:13:47.063: W/dalvikvm(26738): threadid=12: thread exiting with uncaught exception (group=0x40c461f8)
11-26 20:13:47.068: E/AndroidRuntime(26738): FATAL EXCEPTION: GLThread 11491
11-26 20:13:47.068: E/AndroidRuntime(26738): java.lang.RuntimeException: eglSwapBuffers failed: EGL_BAD_ALLOC
11-26 20:13:47.068: E/AndroidRuntime(26738): at android.opengl.GLSurfaceView$EglHelper.throwEglException(GLSurfaceView.java:1178)
11-26 20:13:47.068: E/AndroidRuntime(26738): at android.opengl.GLSurfaceView$EglHelper.swap(GLSurfaceView.java:1136)
11-26 20:13:47.068: E/AndroidRuntime(26738): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1463)
11-26 20:13:47.068: E/AndroidRuntime(26738): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1216)
11-26 20:13:47.123: D/dalvikvm(26738): GC_EXPLICIT freed 178K, 80% free 12779K/63495K, paused 1ms+18ms
http://stackoverflow.com/questions/6039107/android-glsurfaceview-egl-bad-alloc - 也許你嘗試渲染後,GLSurfaceView已經不見了。 – zapl