Crashing on Android 13
dozy-programmer opened this issue · comments
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)
@dozy-programmer look like this is a bug of Parcelable
.
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!
thanks @nguyenhoanglam, I will let you know if users are still having issues. Appreciate the fix!
Issue completely fixed, thanks!