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

Attempt to invoke virtual method 'java.lang.String java.lang.Enum.name()' on a null object reference #85

Open
daniebruwer opened this issue Sep 5, 2018 · 3 comments

Comments

@daniebruwer
Copy link

implementation 'com.appeaser.sublimepickerlibrary:sublimepickerlibrary:2.1.1'

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.Enum.name()' on a null object reference
at com.appeaser.sublimepickerlibrary.SublimePicker$SavedState.writeToParcel(SublimePicker.java:499)
at android.os.Parcel.writeParcelable(Parcel.java:1792)
at android.os.Parcel.writeValue(Parcel.java:1698)
at android.os.Parcel.writeSparseArray(Parcel.java:966)
at android.os.Parcel.writeValue(Parcel.java:1723)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:838)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1546)
at android.os.Bundle.writeToParcel(Bundle.java:1232)
at android.os.Parcel.writeBundle(Parcel.java:878)
at android.os.Parcel.writeValue(Parcel.java:1689)
at android.os.Parcel.writeArrayMapInternal(Parcel.java:838)
at android.os.BaseBundle.writeToParcelInner(BaseBundle.java:1546)
at android.os.Bundle.writeToParcel(Bundle.java:1232)
at android.app.IActivityManager$Stub$Proxy.activityStopped(IActivityManager.java:4634)
at android.app.ActivityThread$StopInfo.run(ActivityThread.java:4552)
at android.os.Handler.handleCallback(Handler.java:809)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7377)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:469)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:963)

@vikramkakkar
Copy link
Owner

@daniebruwer I'm not able to reproduce this. Can you please provide some more info on this? Is this happening on a specific version, picker combination/options?

@daniebruwer
Copy link
Author

@vikramkakkar it seems to be only on HUAWEI1 00% Operating Systems> 100% 8
8.1.0
All the details I have on Fabric link below
http://crashes.to/s/efecbd65a26

@ofir-bar5
Copy link

It happened to me.
Apparently, somewhere in your code, you are passing a null value to an enum that is not nullable.
So for example, if you have this object:

data class ExampleObject(
dayOfTheWeek : Day ,// Enum is not nullable
id : Int
)

Change it to
data class ExampleObject(
dayOfTheWeek : Day? // Enum is nullable
id : Int
)

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

3 participants