2011-12-03 29 views
2

有一個例外,我在Android上拖動。 Google不知道這個例外情況。Android,如何捕捉神祕的系統異常

問題: 任何想法,要重寫什麼來捕獲此異常?系統內部似乎有些東西,因爲所有列出的類都是框架本機類。

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) 
+0

我不確定捕捉它(併吞下它?)是最好的解決方案...這可能是由於您的代碼的一個錯誤引發的,您最好找到並修復它。對不起,不能幫助更多,我不熟悉該版本的代碼:( – Guillaume

+0

這個異常發生,當我的DragEvent已經處理完畢。調試器顯示,處理的'DragEvents'通過無論如何查看樹和一些根視圖似乎會觸發異常。我的代碼與這種情況沒有共同之處。 – Skip

回答

3

有一個例外,這是我在安卓上了拖累。谷歌不知道這個例外。

因爲我無法找到在Android 2.3源reportDropResult(),我猜測這是從蜂窩推出了新的拖放和拖放框架。

任何想法,要重寫什麼以捕獲此異常?

您無法重寫任何內容來捕獲該異常。要捕獲未處理的異常,請使用ThreadsetDefaultUncaughtExceptionHandler()