-
Notifications
You must be signed in to change notification settings - Fork 134
findCollidingIds AssertionError exception keeps crashing the app #4
Comments
The adapterId is generated here: JrawUtils2#L20. Fortunately or unfortunately this function is used for generating the adapter ID of multiple types of Reddit related objects. I'm using a combination of hashcode + created-at-time in hopes that they'll be unique, but clearly that's wrong. Multiple submissions can have the same created-at timestamp, increasing their likelihood of collision. @Tunous unfortunately, the Bugsnag dashboard is private so you won't be able to open the link. It doesn't have anything useful except for links to the two colliding submissions. I wonder if I can make my bugsnag dashboard public. |
But if you read the printed logcat (using |
You're right. The rows point to the same submission. Looks like the problem lies somewhere else upstream. |
I've debugged the bug a bit and found that the problem lies in part of code which deals with saving new submissions to local database:
The code inside of the linked if statement executes basically every time because I've fixed this bug by removing @saket are you interested in accepting pull requests to this repository or would you prefer to leave everything up to forks? |
@Tunous just an information about the bug fix is sufficient, don't bother sending back patches to Dank. As much as I'd like them, I don't think I have enough time to maintain this app anymore. |
Will be fixed with #6 |
Hi!
I've been using the app for couple of days now, and I must say I'm impressed, well done! But I noticed that the app crashes when scrolling very far down the list. According to logcat, it's caused by SubredditSubmissionsAdapter#findCollidingIds.
I didn't go through the code so I just silenced the exception in a fork. For now I haven't faced any side effects, but have a look at the issue and possibly fix it when you have time.
Thanks
The text was updated successfully, but these errors were encountered: