Project Information
Repository: https://github.com/SimpleMobileTools/Simple-Contacts/
Project Name: Simple-Contacts
Publisher: https://github.com/SimpleMobileTools
Expected behaviour
When I attempt to delete a contact from contact list it should be deleted following the press of delete (no warning pop up should be provided and it should be deleted instantly).
Actual behaviour
Following the press of delete, the application will not update the view to indicate the contact has been deleted. Upon a second press of delete, the application will crash.
Note: I assume the contact has been deleted and the view has been updated, hence it can't find what it's trying to delete, therefore the crash occurs.
Pre-requisites
- This issue only seems to occur when you have 1 contact in the list, therefore you should start with an empty contact list and create one contact only and then delete it.
- I can only replicate on Android 8.0, all other version of Android tested don't seem to show this issue.
How to reproduce
- From either a fresh install or existing install go to the contact page.
- At the bottom right of the page a floating icon is present, press this icon to create a new contact.
- You can name the contact anything, for clarity let's call it "testContact"
- Save the contact and the application will show it's been created.
- Long Press the "testContact" contact item and additional options will appear
- Press the options menu located in the top right of the page
- Select delete from this list
- The contact will not be removed from the list, repeat steps 5 - 7 and a fatal exception will occur.
Logs
05-27 10:10:37.508 5332-5332/com.simplemobiletools.contacts E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.simplemobiletools.contacts, PID: 5332
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at com.simplemobiletools.contacts.a.a.v(SourceFile:148)
at com.simplemobiletools.contacts.a.a.a(SourceFile:30)
at com.simplemobiletools.contacts.a.a$b.b(SourceFile:137)
at com.simplemobiletools.contacts.a.a$b.a(SourceFile:30)
at com.simplemobiletools.commons.b.c.a(SourceFile:40)
at com.simplemobiletools.commons.b.c.a(SourceFile:19)
at com.simplemobiletools.commons.b.c$a.onClick(SourceFile:28)
at android.support.v7.app.AlertController$b.handleMessage(SourceFile:166)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Environment
Tested on multiple different Android versions both using a physical device and emulators.
Device | Android Version | Emulator/Physical | Reproducible? |
---|---|---|---|
Motorola 3 (3rd Generation) | 6.0.1 | Physical | No |
Pixel 2 | 6.0 | Emulated | No |
Pixel 2 | 7.1 | Emulated | No |
Pixel 2 | 8.0 | Emulated | Yes |
Application Version: 4.0.3
Recording of the issue
The following video shows the issue in more detail, the video was taken on the 8.0 emulator.
Proof of work
- My GitHub account: https://github.com/tobias-g1
- The issue has been reported here: https://github.com/SimpleMobileTools/Simple-Contacts/issues/180
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
In light of keeping my post as clean as possible without comments like this, I was unsure to post this as I know it won't affect the large majority of users hence why I posted to GitHub some hours ago, but as the project owner didn't query it and acknowledged it (marked as bug) I felt it provided some value to the project.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Exellent
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Hey @tobias-g
Thanks for contributing on Utopian.
Congratulations! Your contribution was Staff Picked to receive a maximum vote for the bug-hunting category on Utopian for being of significant value to the project and the open source community.
We’re already looking forward to your next contribution!
Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
I have join your discord https://discord.gg/h52nFrV
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
This is a test comment
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit