在 Android 中设置动态壁纸时出现奇怪的异常

发布于 2024-11-03 05:31:11 字数 2814 浏览 0 评论 0原文

04-24 13:30:59.312: VERBOSE/RenderScript(6044): RS Thread exited
04-24 13:30:59.320: ERROR/libEGL(6044): call to OpenGL ES API with no current context (logged once per thread)
04-24 13:30:59.335: WARN/WallpaperService(6044): Ignoring updateSurface: destroyed
04-24 13:30:59.335: WARN/WindowManager(108): Window android.view.IWindow$Stub$Proxy@408968d0 is already added
04-24 13:30:59.355: DEBUG/dalvikvm(6083): GC_EXTERNAL_ALLOC freed 23K, 52% free 2598K/5379K, external 1625K/2137K, paused 55ms
04-24 13:30:59.425: DEBUG/GLWallpaperService(6083): onSurfaceDestroyed()
04-24 13:30:59.496: WARN/InputQueue-JNI(6044): Input channel is not initialized.
04-24 13:30:59.515: DEBUG/AndroidRuntime(6044): Shutting down VM
04-24 13:30:59.539: WARN/dalvikvm(6044): threadid=1: thread exiting with uncaught exception (group=0x40015560)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044): FATAL EXCEPTION: main
04-24 13:30:59.640: ERROR/AndroidRuntime(6044): java.lang.RuntimeException: Failed to register input channel.  Check logs for details.
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.view.InputQueue.nativeRegisterInputChannel(Native Method)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.view.InputQueue.registerInputChannel(InputQueue.java:92)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:521)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:904)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.os.Looper.loop(Looper.java:123)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.app.ActivityThread.main(ActivityThread.java:3683)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at java.lang.reflect.Method.invokeNative(Native Method)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at java.lang.reflect.Method.invoke(Method.java:507)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at dalvik.system.NativeStart.main(Native Method)

我正在开发一个Livewallpaper,它使用一个名为Andengine(andengine.org)的开源游戏引擎,它现在工作正常,除了有时当用户将我的Livewallpaper设置为壁纸时,会抛出异常,提示“无法注册输入通道。检查”记录详细信息。”,但奇怪的是动态壁纸仍然有效并且没有退出。

知道什么可能导致这个问题,或者我该如何解决它?

04-24 13:30:59.312: VERBOSE/RenderScript(6044): RS Thread exited
04-24 13:30:59.320: ERROR/libEGL(6044): call to OpenGL ES API with no current context (logged once per thread)
04-24 13:30:59.335: WARN/WallpaperService(6044): Ignoring updateSurface: destroyed
04-24 13:30:59.335: WARN/WindowManager(108): Window android.view.IWindow$Stub$Proxy@408968d0 is already added
04-24 13:30:59.355: DEBUG/dalvikvm(6083): GC_EXTERNAL_ALLOC freed 23K, 52% free 2598K/5379K, external 1625K/2137K, paused 55ms
04-24 13:30:59.425: DEBUG/GLWallpaperService(6083): onSurfaceDestroyed()
04-24 13:30:59.496: WARN/InputQueue-JNI(6044): Input channel is not initialized.
04-24 13:30:59.515: DEBUG/AndroidRuntime(6044): Shutting down VM
04-24 13:30:59.539: WARN/dalvikvm(6044): threadid=1: thread exiting with uncaught exception (group=0x40015560)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044): FATAL EXCEPTION: main
04-24 13:30:59.640: ERROR/AndroidRuntime(6044): java.lang.RuntimeException: Failed to register input channel.  Check logs for details.
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.view.InputQueue.nativeRegisterInputChannel(Native Method)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.view.InputQueue.registerInputChannel(InputQueue.java:92)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:521)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:904)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.os.Handler.dispatchMessage(Handler.java:99)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.os.Looper.loop(Looper.java:123)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at android.app.ActivityThread.main(ActivityThread.java:3683)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at java.lang.reflect.Method.invokeNative(Native Method)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at java.lang.reflect.Method.invoke(Method.java:507)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-24 13:30:59.640: ERROR/AndroidRuntime(6044):     at dalvik.system.NativeStart.main(Native Method)

I was developing a Livewallpaper which uses a open-source game engine called Andengine(andengine.org), it works fine now except sometimes when user set my Livewallpaper as wall paper, an Exception will be thrown saying "Failed to register input channel. Check logs for details.", but the werid thing is the Livewallpaper still works and did not exit.

Any idea what maybe causing this problem , or how I can fix it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不再让梦枯萎 2024-11-10 05:31:11

抱歉,我只能发现 InputQueue “为应用程序提供了一种接收传入输入事件的机制。目前只能从本机代码中使用”。

检查andengine 中的GLSurfaceView 类。这可能会让您了解壁纸有什么问题

您可能还想检查为什么会发生这种情况:

04-24 13:30:59.320: ERROR/libEGL(6044): call to OpenGL ES API with no current context (logged once per thread)

Sorry, I could only find that the InputQueue "provides a mechanism for an application to receive incoming input events. Currently only usable from native code".

Check the GLSurfaceView class in andengine. That may give you a clue of what is wrong with your wallpaper

You may also want to check why this is happening:

04-24 13:30:59.320: ERROR/libEGL(6044): call to OpenGL ES API with no current context (logged once per thread)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文