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

signal crashes when selecting certain group with many unread messages

Open Trolldemorted opened this issue 9 years ago • 8 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 crashes.

D/AndroidRuntime(30920): Shutting down VM
E/AndroidRuntime(30920): FATAL EXCEPTION: main
E/AndroidRuntime(30920): Process: org.thoughtcrime.securesms, PID: 30920
E/AndroidRuntime(30920): java.lang.IllegalStateException: couldn't move cursor to position 500
E/AndroidRuntime(30920): 	at org.thoughtcrime.securesms.database.CursorRecyclerViewAdapter.getCursorAtPositionOrThrow(CursorRecyclerViewAdapter.java:181)
E/AndroidRuntime(30920): 	at org.thoughtcrime.securesms.ConversationAdapter.findLastSeenPosition(ConversationAdapter.java:289)
E/AndroidRuntime(30920): 	at org.thoughtcrime.securesms.ConversationFragment.onLoadFinished(ConversationFragment.java:431)
E/AndroidRuntime(30920): 	at org.thoughtcrime.securesms.ConversationFragment.onLoadFinished(ConversationFragment.java:78)
E/AndroidRuntime(30920): 	at android.support.v4.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:476)
E/AndroidRuntime(30920): 	at android.support.v4.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:444)
E/AndroidRuntime(30920): 	at android.support.v4.content.Loader.deliverResult(Loader.java:126)
E/AndroidRuntime(30920): 	at org.thoughtcrime.securesms.util.AbstractCursorLoader.deliverResult(AbstractCursorLoader.java:39)
E/AndroidRuntime(30920): 	at org.thoughtcrime.securesms.util.AbstractCursorLoader.deliverResult(AbstractCursorLoader.java:11)
E/AndroidRuntime(30920): 	at android.support.v4.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:252)
E/AndroidRuntime(30920): 	at android.support.v4.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:80)
E/AndroidRuntime(30920): 	at android.support.v4.content.ModernAsyncTask.finish(ModernAsyncTask.java:485)
E/AndroidRuntime(30920): 	at android.support.v4.content.ModernAsyncTask$InternalHandler.handleMessage(ModernAsyncTask.java:502)
E/AndroidRuntime(30920): 	at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(30920): 	at android.os.Looper.loop(Looper.java:145)
E/AndroidRuntime(30920): 	at android.app.ActivityThread.main(ActivityThread.java:5951)
E/AndroidRuntime(30920): 	at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(30920): 	at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(30920): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1400)
E/AndroidRuntime(30920): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

Steps to reproduce

  • select the group

Device info

Device: samsung GT-I9506 Android version: 5.0.1 Signal version: 4.1.0 (appstore version)

Link to debug log

https://gist.github.com/anonymous/fba9d6d9c43b7faf99cec6bddc01352e

Trolldemorted avatar May 19 '17 13:05 Trolldemorted

strange, this should be fixed by https://github.com/WhisperSystems/Signal-Android/commit/15a389c171e424fd03ea1b0c76f0071482c96393 (see also https://github.com/WhisperSystems/Signal-Android/issues/6098) :confused:

ghost avatar May 19 '17 14:05 ghost

symptoms are pretty similar, but your client worked fine after the fix, didn't it?

Trolldemorted avatar May 19 '17 16:05 Trolldemorted

4.1.0 seems a bit outdated to me. current appstore version is 4.5.3. I thought of a typo, but log says also 4.1.0.

wizardofid avatar May 19 '17 19:05 wizardofid

updating to the latest version did not mitigate this issue.

Trolldemorted avatar May 19 '17 19:05 Trolldemorted

@Trolldemorted yes, https://github.com/WhisperSystems/Signal-Android/commit/15a389c171e424fd03ea1b0c76f0071482c96393 fixed the crash! Can you remember/check if a) in this specific group are more then 500 messages b) you have other group conversations with more then 500 messages and you can select them

ghost avatar May 19 '17 20:05 ghost

a) well, checking is hard because signal crashes and the device is not rooted, but i am pretty sure there are more than 500 unread messages in the group on the device in question b) other conversations with not that many unread messages work fine, but some definitely contain 500+ messages in total

Trolldemorted avatar May 19 '17 20:05 Trolldemorted

well, checking is hard

that's why I wrote "remember" to :wink: well, as you already said, your case is probably similar, but not same as mine

EDIT: tested with all my conversations and worked just fine (Signal v4.5.3)

ghost avatar May 19 '17 20:05 ghost

If you want to test a conversation with 500+ unread messages and need someone to spam an account, just give me a number - or can we reset messages to the unread state easily somehow?

Trolldemorted avatar May 20 '17 09:05 Trolldemorted