Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

[4.17.1] Signal always crashes on startup

Open PiCob opened this issue 8 years ago • 10 comments

I have:

  • [x] searched open and closed issues for duplicates
  • [x] read https://github.com/WhisperSystems/Signal-Android/wiki/Submitting-useful-bug-reports

Bug description

Signal immediately crashes on startup: Resources$NotFoundException ("File res/drawable/permission_rationale_dialog_corners.xml") caused by an UnsupportedOperationException ("Can't convert to color: type=0x2)"). According to the log, this happens when the RegistrationLockDialog is supposed to be displayed, so I assume v4.17.0 is affected as well (since I don't see a commit for v4.17.1 dealing with the RegistrationLockDialog). Obviously, I activated the Registration Lock some days ago.

FWIW: This crash MIGHT be the one mentioned in #7495 as well (-> reason for not being able to create a log for that issue).

Steps to reproduce

  • Start Signal

Actual result: Signal instantly crashes. Expected result: Needless to say: Signal should simply start.

Screenshots

Not useful.

Device info

Device: Motorola Moto G (XT1032) Android version: 4.4.4 (Stock ROM) Signal version: 4.17.1

Link to debug log

Since I wasn't able to start Signal and create a debug log within the app, here's an adb logcat: https://hastebin.com/loximoqusi.vbs

Exception:

E/AndroidRuntime(10171): FATAL EXCEPTION: main 
E/AndroidRuntime(10171): Process: org.thoughtcrime.securesms, PID: 10171 
E/AndroidRuntime(10171): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.thoughtcrime.securesms/org.thoughtcrime.securesms.ConversationListActivity}: android.content.res.Resources$NotFoundException: File 
res/drawable/permission_rationale_dialog_corners.xml from drawable resource ID #0x7f0801bf 
E/AndroidRuntime(10171): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2198) 
E/AndroidRuntime(10171): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2257) 
E/AndroidRuntime(10171): 	at android.app.ActivityThread.access$800(ActivityThread.java:139) 
E/AndroidRuntime(10171): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1210) 
E/AndroidRuntime(10171): 	at android.os.Handler.dispatchMessage(Handler.java:102) 
E/AndroidRuntime(10171): 	at android.os.Looper.loop(Looper.java:136) 
E/AndroidRuntime(10171): 	at android.app.ActivityThread.main(ActivityThread.java:5086) 
E/AndroidRuntime(10171): 	at java.lang.reflect.Method.invokeNative(Native Method) 
E/AndroidRuntime(10171): 	at java.lang.reflect.Method.invoke(Method.java:515) 
E/AndroidRuntime(10171): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 
E/AndroidRuntime(10171): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 
E/AndroidRuntime(10171): 	at dalvik.system.NativeStart.main(Native Method) 
E/AndroidRuntime(10171): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/permission_rationale_dialog_corners.xml from drawable resource ID #0x7f0801bf 
E/AndroidRuntime(10171): 	at android.content.res.Resources.loadDrawable(Resources.java:2099) 
E/AndroidRuntime(10171): 	at android.content.res.Resources.getDrawable(Resources.java:700) 
E/AndroidRuntime(10171): 	at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:360) 
E/AndroidRuntime(10171): 	at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:198) 
E/AndroidRuntime(10171): 	at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:85) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:128) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:149) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:29) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:54) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:202) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:192) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AppCompatDialog.getDelegate(AppCompatDialog.java:158) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AppCompatDialog.<init>(AppCompatDialog.java:52) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AlertDialog.<init>(AlertDialog.java:97) 
E/AndroidRuntime(10171): 	at android.support.v7.app.AlertDialog$Builder.create(AlertDialog.java:932) 
E/AndroidRuntime(10171): 	at org.thoughtcrime.securesms.lock.RegistrationLockDialog.showReminderIfNecessary(RegistrationLockDialog.java:52) 
E/AndroidRuntime(10171): 	at org.thoughtcrime.securesms.ConversationListActivity.onCreate(ConversationListActivity.java:84) 
E/AndroidRuntime(10171): 	at org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity.onCreate(PassphraseRequiredActionBarActivity.java:52) 
E/AndroidRuntime(10171): 	at android.app.Activity.performCreate(Activity.java:5248) 
E/AndroidRuntime(10171): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1110) 
E/AndroidRuntime(10171): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2162) 
E/AndroidRuntime(10171): 	... 11 more 
E/AndroidRuntime(10171): Caused by: java.lang.UnsupportedOperationException: Can't convert to color: type=0x2 
E/AndroidRuntime(10171): 	at android.content.res.TypedArray.getColor(TypedArray.java:327) 
E/AndroidRuntime(10171): 	at android.graphics.drawable.GradientDrawable.inflate(GradientDrawable.java:970) 
E/AndroidRuntime(10171): 	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:937) 
E/AndroidRuntime(10171): 	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877) 
E/AndroidRuntime(10171): 	at android.content.res.Resources.loadDrawable(Resources.java:2095) 
E/AndroidRuntime(10171): 	... 31 more 

PiCob avatar Mar 11 '18 08:03 PiCob

This is a KitKat thing, so I've disabled the registration lock reminders for KK devices. Just a heads up that our KK install base is about to drop below 1%, at which point we might drop support for it all together.

moxie0 avatar Mar 12 '18 00:03 moxie0

@moxie0 just so you know, I'm on nougat, and had the same after upgrading from 4.15.5 to 4.16.9. Lost a week worth of communication. Had to delete and reinstall.

yepyepyep4711 avatar Mar 13 '18 21:03 yepyepyep4711

@yepyepyep4711 Exact same stack trace? Do you have a debug log?

moxie0 avatar Mar 14 '18 00:03 moxie0

@yepyepyep4711 - since the registration lock was introduced in v4.17.0, I'm pretty sure you were facing something different :-/

PiCob avatar Mar 14 '18 08:03 PiCob

hi @moxie0. Sorry it took so long, but I was not inclined to repeat the experience. Now I get a message my 4.15.5 will stop working in nine days, so I tried again to update to the current 4.17.5. Same story. Here's my adb logcat:

[ 04-14 12:05:53.519  1400: 2144 E/ActivityTrigger ]
activityStartTrigger: not whiteListedorg.thoughtcrime.securesms/org.thoughtcrime
.securesms.RoutingActivity/350

[ 04-14 12:05:53.522  1400: 2144 E/ActivityTrigger ]
activityResumeTrigger: not whiteListedorg.thoughtcrime.securesms/org.thoughtcrim
e.securesms.RoutingActivity/350

[ 04-14 12:05:53.528  1400: 3227 E/ActivityTrigger ]
activityResumeTrigger: not whiteListedorg.thoughtcrime.securesms/org.thoughtcrim
e.securesms.RoutingActivity/350

[ 04-14 12:05:53.606  4741: 4741 E/AndroidRuntime ]
FATAL EXCEPTION: main
Process: org.thoughtcrime.securesms, PID: 4741
java.lang.RuntimeException: Unable to create application org.thoughtcrime.secure
sms.ApplicationContext: java.lang.NullPointerException: Attempt to invoke virtua
l method 'javax.crypto.SecretKey java.security.KeyStore$SecretKeyEntry.getSecret
Key()' on a null object reference
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:
5621)
        at android.app.ActivityThread.-wrap2(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1620)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6334)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit
.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'jav
ax.crypto.SecretKey java.security.KeyStore$SecretKeyEntry.getSecretKey()' on a n
ull object reference
        at org.thoughtcrime.securesms.crypto.KeyStoreHelper.getKeyStoreEntry(Key
StoreHelper.java:106)
        at org.thoughtcrime.securesms.crypto.KeyStoreHelper.unseal(KeyStoreHelpe
r.java:65)
        at org.thoughtcrime.securesms.crypto.DatabaseSecretProvider.getEncrypted
DatabaseSecret(DatabaseSecretProvider.java:58)
        at org.thoughtcrime.securesms.crypto.DatabaseSecretProvider.getOrCreateD
atabaseSecret(DatabaseSecretProvider.java:29)
        at org.thoughtcrime.securesms.database.DatabaseFactory.<init>(DatabaseFa
ctory.java:144)
        at org.thoughtcrime.securesms.database.DatabaseFactory.getInstance(Datab
aseFactory.java:63)
        at org.thoughtcrime.securesms.database.DatabaseFactory.getSmsDatabase(Da
tabaseFactory.java:78)
        at org.thoughtcrime.securesms.service.ExpiringMessageManager.<init>(Expi
ringMessageManager.java:29)
        at org.thoughtcrime.securesms.ApplicationContext.initializeExpiringMessa
geManager(ApplicationContext.java:154)
        at org.thoughtcrime.securesms.ApplicationContext.onCreate(ApplicationCon
text.java:88)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.j
ava:1036)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:
5618)
        ... 8 more

I may have to give up on signal in nine days :cry:

yepyepyep4711 avatar Apr 14 '18 10:04 yepyepyep4711

@yepyepyep4711, this stack trace reminds me of #7554, #7534, #7532 and #7453. Any chance you're running Lineage?

pgerber avatar Apr 14 '18 10:04 pgerber

Nope, This is a OnePlus5 with Android 7.1.1

yepyepyep4711 avatar Apr 14 '18 14:04 yepyepyep4711

@pgerber any ideas?

yepyepyep4711 avatar Apr 16 '18 21:04 yepyepyep4711

@yepyepyep4711, I doubt I'll be much help here. Since this seems to be unrelated to this issue, I recommend you file a new issue. This way you should also get some attention from Signal devs.

pgerber avatar Apr 16 '18 21:04 pgerber

Alright. Done so. Let's see

yepyepyep4711 avatar Apr 17 '18 21:04 yepyepyep4711