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 Sorting After Empty Search Results #4301

Closed
ScenarioKG opened this issue Dec 13, 2024 · 1 comment
Closed

App Crashes When Sorting After Empty Search Results #4301

ScenarioKG opened this issue Dec 13, 2024 · 1 comment

Comments

@ScenarioKG
Copy link

Describe the bug
The app crashes when attempting to sort search results after an empty search query.

To Reproduce
Steps to reproduce the behavior:

  1. Click on 'Search' icon
  2. Type a search query that returns no results (e.g., ‘desired search query’).
  3. Click on 'Sort by' button
  4. Click on either the ‘ASCENDING’ or ‘DESCENDING’ button.

Expected behavior
The app should not crash when sorting search results, even if no results are found.

Video

Screen.Recording.mov

Smartphone (please complete the following information):

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

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.NullPointerException: Attempt to invoke interface method 'java.lang.Object[] java.util.Collection.toArray()' on a null object reference
	at java.util.ArrayList.<init>(ArrayList.java:188)
	at com.amaze.filemanager.ui.views.appbar.SearchView.updateResultList(SearchView.java:375)
	at com.amaze.filemanager.ui.views.appbar.SearchView.onSortTypeSelected(SearchView.java:481)
	at com.amaze.filemanager.ui.views.appbar.SearchView.lambda$showSearchResultsSortDialog$11(SearchView.java:469)
	at com.amaze.filemanager.ui.views.appbar.SearchView.$r8$lambda$d_i92XacrdBgqH38-DZKwptUe_8(Unknown Source:0)
	at com.amaze.filemanager.ui.views.appbar.SearchView$$ExternalSyntheticLambda10.onClick(Unknown Source:2)
	at com.afollestad.materialdialogs.MaterialDialog.onClick(MaterialDialog.java:410)
	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
Copy link
Member

dupe #4140 & fixed with #4222. will be rolled in the next release.

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