I'm getting that exception when I pick a wallpaper. I'm actually not sure what function is the culprit. Here's the error log:
I/ActivityManager( 1360): Starting activity: Intent { cmp=com.android.wallpaper.livepicker/.LiveWallpaperPreview (has extras) }
W/dalvikvm(29175): threadid=1: thread exiting with uncaught exception (group=0x40020ac0)
E/AndroidRuntime(29175): FATAL EXCEPTION: main
E/AndroidRuntime(29175): java.lang.IllegalStateException: AssetManager has been finalized!
E/AndroidRuntime(29175): at android.content.res.AssetManager.isUpToDate(Native Method)
E/AndroidRuntime(29175): at android.app.ActivityThread.getPackageInfo(ActivityThread.java:2350)
E/AndroidRuntime(29175): at android.app.ActivityThread.getPackageInfoNoCheck(ActivityThread.java:2337)
E/AndroidRuntime(29175): at android.app.ActivityThread.handleCreateService(ActivityThread.java:2935)
E/AndroidRuntime(29175): at android.app.ActivityThread.access$3300(ActivityThread.java:125)
E/AndroidRuntime(29175): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2087)
E/AndroidRuntime(29175): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(29175): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(29175): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(29175): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(29175): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(29175): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
E/AndroidRuntime(29175): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
E/AndroidRuntime(29175): at dalvik.system.NativeStart.main(Native Method)
I/ActivityManager( 1360): Displayed activity com.android.wallpaper.livepicker/.LiveWallpaperPreview: 331 ms (total 331 ms)
W/InputManagerService( 1360): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#44bf5a08
I/ActivityManager( 1360): Process com.bukabros.videolivewallpaper (pid 29175) has died.
W/ActivityManager( 1360): Scheduling restart of crashed service com.bukabros.videolivewallpaper/.VideoLiveWallpaper in 5000ms
I/ActivityManager( 1360): Start proc com.bukabros.videolivewallpaper for service com.bukabros.videolivewallpaper/.VideoLiveWallpaper: pid=29207 uid=10090 gids={}
The only thing I can think of is that onCreate doesn't get called in the right order when the wallpaper gets picked cuz that's where I instantiate the asset manager.
And yes, I'm using the NDK but the asset manager doesn't get used there.
Ah nevermind. The culprit was that the handle to the assetmanager was a static variable. (That was just a quick hack for something else). Making that a normal variable solved the problem.
Related
my application crashed when I start it again after closing it for quite some time. Below you can see the log that shows the error:
java.lang.RuntimeException: Failed to initialize display event receiver. status=-2147483648
at android.view.DisplayEventReceiver.nativeInit(Native Method)
at android.view.DisplayEventReceiver.<init>(DisplayEventReceiver.java:61)
at android.view.Choreographer$FrameDisplayEventReceiver.<init>(Choreographer.java:725)
at android.view.Choreographer.<init>(Choreographer.java:169)
at android.view.Choreographer.<init>(Choreographer.java:69)
at android.view.Choreographer$1.initialValue(Choreographer.java:95)
at android.view.Choreographer$1.initialValue(Choreographer.java:88)
at java.lang.ThreadLocal$Values.getAfterMiss(ThreadLocal.java:430)
at java.lang.ThreadLocal.get(ThreadLocal.java:65)
at android.view.Choreographer.getInstance(Choreographer.java:194)
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:487)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:235)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2892)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2304)
at android.app.ActivityThread.access$700(ActivityThread.java:154)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1284)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5306)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
at dalvik.system.NativeStart.main(Native Method)
I'm looking for the solution or at least someone with similar problem but surprisingly there is none.
Someone can help me?
Thank you!
I have integrated zxing barcode scanner in my app. When the scanner gets a scan it takes the result and searches an external online database via a async task then opens a new activity based on the results. I am getting a force close that is not consistent, it does not happen every scan, only sometimes so I am having trouble figuring out why I am getting a leaked window error, and only sometimes:
09-25 21:02:48.105 24371-24371/com.beerportfolio.beerportfoliopro E/WindowManager﹕ Activity com.example.beerportfoliopro.BeerPage2 has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#424b7198 that was originally added here
android.view.WindowLeaked: Activity com.example.beerportfoliopro.BeerPage2 has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#424b7198 that was originally added here
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:468)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:419)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:351)
at android.view.WindowManagerImpl$CompatModeWrapper.addView(WindowManagerImpl.java:171)
at android.view.Window$LocalWindowManager.addView(Window.java:558)
at android.app.Dialog.show(Dialog.java:282)
at com.example.beerportfoliopro.GetBeerRateJSON.onPreExecute(GetBeerRateJSON.java:52)
at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
at android.os.AsyncTask.execute(AsyncTask.java:534)
at com.example.beerportfoliopro.GetBeerDataJSON.onPostExecute(GetBeerDataJSON.java:111)
at com.example.beerportfoliopro.GetBeerDataJSON.onPostExecute(GetBeerDataJSON.java:34)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5536)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1074)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:841)
at dalvik.system.NativeStart.main(Native Method)
09-25 21:02:48.265 24371-24371/com.beerportfolio.beerportfoliopro E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:784)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:476)
at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:182)
at android.app.Dialog.dismissDialog(Dialog.java:328)
at android.app.Dialog.dismiss(Dialog.java:311)
at com.example.beerportfoliopro.GetBeerRateJSON.onPostExecute(GetBeerRateJSON.java:74)
at com.example.beerportfoliopro.GetBeerRateJSON.onPostExecute(GetBeerRateJSON.java:27)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5536)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1074)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:841)
at dalvik.system.NativeStart.main(Native Method)
From the stack trace, it looks like your Dialog isn't visible when the AsyncTask finishes its work. In that case, the call to dismiss() will crash the app.
You might try using Dialog.isShowing() to avoid the crash:
protected void onPostExecute(...) {
...
if (dialog.isShowing()) {
dialog.dismiss(); // or .cancel()
}
...
}
We are developing enterprise applications, widgets and launcher for Android TV. We have Android set top box which runs our launcher, some widgets and apps. Widgets have fixed position in launcher when it starts.
We are getting android.os.transactiontoolargeexception in our launcher. The exception is generated randomly. Generally we have observed that when we keep box running for long time, we are facing this issue. Our box is going to run 24 * 7 at client side. So this issue is critical for us.
What is happening exactly is,
1. When we get this exception launcher crashes. We have some services which we are registering with alarm manager from our launcher's onCreate().
2. As we have only one launcher, after crashing it tries to re launch our launcher. Hence it enters into loop.
3. All our services are re registered every time in loop.
4. We do not get display for our launcher. We connect it to HDMI monitor.
We are not able to get exact cause of problem. Attaching log for the same. If anyone can suggest some solution then it will be very much appreciated.
W/ActivityManager( 3376): Force finishing activity com.sample.core.launcher/.HomeActivity
I/ActivityManager( 3376): Process com.sample.core.launcher (pid 27399) has died.
I/ActivityManager( 3376): START {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.sample.core.launcher/.HomeActivity u=0} from pid 0
I/ActivityManager( 3376): Start proc com.sample.core.launcher for activity com.sample.core.launcher/.HomeActivity: pid=27426 uid=1000 gids={3003, 1015, 1028, 2001, 3002, 3001}
E/AndroidRuntime(27426): FATAL EXCEPTION: main
E/AndroidRuntime(27426): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sample.core.launcher/com.sample.core.launcher.HomeActivity}: java.lang.RuntimeException: system server dead?
E/AndroidRuntime(27426): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
E/AndroidRuntime(27426): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
E/AndroidRuntime(27426): at android.app.ActivityThread.access$600(ActivityThread.java:130)
E/AndroidRuntime(27426): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
E/AndroidRuntime(27426): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(27426): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(27426): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime(27426): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(27426): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(27426): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime(27426): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(27426): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(27426): Caused by: java.lang.RuntimeException: system server dead?
E/AndroidRuntime(27426): at android.appwidget.AppWidgetHost.startListening(AppWidgetHost.java:133)
E/AndroidRuntime(27426): at com.sample.core.launcher.HomeActivity.onStart(HomeActivity.java:2027)
E/AndroidRuntime(27426): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1173)
E/AndroidRuntime(27426): at android.app.Activity.performStart(Activity.java:5132)
E/AndroidRuntime(27426): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2032)
E/AndroidRuntime(27426): ... 11 more
E/AndroidRuntime(27426): Caused by: android.os.TransactionTooLargeException
E/AndroidRuntime(27426): at android.os.BinderProxy.transact(Native Method)
E/AndroidRuntime(27426): at com.android.internal.appwidget.IAppWidgetService$Stub$Proxy.startListening(IAppWidgetService.java:382)
E/AndroidRuntime(27426): at android.appwidget.AppWidgetHost.startListening(AppWidgetHost.java:130)
E/AndroidRuntime(27426): ... 15 more
W/ActivityManager( 3376): Force finishing activity com.sample.core.launcher/.HomeActivity
I/ActivityManager( 3376): Process com.sample.core.launcher (pid 27426) has died.
I/ActivityManager( 3376): START {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.sample.core.launcher/.HomeActivity u=0} from pid 0
Thanks
Here is a open source launcher developed for Google TV: https://github.com/entertailion/Open-Launcher-for-GTV
Maybe you could install this launcher and see if it behaves in the same way. Open Launcher does not support widgets but it has all the other home launcher features.
I encountered similar problem as this.
The crash report is from Google Play and I can't reproduce it by myself. I tried to download Launcher Pro but that wasn't causing any troubles.
Here is the stack trace:
java.lang.RuntimeException: Failed to register input channel. Check logs for details.
at android.view.InputQueue.nativeRegisterInputChannel(Native Method)
at android.view.InputQueue.registerInputChannel(InputQueue.java:92)
at android.service.wallpaper.WallpaperService$Engine.updateSurface(WallpaperService.java:534)
at android.service.wallpaper.WallpaperService$Engine.attach(WallpaperService.java:670)
at android.service.wallpaper.WallpaperService$IWallpaperEngineWrapper.executeMessage(WallpaperService.java:898)
at com.android.internal.os.HandlerCaller$MyHandler.handleMessage(HandlerCaller.java:61)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3806)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
I am getting following exception on android market for my app.
Exception class java.lang.IllegalArgumentException
Source method WindowManagerImpl.findViewLocked()
I am unable to understand why and where this is coming from? I never got this exception on my device. Does anybody have a clue how to solve this? Or see it on my device?
java.lang.IllegalArgumentException: View not attached to window manager
at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:355)
at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:200)
at android.view.Window$LocalWindowManager.removeView(Window.java:432)
at android.app.Dialog.dismissDialog(Dialog.java:278)
at android.app.Dialog.access$000(Dialog.java:71)
at android.app.Dialog$1.run(Dialog.java:111)
at android.app.Dialog.dismiss(Dialog.java:268)
at android.app.Dialog.cancel(Dialog.java:951)
at com.bappy.cror.GameActivity$17$1.run(GameActivity.java:719)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)