There is an exceptions, which I got in Android on drag.
Google doesnt know about this exception.
Question:
Any Idea, what to override to catch this exception? Something seems to hppen inside of the system, because all the listed classes are frameworks native classes.
Window Session Crash
java.lang.IllegalStateException: reportDropResult() by non-recipient
at com.android.server.wm.Session.reportDropResult(Session.java:307)
at android.view.IWindowSession$Stub.onTransact(IWindowSession.java:369)
at com.android.server.wm.Session.onTransact(Session.java:111)
at android.os.Binder.execTransact(Binder.java:320)
at dalvik.system.NativeStart.run(Native Method)
FATAL EXCEPTION: main
java.lang.IllegalStateException: reportDropResult() by non-recipient
at android.os.Parcel.readException(Parcel.java:1329)
at android.os.Parcel.readException(Parcel.java:1275)
at android.view.IWindowSession$Stub$Proxy.reportDropResult(IWindowSession.java:900)
at android.view.ViewRoot.handleDragEvent(ViewRoot.java:3015)
at android.view.ViewRoot.handleMessage(ViewRoot.java:2164)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4025)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
There is an exceptions, which I got in Android on drag. Google doesnt know about this exception.
Since I can't find a reportDropResult() in the Android 2.3 source, I am guessing that this is from the new drag-and-drop framework introduced with Honeycomb.
Any Idea, what to override to catch this exception?
You can't override anything to catch that exception. To catch unhandled exceptions, use Thread and setDefaultUncaughtExceptionHandler().
Related
I've been getting this error in my developer portal. I'm not sure why. Stack trace tracks back into some internal function call inside WebView object.
java.lang.NullPointerException
at android.webkit.WebView.loadUrlImpl(WebView.java:3008)
at android.webkit.WebView.loadUrlImpl(WebView.java:3047)
at android.webkit.WebView.loadUrl(WebView.java:3040)
at com.myapp.android.PreviewActivity.notifyJS(PreviewActivity.java:175)
at com.myapp.android.PreviewActivity.access$14(PreviewActivity.java:174)
at com.myapp.android.PreviewActivity$ActionBarItemClickListener.onClick(PreviewActivity.java:901)
at android.view.View.performClick(View.java:3644)
at android.view.View$PerformClick.run(View.java:14313)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
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:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)
In my code at com.myapp.android.PreviewActivity.notifyJS(PreviewActivity.java:175), there is this line
webView.loadUrl("javascript:MyApp.onClick('" + action + "');");
I'm actually invoking a javascript call from my java code. Has anyone faced this issue before?
I found the answer myself. If webView.destroy() has already been called then calling webView.loadUrl() will cause this exception.
It seems that your webview is null. Did you call findView before?
I've been getting the following error, reported via Market developer console by the users of my app:
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.view.ViewRoot.setView(ViewRoot.java:568)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:177)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
at android.view.Window$LocalWindowManager.addView(Window.java:465)
at android.app.Dialog.show(Dialog.java:241)
at my.program.MyActivity.handleFailure(Unknown Source)
at my.program.MyActivity$RunFailed.run(Unknown Source)
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:3835)
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:847)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:605)
at dalvik.system.NativeStart.main(Native Method)
Italicized lines are part of my code. The code in question just creates and shows a dialog. It is run from a Runnable posted to a Handler. Everything should be happening in the GUI thread (that's why Handler is used).
I don't know how to debug this. I haven't experienced this problem myself, and all I have is just a bunch of automated reports. Google shows up a couple of threads on this exact problem, but no answers (except a hint of this being an Android 2.3.3-specific problem).
This may be a Launcher Pro issue. LP is a home replacement. It appears Launcher Pro does not release some resources as it should. Check out this answer here
I am using the latest version of AdWhirl to serve Ads from AdMob(+AdSense),InMobi,mdotm and Millennial Media. I am getting a lot of;
Exception class java.lang.NullPointerException
Source method AdWhirlLayout.handleAd()
Stack trace
java.lang.NullPointerException
at com.adwhirl.AdWhirlLayout.handleAd(AdWhirlLayout.java:217)
at com.adwhirl.AdWhirlLayout.access$3(AdWhirlLayout.java:205)
at com.adwhirl.AdWhirlLayout$HandleAdRunnable.run(AdWhirlLayout.java:390)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:132)
at android.app.ActivityThread.main(ActivityThread.java:4025)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:491)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)
This is causing a large amount of force closing and upsetting my users, does anyone have any ideas what is causing this and how to fix.
Any help gratefully received.
Thanks
AdWhirl has had a new release since this exception. Is anybody still seeing these errors? This may have been some weird case where there was a bad configuration that causes a Ration object to be populated with null values, which caused the NPE when a string was formatted with one of these fields. All the fields in the ration have a value by default.
Does anyone know what this could possibly mean? Apparently someone else's app caused mine to crash? And it happens to be an app that directly competes with mine:
java.lang.RuntimeException: Unable to create BackupAgent com.MY_COMPEITOR'S_APP.backup.BackupAgent: java.lang.NullPointerException
at android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:2905)
at android.app.ActivityThread.access$4000(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2128)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.app.ActivityThread$PackageInfo.initializeJavaContextClassLoader(ActivityThread.java:529)
at android.app.ActivityThread$PackageInfo.getClassLoader(ActivityThread.java:474)
at android.app.ActivityThread.handleCreateBackupAgent(ActivityThread.java:2873)
... 10 more
TenFour I would bet since you are talking about a competing App that there must be some INtent Handling going on that led to this. Maybe the Competitor app was actually trying to do something at the same time your app was trying to do something and they clashed. Without knowing more it's hard to provide a more detailed answer
I am getting a crash report back that says OutOfMemoryError in my call to startManagingCursor. Here is the returned stack trace:
java.lang.OutOfMemoryError
at java.util.ArrayList.add(ArrayList.java:123)
at android.app.Activity.startManagingCursor(Activity.java:1652)
at com.bubblewaretechnology.pianounlockscreen.LockDetecter.onResume(LockDetecter.java:633)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1150)
at android.app.ActivityThread.performNewIntents(ActivityThread.java:1789)
at android.app.ActivityThread.handleNewIntent(ActivityThread.java:1795)
at android.app.ActivityThread.access$2300(ActivityThread.java:124)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1015)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
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 very careful to close my cursors, SQLiteDatabase and SQLiteOpenHelper. Here is a short code segment that the crash refers to:
Cursor callCursor = lockLib.getCallState();
startManagingCursor(callCursor);
....
callCursor.close();
Pretty stumped on how to go about troubleshooting this problem. I know startManagingCursor is depreciated but I am not targeting HONEYCOMB or later, so I cant switch to CursorLoader. Does anyone have any suggestions on how to proceed?
I know it's lame to answer your own question but you can remove startManagingCursor, Reference Link, as long as you are managing the lifecycle of your cursor appropriately.