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

Crashing on Android 13 #158

Closed
dozy-programmer opened this issue Jan 22, 2024 · 3 comments
Closed

Crashing on Android 13 #158

dozy-programmer opened this issue Jan 22, 2024 · 3 comments

Comments

@dozy-programmer
Copy link

dozy-programmer commented Jan 22, 2024

I am seeing a recurring crash for Android 13 devices.

Fatal Exception: java.lang.RuntimeException
Unable to start activity ComponentInfo{com.example.myapp/com.nguyenhoanglam.imagepicker.ui.imagepicker.ImagePickerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Class.isInterface()' on a null object reference

I am not able to dig much deeper, since none of the users have reached out, but maybe @nguyenhoanglam has an idea on how this might be possible?

Edit: Was able to dig a little deeper

// this line is what is causing the crashing
config = if (DeviceHelper.isMinSdk33) intent.getParcelableExtra(
            Constants.EXTRA_CONFIG, ImagePickerConfig::class.java
        )!! else intent.getParcelableExtra(Constants.EXTRA_CONFIG)!!
        config.initDefaultValues(this@ImagePickerActivity)

File at com.nguyenhoanglam.imagepicker.ui.imagepicker.ImagePickerActivity.onCreate (ImagePickerActivity.kt:94)

@nguyenhoanglam
Copy link
Owner

nguyenhoanglam commented Jan 22, 2024

@dozy-programmer look like this is a bug of Parcelable .

https://stackoverflow.com/questions/75953723/android-intent-getparcelablearraylistextra-on-arraylistlatlng-raises-nullpoint

I've just reverted the code to use the old methods. Please check 1.6.3 and let me know if it's fixed. Thanks!

@dozy-programmer
Copy link
Author

thanks @nguyenhoanglam, I will let you know if users are still having issues. Appreciate the fix!

@dozy-programmer
Copy link
Author

Issue completely fixed, thanks!

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