Nexus One 设备上的相机和动态壁纸出现问题

发布于 2024-11-11 05:30:55 字数 4465 浏览 4 评论 0原文

好吧,我创建的动态壁纸有问题,但我只发现此问题发生在使用 Stock 启动器运行 2.3.3 的 Stock nexus 上。这在我测试过的其他设备上效果很好:Moto Droid 2.3.3、Nexus S 2.3.4、HTC MyTouch 4G 2.3.3,而且我只收到过 Nexus 设备崩溃的报告。

动态壁纸在壁纸上显示相机的预览。单击“设置壁纸”后,将打印下面的堆栈跟踪。您可以看到它设置了相机并开始预览,但随后立即调用 onDestroy,然后由于此后的错误而强制关闭。屏幕一直都是黑的。 (这是一旦他们选择设置壁纸,我就不会在小壁纸预览屏幕上执行任何操作)。

知道发生了什么吗?我的代码中没有任何堆栈跟踪。所以我不知道该去哪里寻找。我尝试过调试它,但它永远不会触发我的一个断点,即使是它似乎正在命中并打印日志的代码中的断点?

05-31 17:14:53.945: ERROR/CameraWallpaper(1426): Camera is null, opening camera
05-31 17:14:53.955: ERROR/CameraWallpaper(1426): Target Height: 800
05-31 17:14:53.955: DEBUG/CameraWallpaper(1426): Setting effect
05-31 17:14:53.955: DEBUG/CameraWallpaper(1426): Setting mode
05-31 17:14:53.965: ERROR/CameraWallpaper(1426): Parameters set: 640x480
05-31 17:14:53.965: ERROR/CameraWallpaper(1426): Starting Preview
05-31 17:14:54.095: ERROR/CameraWallpaper(1426): Preview Started
05-31 17:14:54.105: ERROR/CameraWallpaper(1426): onDestroy
05-31 17:14:54.125: WARN/WallpaperService(1426): Ignoring updateSurface: destroyed
05-31 17:14:54.125: WARN/InputQueue-JNI(1426): Input channel is not initialized.
05-31 17:14:54.125: WARN/WindowManager(99): Failed looking up window
05-31 17:14:54.125: WARN/WindowManager(99): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@40741808 does not exist
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:8174)
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService.addWindow(WindowManagerService.java:1811)
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService$Session.add(WindowManagerService.java:5658)
05-31 17:14:54.125: WARN/WindowManager(99):     at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:68)
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService$Session.onTransact(WindowManagerService.java:5630)
05-31 17:14:54.125: WARN/WindowManager(99):     at android.os.Binder.execTransact(Binder.java:320)
05-31 17:14:54.125: WARN/WindowManager(99):     at dalvik.system.NativeStart.run(Native Method)
05-31 17:14:54.125: WARN/WindowManager(99): Attempted to add window with token that is not a window: android.os.BinderProxy@40741808.  Aborting.
05-31 17:14:54.135: DEBUG/AndroidRuntime(1426): Shutting down VM
05-31 17:14:54.135: WARN/dalvikvm(1426): threadid=1: thread exiting with uncaught exception (group=0x40015560)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426): FATAL EXCEPTION: main
05-31 17:14:54.135: ERROR/AndroidRuntime(1426): java.lang.RuntimeException: Failed to register input channel.  Check logs for details.
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.view.InputQueue.nativeRegisterInputChannel(Native Method)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.view.InputQueue.registerInputChannel(InputQueue.java:92)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:521)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:904)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.os.Looper.loop(Looper.java:123)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.app.ActivityThread.main(ActivityThread.java:3683)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at java.lang.reflect.Method.invokeNative(Native Method)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at java.lang.reflect.Method.invoke(Method.java:507)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at dalvik.system.NativeStart.main(Native Method)
05-31 17:14:58.875: INFO/Process(1426): Sending signal. PID: 1426 SIG: 9
05-31 17:14:58.905: INFO/ActivityManager(99): Process com.brayden.camera (pid 1426) has died.

Alright so I'm having an issue with my live wallpaper i've created, but I've only found this issue to occur on a stock nexus one running 2.3.3 using the stock launcher. This works great on the rest of the devices i've tested on: Moto Droid 2.3.3, Nexus S 2.3.4, HTC MyTouch 4G 2.3.3, and i've only had reports of crashes on nexus ones.

The live wallpaper displays a preview of your camera on your wallpaper. After click set wallpaper you the stack trace below prints. You can see it sets up the camera and starts the preview, but then immediately calls to onDestroy and then force closes due the the errors after that. The screen is black this entire time. (This is once they choose set wallpaper, I'm not doing anything on the little wallpaper preview screen).

Any clue what's happening? Not a single stack trace dips into my code. So i'm not sure where to look. And I've tried to debug it but it won't ever trigger a single one of my breakpoints, even the ones in the code it seems to be hitting and printing my logs from?

05-31 17:14:53.945: ERROR/CameraWallpaper(1426): Camera is null, opening camera
05-31 17:14:53.955: ERROR/CameraWallpaper(1426): Target Height: 800
05-31 17:14:53.955: DEBUG/CameraWallpaper(1426): Setting effect
05-31 17:14:53.955: DEBUG/CameraWallpaper(1426): Setting mode
05-31 17:14:53.965: ERROR/CameraWallpaper(1426): Parameters set: 640x480
05-31 17:14:53.965: ERROR/CameraWallpaper(1426): Starting Preview
05-31 17:14:54.095: ERROR/CameraWallpaper(1426): Preview Started
05-31 17:14:54.105: ERROR/CameraWallpaper(1426): onDestroy
05-31 17:14:54.125: WARN/WallpaperService(1426): Ignoring updateSurface: destroyed
05-31 17:14:54.125: WARN/InputQueue-JNI(1426): Input channel is not initialized.
05-31 17:14:54.125: WARN/WindowManager(99): Failed looking up window
05-31 17:14:54.125: WARN/WindowManager(99): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@40741808 does not exist
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService.windowForClientLocked(WindowManagerService.java:8174)
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService.addWindow(WindowManagerService.java:1811)
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService$Session.add(WindowManagerService.java:5658)
05-31 17:14:54.125: WARN/WindowManager(99):     at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:68)
05-31 17:14:54.125: WARN/WindowManager(99):     at com.android.server.WindowManagerService$Session.onTransact(WindowManagerService.java:5630)
05-31 17:14:54.125: WARN/WindowManager(99):     at android.os.Binder.execTransact(Binder.java:320)
05-31 17:14:54.125: WARN/WindowManager(99):     at dalvik.system.NativeStart.run(Native Method)
05-31 17:14:54.125: WARN/WindowManager(99): Attempted to add window with token that is not a window: android.os.BinderProxy@40741808.  Aborting.
05-31 17:14:54.135: DEBUG/AndroidRuntime(1426): Shutting down VM
05-31 17:14:54.135: WARN/dalvikvm(1426): threadid=1: thread exiting with uncaught exception (group=0x40015560)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426): FATAL EXCEPTION: main
05-31 17:14:54.135: ERROR/AndroidRuntime(1426): java.lang.RuntimeException: Failed to register input channel.  Check logs for details.
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.view.InputQueue.nativeRegisterInputChannel(Native Method)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.view.InputQueue.registerInputChannel(InputQueue.java:92)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:521)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:904)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.os.Looper.loop(Looper.java:123)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at android.app.ActivityThread.main(ActivityThread.java:3683)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at java.lang.reflect.Method.invokeNative(Native Method)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at java.lang.reflect.Method.invoke(Method.java:507)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-31 17:14:54.135: ERROR/AndroidRuntime(1426):     at dalvik.system.NativeStart.main(Native Method)
05-31 17:14:58.875: INFO/Process(1426): Sending signal. PID: 1426 SIG: 9
05-31 17:14:58.905: INFO/ActivityManager(99): Process com.brayden.camera (pid 1426) has died.

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

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

发布评论

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

评论(1

只怪假的太真实 2024-11-18 05:30:55

我之前制作了一个相机动态壁纸,它适用于 API 8 到 11。请注意,N1 不附带库存 2.3.3,您使用什么 ROM?我遇到过自定义 ROM 的问题,其中相机硬件 XML 配置不当并且神秘地失败,并且在硬件被迫重新创建它时得到修复。此外:

您没有捕获抛出的 RuntimeException,并且还没有实现 Camera.ErrorCallback。您使用的是 API 1 Camera.open() 吗?如果是这样,您应该尝试在检测到 Gingerbread+ 时调用 API 9+ 提供的 Camera.open(int) 。

I made a camera live wallpaper for kicks before and it works on API 8 through 11. Noting that N1 does not ship with stock 2.3.3, what ROM are you using? I've experienced problems with custom ROMs where the Camera hardware XML is simply poorly configured and fails mysteriously, and is fixed when the hardware is forced tore-create it. Furthermore:

you're not catching the RuntimeException being thrown, and you haven't implemented the Camera.ErrorCallback. Are you using the API 1 Camera.open()? If so, you should try calling the Camera.open(int) provided with API 9+ when Gingerbread+ is detected.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文