Crash - after copying a hyperlink to a person
as title said:
- i created a debug.log
- sending hyperlink to person (A): after long press and paste signal crashed. https://gist.github.com/anonymous/14eaef69a94b606b6b81
It might be related or not: i created a debug.log because i got a picture from person B and then i typed a little and took a picture with the quick cam. but suddenly the thumbnail from my picture was also the thumbnail for the last picture from person B.
Seems to be a bug in libpastelog, see Stackoverflow for an explanation.
Steps to reproduce:
- Enable Android developer option "Don't keep activities"
- Submit Signal debug log
- Press home button while progress dialog is shown
java.lang.IllegalArgumentException: View not attached to window manager
java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView{294b3989 V.E..... R......D 0,0-684,322} not attached to window manager
D/RedPhoneService( 7158): at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:396)
D/RedPhoneService( 7158): at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:322)
D/RedPhoneService( 7158): at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:116)
D/RedPhoneService( 7158): at android.app.Dialog.dismissDialog(Dialog.java:341)
D/RedPhoneService( 7158): at android.app.Dialog.dismiss(Dialog.java:324)
D/RedPhoneService( 7158): at org.whispersystems.libpastelog.util.ProgressDialogAsyncTask.onPostExecute(ProgressDialogAsyncTask.java:48)
D/RedPhoneService( 7158): at org.whispersystems.libpastelog.SubmitLogFragment$SubmitToPastebinAsyncTask.onPostExecute(SubmitLogFragment.java:387)
D/RedPhoneService( 7158): at org.whispersystems.libpastelog.SubmitLogFragment$SubmitToPastebinAsyncTask.onPostExecute(SubmitLogFragment.java:330)
D/RedPhoneService( 7158): at android.os.AsyncTask.finish(AsyncTask.java:636)
D/RedPhoneService( 7158): at android.os.AsyncTask.access$500(AsyncTask.java:177)
D/RedPhoneService( 7158): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653)
D/RedPhoneService( 7158): at android.os.Handler.dispatchMessage(Handler.java:102)
D/RedPhoneService( 7158): at android.os.Looper.loop(Looper.java:135)
D/RedPhoneService( 7158): at android.app.ActivityThread.main(ActivityThread.java:5310)
D/RedPhoneService( 7158): at java.lang.reflect.Method.invoke(Native Method)
D/RedPhoneService( 7158): at java.lang.reflect.Method.invoke(Method.java:372)
D/RedPhoneService( 7158): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
D/RedPhoneService( 7158): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
D/RedPhoneService( 7158): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:115)
Pkg: org.thoughtcrime.securesms Exception: View=com.android.internal.policy.impl.PhoneWindow$DecorView{294b3989 V.E..... R......D 0,0-684,322} not attached to window manager Exception Category: Lifecycle Root cause: Activity/Fragment "org.whispersystems.libpastelog.SubmitLogFragment" started a new thread via android.os.AsyncTask, and try to dismiss a dialog in the new thread when the activity is finished. Description: Note either the dialog is showed in Activity (main thread) or background thread, and if its dismiss is called in background thread. IllegalArgumentException may be thrown when the activity is killed while the background is still running. Fix solution: 1: use callback methods provided by Activity: Activity#onCreateDialog(), Activity#showDialog(), Activity#dimissDialog(), Activity#removeDialog() (deprecated since android 4.0) 2: check whether activity is running: isFinishing() in the thread 3: dismiss the dialog within the acitvity's lifecycle's methods, e.g., onDestroy() 4: simply use try-catch
I'm looking forward to your reply.
GitHub Issue Cleanup: See #7598 for more information.