0

OpenGL ベースのライブ壁紙プロジェクトで大きな問題が発生しました。2D ライブ壁紙をキャンバスから OpenGL に移動することができました。すべて問題なく高速に見えますが、常に何かがある

ライブ壁紙を設定してライブ壁紙設定メニューを再度開くと、同じ壁紙を選択してから戻るか受け入れるとクラッシュします...しかし、Samsung 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

同じエラーがあります。多くのインターネット フォーラムを検索した結果、偶然にも自分で解決策を見つけました!!!

これはすべて、WallpaperSettingsActivity クラスのパッケージ名 (mobi.pipo.wallpaper を mobi.pipo.wallpaperPRO) に変更したためです。元に戻すと、すべてがうまくいきます:-)

PS ネイティブ ライブラリでは既に明確なパッケージ名であるため、このエラーが表示される場合があります。パッケージ名を手動で (リファクタリングによって) 変更しても、ネイティブ コードは変更されません。そして、もう存在しない古いパッケージ名を引き続き使用したいと考えています。だから...名前を元に戻せば、人生は再び素晴らしいものになるでしょう))

于 2014-12-28T00:46:16.520 に答える
0

その理由は、すべての参照の名前を変更せずにパッケージ名を変更することでした。つまり、パッケージの名前を変更するときは (リファクタリング -> 名前の変更)、すべてのチェック ボックスをオンにする必要があります。それはあまり関係ないように聞こえますが、それが問題です。私は同じ問題を抱えていましたが、これで修正されました。

于 2013-03-25T15:19:54.973 に答える