pinguinjkeke / react-native-wheel-datepicker

Android & iOS iOS-style Picker & DatePicker Components for ReactNative

Home Page:https://www.npmjs.com/package/react-native-wheel-datepicker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uprade AigeStudio/WheelPicker

mdrbohlav opened this issue · comments

Hello, could you please upgrade the component to use AigeStudio/WheelPicker version at least 1.1.1? It fixes a lot of bugs.

For example now I am getting this error and I am hoping it is fixed in a newer version:

E/unknown:ReactNative: Exception in native call
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
at java.util.ArrayList.get(ArrayList.java:308)
at com.aigestudio.wheelpicker.core.AbstractWheelPicker.onSizeChanged(AbstractWheelPicker.java:234)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.onSizeChanged(WheelCrossPicker.java:69)
at android.view.View.sizeChange(View.java:15703)
at android.view.View.setFrame(View.java:15676)
at android.view.View.layout(View.java:15592)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateLayout(NativeViewHierarchyManager.java:199)
at com.facebook.react.uimanager.NativeViewHierarchyManager.updateLayout(NativeViewHierarchyManager.java:184)
at com.facebook.react.uimanager.UIViewOperationQueue$UpdateLayoutOperation.execute(UIViewOperationQueue.java:125)
at com.facebook.react.uimanager.UIViewOperationQueue$1.run(UIViewOperationQueue.java:776)
at com.facebook.react.uimanager.UIViewOperationQueue.flushPendingBatches(UIViewOperationQueue.java:855)
at com.facebook.react.uimanager.UIViewOperationQueue.access$1600(UIViewOperationQueue.java:46)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:900)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.java:31)
at com.facebook.react.modules.core.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:136)
at com.facebook.react.modules.core.ChoreographerCompat$FrameCallback$1.doFrame(ChoreographerCompat.java:107)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:765)
at android.view.Choreographer.doCallbacks(Choreographer.java:580)
at android.view.Choreographer.doFrame(Choreographer.java:549)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
D/AndroidRuntime: Shutting down VM
E/UncaughtException: java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
at java.util.ArrayList.get(ArrayList.java:310)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.confirmData(WheelCrossPicker.java:144)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.run(WheelCrossPicker.java:125)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
D/FA: Event not sent since app measurement is disabled
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.slideslive.mobile, PID: 6114
java.lang.ArrayIndexOutOfBoundsException: length=0; index=-1
at java.util.ArrayList.get(ArrayList.java:310)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.confirmData(WheelCrossPicker.java:144)
at com.aigestudio.wheelpicker.view.WheelCrossPicker.run(WheelCrossPicker.java:125)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)

Hi. You hope or it's really fixed in the newest versions?
How can I reproduce this bug in example provided with package?
Provide more details about your environment please.

I am using RN 0.48.1 with react-native-navigation. When I unmount the screen with the wheel picker it throws this error. Looks like it is trying to call function confirmData when there is no data anymore.
It is hard to tell if it is fixed since the changelog of the project says Refactor project fix all known bug and some function additions.

@mdrbohlav I'm busy right now. Feel free to open PR

Can anyone else confirm that this issue is exist?

I am sorry I did not get back to this sooner. I tried to rewrite the component with the new version of AigeStudio/WheelPicker but I got the same error anyway so I re-thought the whole UX and I do not use this component anymore.
It looks like I was the only one getting this error so I guess you can close it now.

@mdrbohlav thank you for the information. I'm using library in project in many ways and cannot catch the same error.
It would be super-puper cool if you'll provide mini-example of crashing on expo or something similar. It will help our library a lot.

I will try but I cannot give you any ETA, I do not have much time

@mdrbohlav okay, thank you