{"action":"created","issue":{"url":"https://api.github.com/repos/WhisperSystems/Signal-Android/issues/5944","repository_url":"https://api.github.com/repos/WhisperSystems/Signal-Android","labels_url":"https://api.github.com/repos/WhisperSystems/Signal-Android/issues/5944/labels{/name}","comments_url":"https://api.github.com/repos/WhisperSystems/Signal-Android/issues/5944/comments","events_url":"https://api.github.com/repos/WhisperSystems/Signal-Android/issues/5944/events","html_url":"https://github.com/WhisperSystems/Signal-Android/issues/5944","id":194771154,"number":5944,"title":"Signal crashes upon start with \"Attempt to invoke virtual method 'byte[] ws.com.google.android.mms.pdu.EncodedStringValue.getTextString()' on a null object reference\"","user":{"login":"afunix","id":5682770,"avatar_url":"https://avatars.githubusercontent.com/u/5682770?v=3","gravatar_id":"","url":"https://api.github.com/users/afunix","html_url":"https://github.com/afunix","followers_url":"https://api.github.com/users/afunix/followers","following_url":"https://api.github.com/users/afunix/following{/other_user}","gists_url":"https://api.github.com/users/afunix/gists{/gist_id}","starred_url":"https://api.github.com/users/afunix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afunix/subscriptions","organizations_url":"https://api.github.com/users/afunix/orgs","repos_url":"https://api.github.com/users/afunix/repos","events_url":"https://api.github.com/users/afunix/events{/privacy}","received_events_url":"https://api.github.com/users/afunix/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-10T14:32:06Z","updated_at":"2016-12-10T14:47:55Z","closed_at":null,"body":"\r\nI have:\r\n- [x] searched open and closed issues for duplicates\r\n- [x] read https://github.com/WhisperSystems/Signal-Android/wiki/Submitting-useful-bug-reports\r\n\r\n----------------------------------------\r\n\r\n### Bug description\r\nSignal crashes upon start.\r\nI've seen a number of MMS arrived when it start to crash.\r\n\r\nI've tried a workaround with airplane mode and the one with sending SMS to myself to check all SMS as read.\r\nSignal still crashes.\r\n\r\n\r\n### Steps to reproduce\r\n- Start Signal\r\n\r\n\r\n**Actual result:** Signal crashes right after execution (tries to show password screen)\r\n**Expected result:** Signal does not crash.\r\n\r\n### Device info\r\n**Device:** LG Nexus 4\r\n**Android version:** 5.1.1\r\n**Signal version:** 3.23.0\r\n\r\n### Link to debug log\r\nNOTE: I cannot capture debug log via Signal as it crashes.\r\nHere is a copy-paste of adb logcat:\r\n```\r\nI/ActivityManager( 1790): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=org.thoughtcrime.securesms cmp=org.thoughtcrime.securesms/.RoutingActivity bnds=[188,1040][316,1168] (has extras)} from uid 10014 on display 0\r\nV/WindowManager( 1790): addAppToken: AppWindowToken{6e2ab38 token=Token{12899b9b ActivityRecord{2b9c53aa u0 org.thoughtcrime.securesms/.RoutingActivity t83}}} to stack=1 task=83 at 0\r\nI/ActivityManager( 1790): Start proc 23486:org.thoughtcrime.securesms/u0a91 for activity org.thoughtcrime.securesms/.RoutingActivity\r\nV/WindowManager( 1790): Adding window Window{3935e313 u0 Starting org.thoughtcrime.securesms} at 12 of 18 (after Window{1e4cd224 u0 com.android.settings/com.android.settings.SubSettings})\r\nW/PartProvider(23486): onCreate()\r\nW/PduParser(23486): parse() called...\r\nW/PduParser(23486): Message Type: 130\r\nW/PassphraseRequiredActionBarActivity(23486): onCreate(null)\r\nW/ExperienceUpgradeActivity(23486): getExperienceUpgrade(202)\r\nW/PassphraseRequiredActionBarActivity(23486): routeApplicationState(), state: 2\r\nI/ActivityManager( 1790): START u0 {cmp=org.thoughtcrime.securesms/.PassphrasePromptActivity (has extras)} from uid 10091 on display 0\r\nV/WindowManager( 1790): addAppToken: AppWindowToken{2e3a79bd token=Token{16df2d14 ActivityRecord{c59cb67 u0 org.thoughtcrime.securesms/.PassphrasePromptActivity t83}}} to stack=1 task=83 at 1\r\nV/WindowManager( 1790): Based on layer: Adding window Window{3935e313 u0 Starting org.thoughtcrime.securesms} at 12 of 18\r\nW/CanonicalAddressDatabase(23486): Hitting DB on query [ID].\r\nI/ActivityManager( 1790): Start proc 23525:android.process.acore/u0a4 for content provider com.android.providers.contacts/.ContactsProvider2\r\nD/OpenGLRenderer(23486): Use EGL_SWAP_BEHAVIOR_PRESERVED: true\r\nD/Atlas   (23486): Validating map...\r\nV/WindowManager( 1790): Adding window Window{3dcac05f u0 org.thoughtcrime.securesms/org.thoughtcrime.securesms.PassphrasePromptActivity} at 12 of 19 (before Window{3935e313 u0 Starting org.thoughtcrime.securesms})\r\nI/ContactLocale(23525): AddressBook Labels [ru-RU]: [, А, Б, В, Г, Д, Ђ, Е, Є, Ж, З, И, І, Й, Ј, К, Л, Љ, М, Н, Њ, О, П, Р, С, Т, Ћ, У, Ф, Х, Ц, Ч, Џ, Ш, Щ, Ы, Э, Ю, Я, , A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Α, Β, Γ, Δ, Ε, Ζ, Η, Θ, Ι, Κ, Λ, Μ, Ν, Ξ, Ο, Π, Ρ, Σ, Τ, Υ, Φ, Χ, Ψ, Ω, , א, ב, ג, ד, ה, ו, ז, ח, ט, י, כ, ל, מ, נ, ס, ע, פ, צ, ק, ר, ש, ת, , ا, ب, ت, ث, ج, ح, خ, د, ذ, ر, ز, س, ش, ص, ض, ط, ظ, ع, غ, ف, ق, ك, ل, م, ن, ه, و, ي, , ก, ข, ฃ, ค, ฅ, ฆ, ง, จ, ฉ, ช, ซ, ฌ, ญ, ฎ, ฏ, ฐ, ฑ, ฒ, ณ, ด, ต, ถ, ท, ธ, น, บ, ป, ผ, ฝ, พ, ฟ, ภ, ม, ย, ร, ฤ, ล, ฦ, ว, ศ, ษ, ส, ห, ฬ, อ, ฮ, , ㄱ, ㄴ, ㄷ, ㄹ, ㅁ, ㅂ, ㅅ, ㅇ, ㅈ, ㅊ, ㅋ, ㅌ, ㅍ, ㅎ, , あ, か, さ, た, な, は, ま, や, ら, わ, #, ]\r\nI/Adreno-EGL(23486): <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 01/15/15, ab0075f, Id3510ff6dc\r\nI/OpenGLRenderer(23486): Initialized EGL, version 1.4\r\nD/OpenGLRenderer(23486): Enabling debug mode 0\r\nD/CountryDetector( 1790): The first listener is added\r\nW/MmsDatabase(23486): Message received type: 130\r\nI/ActivityManager( 1790): Displayed org.thoughtcrime.securesms/.PassphrasePromptActivity: +404ms (total +1s336ms)\r\nI/ClearcutLoggerManager( 2117): onStartInput()\r\nW/ResourcesManager(23486): Asset path '/system/framework/com.google.android.media.effects.jar' does not exist or contains no resources.\r\nW/PassphraseRequiredActionBarActivity(23486): onDestroy()\r\nI/ClearcutLoggerManager( 2117): onFinishInput()\r\nI/ClearcutLoggerManager( 2117): onStartInput()\r\nW/JobConsumer(23486): java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] ws.com.google.android.mms.pdu.EncodedStringValue.getTextString()' on a null object reference\r\nW/JobConsumer(23486): \tat org.thoughtcrime.securesms.database.MmsDatabase.insertMessageInbox(MmsDatabase.java:827)\r\nW/JobConsumer(23486): \tat org.thoughtcrime.securesms.jobs.MmsReceiveJob.onRun(MmsReceiveJob.java:61)\r\nW/JobConsumer(23486): \tat org.whispersystems.jobqueue.JobConsumer.runJob(JobConsumer.java:76)\r\nW/JobConsumer(23486): \tat org.whispersystems.jobqueue.JobConsumer.run(JobConsumer.java:46)\r\nE/AndroidRuntime(23486): FATAL EXCEPTION: JobConsumer-2\r\nE/AndroidRuntime(23486): Process: org.thoughtcrime.securesms, PID: 23486\r\nE/AndroidRuntime(23486): java.lang.NullPointerException: Attempt to invoke virtual method 'byte[] ws.com.google.android.mms.pdu.EncodedStringValue.getTextString()' on a null object reference\r\nE/AndroidRuntime(23486): \tat org.thoughtcrime.securesms.database.MmsDatabase.insertMessageInbox(MmsDatabase.java:827)\r\nE/AndroidRuntime(23486): \tat org.thoughtcrime.securesms.jobs.MmsReceiveJob.onRun(MmsReceiveJob.java:61)\r\nE/AndroidRuntime(23486): \tat org.whispersystems.jobqueue.JobConsumer.runJob(JobConsumer.java:76)\r\nE/AndroidRuntime(23486): \tat org.whispersystems.jobqueue.JobConsumer.run(JobConsumer.java:46)\r\nW/ActivityManager( 1790):   Force finishing activity 1 org.thoughtcrime.securesms/.PassphrasePromptActivity\r\nW/SurfaceFlinger(  169): FB is protected: PERMISSION_DENIED\r\nW/WindowManager( 1790): Screenshot failure taking screenshot for (768x1280) to layer 21060\r\nI/OpenGLRenderer( 1790): Initialized EGL, version 1.4\r\nI/ClearcutLoggerManager( 2117): onConnected()\r\nW/OpenGLRenderer( 2241): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...\r\nW/OpenGLRenderer( 2241): Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...\r\nW/ResourceType( 1937): No package identifier when getting value for resource number 0x00000000\r\nW/PackageManager( 1937): Failure retrieving resources for org.thoughtcrime.securesms: Resource ID #0x0\r\nD/TaskPersister( 1790): removeObsoleteFile: deleting file=80_task.xml\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/WhisperSystems/Signal-Android/issues/comments/266213686","html_url":"https://github.com/WhisperSystems/Signal-Android/issues/5944#issuecomment-266213686","issue_url":"https://api.github.com/repos/WhisperSystems/Signal-Android/issues/5944","id":266213686,"user":{"login":"afunix","id":5682770,"avatar_url":"https://avatars.githubusercontent.com/u/5682770?v=3","gravatar_id":"","url":"https://api.github.com/users/afunix","html_url":"https://github.com/afunix","followers_url":"https://api.github.com/users/afunix/followers","following_url":"https://api.github.com/users/afunix/following{/other_user}","gists_url":"https://api.github.com/users/afunix/gists{/gist_id}","starred_url":"https://api.github.com/users/afunix/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afunix/subscriptions","organizations_url":"https://api.github.com/users/afunix/orgs","repos_url":"https://api.github.com/users/afunix/repos","events_url":"https://api.github.com/users/afunix/events{/privacy}","received_events_url":"https://api.github.com/users/afunix/received_events","type":"User","site_admin":false},"created_at":"2016-12-10T14:47:55Z","updated_at":"2016-12-10T14:47:55Z","body":"Crashes in `org.thoughtcrime.securesms.database.MmsDatabase.insertMessageInbox` at this line:\r\n`addressDatabase.insertAddressesForId(messageId, MmsAddresses.forFrom(Util.toIsoString(notification.getFrom().getTextString())));`\r\n\r\nFor me it seems I received a bunch of malware MMS-es, probably with `null` From.\r\nIs it enough add a null check and use an empty string as a \"From\" ?"}}
{"actor":{"display_login":"afunix"}}