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

App Crash on when using the spinner Android 6 and below #40

Closed
basemosama opened this issue Oct 5, 2020 · 5 comments
Closed

App Crash on when using the spinner Android 6 and below #40

basemosama opened this issue Oct 5, 2020 · 5 comments
Assignees
Labels
bug Something isn't working released released already the last version

Comments

@basemosama
Copy link

basemosama commented Oct 5, 2020

Please complete the following information:

  • Library Version V1.1.3
  • Affected Device(s) Android 6 and below

Describe the Bug:

Hello,
There's a bug that is being reported by crashlytics on Android 5 and 6 and I faced when testing on Android 4.4 that causes the app to crash when using the spinner.
it's working fine on Android 10 and Android 8
this the logcat

    java.lang.NullPointerException
        at android.widget.PopupWindow.update(PopupWindow.java:1375)
        at com.skydoves.powerspinner.PowerSpinnerView$updateSpinnerWindowSize$1.run(PowerSpinnerView.kt:496)
        at android.os.Handler.handleCallback(Handler.java:733)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5017)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
        at dalvik.system.NativeStart.main(Native Method)


Is there any fix for this problem as I am getting multiple crashes on Android 5 and 6.
Thanks.

@basemosama basemosama changed the title App Crash on Android 6 and below when using the spinner in dialog fragment App Crash on when using the spinner Android 6 and below Oct 5, 2020
@skydoves skydoves self-assigned this Oct 7, 2020
@skydoves skydoves added the bug Something isn't working label Oct 7, 2020
@skydoves
Copy link
Owner

skydoves commented Oct 7, 2020

Hi, @basemosama.
The crash would occur when we call setItems or setSpinnerAdapter before the PowerSpinnerView is initialized.
It seems to be called after finish inflating.

powerspinnerView.post {
  setItems(..)
}

@basemosama
Copy link
Author

yes, the problem happens when I use setItems or app:spinner_item_array
it works fine in Android 10 and 11
but when I tested it on Android 6 and 4.4 it causes the app to crash.
Is it a problem with the library or is there something wrong on my implementation ?

@skydoves
Copy link
Owner

skydoves commented Oct 8, 2020

Hi, @basemosama.
I just found the issue in the library, It will be fixed in the next release!
Thank you for your reporting :)

@skydoves
Copy link
Owner

skydoves commented Oct 8, 2020

Released a new version 1.1.4.
Thanks!

@skydoves skydoves added the released released already the last version label Oct 8, 2020
@basemosama
Copy link
Author

Nice,
Thanks for the quick update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released released already the last version
Projects
None yet
Development

No branches or pull requests

2 participants