Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crashes when clicking ‘Select Inverse’ followed by ‘Delete’ with only one item in the directory #4328

Closed
SoapOperaTester opened this issue Jan 2, 2025 · 1 comment

Comments

@SoapOperaTester
Copy link

Describe the bug
The app crashes after clicking the ‘Select Inverse’ icon followed by the ‘Delete’ icon when there is only one item in the Trash Bin.

To Reproduce
Steps to reproduce the behavior:

  1. Click on 'Hamburger' menu
  2. Click on 'Trash Bin'
  3. Long press to select an item
  4. Click on 'v' icon
  5. Click on 'Select Inverse'
  6. Click on 'Delete' icon

Expected behavior
When ‘Select Inverse’ is clicked and no items remain selected, the ‘Delete’ icon should be disabled to prevent further actions that could lead to a crash.

Screen Recording

Screen.Recording.mov

Smartphone (please complete the following information):

  • Device: [Google Pixel 5]
  • OS: [Android 14]
  • Rooted: [No]
  • Version: [3.10]

Additional context

Exception

  • App Name: Amaze File Manager
  • Package: com.amaze.filemanager
  • Version: 3.10
  • User Action: UI Error
  • Request: Application crash
  • OS: Linux Android 14 - 34
  • Device: redfin
  • Model: Pixel 5
  • Product: redfin
Crash log

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
	at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
	at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
	at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266)
	at java.util.Objects.checkIndex(Objects.java:359)
	at java.util.ArrayList.get(ArrayList.java:434)
	at com.amaze.filemanager.ui.dialogs.GeneralDialogCreation.deleteFilesDialog(GeneralDialogCreation.java:216)
	at com.amaze.filemanager.utils.MainActivityActionMode.onActionItemClicked(MainActivityActionMode.kt:221)
	at androidx.appcompat.app.AppCompatDelegateImpl$ActionModeCallbackWrapperV9.onActionItemClicked(AppCompatDelegateImpl.java:3022)
	at androidx.appcompat.view.StandaloneActionMode.onMenuItemSelected(StandaloneActionMode.java:140)
	at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:836)
	at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:159)
	at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:987)
	at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:977)
	at androidx.appcompat.widget.ActionMenuView.invokeItem(ActionMenuView.java:625)
	at androidx.appcompat.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:156)
	at android.view.View.performClick(View.java:7659)
	at android.view.View.performClickInternal(View.java:7636)
	at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
	at android.view.View$PerformClick.run(View.java:30156)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:205)
	at android.os.Looper.loop(Looper.java:294)
	at android.app.ActivityThread.main(ActivityThread.java:8177)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)


@VishnuSanal VishnuSanal changed the title App crashes when clicking ‘Select Inverse’ followed by ‘Delete’ with only one item in the Trash Bin App crashes when clicking ‘Select Inverse’ followed by ‘Delete’ with only one item Jan 12, 2025
@VishnuSanal VishnuSanal changed the title App crashes when clicking ‘Select Inverse’ followed by ‘Delete’ with only one item App crashes when clicking ‘Select Inverse’ followed by ‘Delete’ with only one item in the directory Jan 12, 2025
@VishnuSanal
Copy link
Member

dupe #4227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants