{"action":"closed","issue":{"url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/issues/3930","repository_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android","labels_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/issues/3930/labels{/name}","comments_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/issues/3930/comments","events_url":"https://api.github.com/repos/wordpress-mobile/WordPress-Android/issues/3930/events","html_url":"https://github.com/wordpress-mobile/WordPress-Android/issues/3930","id":146625891,"number":3930,"title":"Crash report in the visual editor - alpha-5","user":{"login":"maxme","id":40213,"avatar_url":"https://avatars.githubusercontent.com/u/40213?v=3","gravatar_id":"","url":"https://api.github.com/users/maxme","html_url":"https://github.com/maxme","followers_url":"https://api.github.com/users/maxme/followers","following_url":"https://api.github.com/users/maxme/following{/other_user}","gists_url":"https://api.github.com/users/maxme/gists{/gist_id}","starred_url":"https://api.github.com/users/maxme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxme/subscriptions","organizations_url":"https://api.github.com/users/maxme/orgs","repos_url":"https://api.github.com/users/maxme/repos","events_url":"https://api.github.com/users/maxme/events{/privacy}","received_events_url":"https://api.github.com/users/maxme/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"maxme","id":40213,"avatar_url":"https://avatars.githubusercontent.com/u/40213?v=3","gravatar_id":"","url":"https://api.github.com/users/maxme","html_url":"https://github.com/maxme","followers_url":"https://api.github.com/users/maxme/followers","following_url":"https://api.github.com/users/maxme/following{/other_user}","gists_url":"https://api.github.com/users/maxme/gists{/gist_id}","starred_url":"https://api.github.com/users/maxme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxme/subscriptions","organizations_url":"https://api.github.com/users/maxme/orgs","repos_url":"https://api.github.com/users/maxme/repos","events_url":"https://api.github.com/users/maxme/events{/privacy}","received_events_url":"https://api.github.com/users/maxme/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-04-07T13:31:22Z","updated_at":"2016-04-15T12:40:06Z","closed_at":"2016-04-15T12:40:06Z","body":"Crash:\r\n\r\n```\r\n04-07 15:25:38.963 4034-4266/org.wordpress.android.beta E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2\r\nProcess: org.wordpress.android.beta, PID: 4034\r\njava.lang.RuntimeException: An error occurred while executing doInBackground()\r\n    at android.os.AsyncTask$3.done(AsyncTask.java:309)\r\n    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)\r\n    at java.util.concurrent.FutureTask.setException(FutureTask.java:223)\r\n    at java.util.concurrent.FutureTask.run(FutureTask.java:242)\r\n    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)\r\n    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)\r\n    at java.lang.Thread.run(Thread.java:818)\r\n Caused by: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()\r\n    at android.os.Handler.<init>(Handler.java:200)\r\n    at android.os.Handler.<init>(Handler.java:114)\r\n    at android.widget.Toast$TN.<init>(Toast.java:359)\r\n    at android.widget.Toast.<init>(Toast.java:105)\r\n    at android.widget.Toast.makeText(Toast.java:266)\r\n    at android.widget.Toast.makeText(Toast.java:293)\r\n    at org.wordpress.android.ui.posts.EditPostActivity.queueFileForUpload(EditPostActivity.java:1930)\r\n    at org.wordpress.android.ui.posts.EditPostActivity.addMediaVisualEditor(EditPostActivity.java:1476)\r\n    at org.wordpress.android.ui.posts.EditPostActivity.addMedia(EditPostActivity.java:1443)\r\n    at org.wordpress.android.ui.posts.EditPostActivity.handleMediaSelectionResult(EditPostActivity.java:1678)\r\n    at org.wordpress.android.ui.posts.EditPostActivity.access$1100(EditPostActivity.java:124)\r\n    at org.wordpress.android.ui.posts.EditPostActivity$HandleMediaSelectionTask.doInBackground(EditPostActivity.java:1067)\r\n    at org.wordpress.android.ui.posts.EditPostActivity$HandleMediaSelectionTask.doInBackground(EditPostActivity.java:1064)\r\n    at android.os.AsyncTask$2.call(AsyncTask.java:295)\r\n    at java.util.concurrent.FutureTask.run(FutureTask.java:237)\r\n    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) \r\n    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) \r\n    at java.lang.Thread.run(Thread.java:818) \r\n```\r\n\r\n### Steps to reproduce the behavior\r\n\r\nWith the visual editor, add new images, then add an \"Invalid image\" (not sure how this happens, but my Z5C is pretty good at creating unreadable images).\r\n\r\nThe crash comes from the Toast call, so it should be easy to repro by just showing a random toast message in `queueFileForUpload`.\r\n"}}