-
Notifications
You must be signed in to change notification settings - Fork 921
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 Crash On Search #2926
Comments
@satyajiit You mentioned that on clicking the toolbar search option, the app got crashed then how did the Also for me the null case is working on Android 9. |
@codedsun The Crash Occurs because of the null value that is being loaded to the album name. |
I have also created the same scenario but I found no crash. As we are searching for string @yashk2000 Please confirm |
@codedsun we cannot apply "toLowerCase" on a null object or datatype right? |
@codedsun while setting the name to textView it converts to "null" string forcefully. |
The Album name is converted to "null" because of implicit type conversion by Java. |
The null case is only returned when the media provider class is not able to fetch the name of the album, its not the case when the album name is forcefully set to More reference : https://stackoverflow.com/questions/4802015/difference-between-null-and-empty-java-string
This is a false claim please debug and check what a.getName() returns and add the screenshot here. Also if this is a device-specific issue I will check and confirm |
@codedsun Tested on Devices not running android 10 , But on Android 10 devices ( Tested on emulators now ) , |
@codedsun it is always a good practice to check for null values before using them. right? |
@satyajiit How is the null folder possible, please mention ? Also please dont edit the issue description. It makes us confuse what we were trying to the actually solve and what you mentioned.. You are saying that we have a folder with no name in sdcard directory, first tell me how is thiss possible until you use some unicode character which arent' visible Next, if you have a folder named null, then how is the case when we are fetching the same folder with album name throwing NPE. Please tell me how do I reproduce for android 10 device. |
@codedsun Sorry you are getting it wrong. STEPS TO REPRODUCE
What i found : and on older versions : |
Proceed, Please state the issue clearly. You wrote something else in the issue. No problem |
Can I solve this issues |
Describe the bug
Clicking on Search Icon in the Toolbar Crash/Terminate the App
To Reproduce
Expected behavior
Should work normally without crashing the App.
Logs
GIF
Screenshots
Smartphone Info:
Additional context
The Crash is caused only because album item is returning null when an image is stored in root directory i.e /sdcard .
Would you like to work on the issue?
The text was updated successfully, but these errors were encountered: