0

我的基于 OpenGL 的动态壁纸项目有一个大问题。我设法将我的 2d 动态壁纸从画布移动到 opengl,一切看起来都很好而且很快但是......该死的总有一些东西

当我设置我的动态壁纸并重新打开动态壁纸设置菜单时,选择了相同的壁纸然后返回或接受它崩溃......但它只在我的三星 Galaxy Note (Android 4.04) 上崩溃。当我在其他一些壁纸之后设置我的壁纸时,它也会崩溃,但总是一样。我在 Samsung Ace (android 2.37) 上试过——效果很好。那么到底是什么?

我是根据http://www.learnopengles.com/how-to-use-opengl-es-2-in-an-android-live-wallpaper/项目制作的。你知道吗 - 原始项目引发了同样的错误。那么这只是SG Note的问题吗?自 2 个月以来,我一直在从事这个项目,而且我几乎完成了 - 现在我有点绝望,所以请帮忙 :)

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
4

2 回答 2

0

原因是重命名包名称而不重命名所有引用。这意味着在重命名包时必须选中所有复选框(通过重构->重命名)。这听起来并不相关,但它是问题所在。我有同样的问题,这解决了它。

于 2013-03-25T15:19:54.973 回答
0

我有同样的错误。在网上找了很多论坛,终于自己偶然找到了解决办法!!!

这都是因为我更改了包名(mobi.pipo.wallpaper 为 mobi.pipo.wallpaperPRO),其中是 WallpaperSettingsActivity 类。改回来,一切都会好起来的:-)

PS 你可能会看到这个错误,因为在 Native Libraries 中已经有明确的包名。当您手动更改包名称(通过重构)时,本机代码不会更改。而且它仍然想使用旧的包名称,不再存在。所以...重命名它,生活将再次美好))

于 2014-12-28T00:46:16.520 回答