Android icon indicating copy to clipboard operation
Android copied to clipboard

[Bug] The deleted bookmark folder is still accessible and sometimes lead to crash

Open Kobayashi-996 opened this issue 1 year ago • 2 comments

Describe the bug

I found that a bookmark folder was still accessible for a while after it was deleted. And this operation would sometimes lead to crash with exception like "

FATAL EXCEPTION: main Process: com.duckduckgo.mobile.android.debug, PID: 21320 java.lang.ArrayIndexOutOfBoundsException: length=10; index=-1 at java.util.ArrayList.get(ArrayList.java:439) at com.duckduckgo.savedsites.impl.bookmarks.BookmarkItemTouchHelperCallback.updateDragHandle(BookmarkItemTouchHelperCallback.kt:75) at com.duckduckgo.savedsites.impl.bookmarks.BookmarkItemTouchHelperCallback.clearView(BookmarkItemTouchHelperCallback.kt:63) at androidx.recyclerview.widget.ItemTouchHelper$3.onAnimationEnd(ItemTouchHelper.java:653) at android.animation.Animator$AnimatorListener.onAnimationEnd(Animator.java:552) at android.animation.ValueAnimator.endAnimation(ValueAnimator.java:1232) at android.animation.ValueAnimator.doAnimationFrame(ValueAnimator.java:1474) at android.animation.AnimationHandler.doAnimationFrame(AnimationHandler.java:146) at android.animation.AnimationHandler.access$100(AnimationHandler.java:37) at android.animation.AnimationHandler$1.doFrame(AnimationHandler.java:54) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:947) at android.view.Choreographer.doCallbacks(Choreographer.java:761) at android.view.Choreographer.doFrame(Choreographer.java:693) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

"

How to Reproduce

  1. Enter the app
  2. More Options
  3. Bookmarks
  4. Create a Parent folder
  5. Enter the Parent folder
  6. Create a Child folder
  7. Delete the Child folder
  8. Go to Search (will find all the Parent folder and the Child folder are all accessible)
  9. Enter the Parent folder (will find the Child folder is still there)
  10. Enter the Child folder (this step sometimes lead to the adforementioned crash)
  11. You can still do anything you want in the deleted Child folder

https://github.com/user-attachments/assets/e6e775da-46c0-45f9-a55f-334c5ddb1c35

Expected behavior

Although there is a short period for undo, I think the deleted folder should not be accesible at the time, or this would cause many potential problem.

Environment

- DDG App Version: 5.225.0
- Device: Pixel 8 pro
- OS: Android 13

Kobayashi-996 avatar Feb 20 '25 11:02 Kobayashi-996

Thank you for opening an Issue in our Repository. The issue has been forwarded to the team and we'll follow up as soon as we have time to investigate. As stated in our Contribution Guidelines, requests for feedback should be addressed via the Feedback section in the Android app.

github-actions[bot] avatar Feb 20 '25 11:02 github-actions[bot]

Hi! I'd like to work on this issue. Could it be assigned to me?

Rudraksh2605 avatar Aug 01 '26 08:08 Rudraksh2605