Skip to content

'boolean java.lang.String.isEmpty()' on a null object reference on certain Android phones. #193

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

Merged
merged 1 commit into from
Nov 5, 2022

Conversation

Saikedo
Copy link

@Saikedo Saikedo commented Nov 5, 2022

We observed that some Android phones were crashing when executing ReactNativeBlobUtil.MediaCollection.copyToMediaStore.

The crash log was showing

Attempt to invoke virtual method 'boolean java.lang.String.isEmpty()' on a null object reference.

Unfortunately, none of the devices I have were crashing in this manner, and trying to debug on the few phones that the crash was observed on was impossible for us.

In this push, I am just adding a null check in all the places that perform .isEmpty() check. I already tested the implementation and indeed, one of these .isEmpty() checks was responsible for the crash.

Just in case if this will be of any help, one of the phones that were crashing is a Samsung Galaxy S8 running Android 8.

@RonRadtke RonRadtke merged commit c39962b into RonRadtke:master Nov 5, 2022
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

Successfully merging this pull request may close these issues.

2 participants