-
Notifications
You must be signed in to change notification settings - Fork 493
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
IndexOutOfBoundsException causing a lot of crashes #321
Comments
Do you have the source code available? Might be able to help you |
Are you referring to my source code? or the library's? |
Sorry I just got to see this, I was referring to your source code. Or are you working on a private project? |
Sorry for the late reply, I'm working on a private project so unfortunately I cannot share the source code. |
Just curious, do you use the month-to-week collapsing feature? |
Hello! Yes, I'm using that feature |
I have a clue for this and raise a detail issue at #343 |
@kizitonwose This happens if you go to for example to another fragment during the expansion animation (initial STATE_COLLAPSED) CalendarView, and go back to the screen with CalendarView (for reproduce, you can set a longer animation duration in the developer settings). In my case onRestoreInstanceState setting up saved STATE(collapsed/etc)
|
@olegsvs So to reproduce with the Sample app:
Is this correct? |
@kizitonwose Correct, i will try to reproduce on a sample and provide a project |
@olegsvs Thanks, that would be very helpful. |
@kizitonwose Sorry, I found a bug in my code, i used save and restore the status (week mode) of the calendar in onSaveState / onRestoreState, which entailed a double function call to expandCalendarView. I think the author of Issue also needs to give more details about the setup week mode in his project(wait for animation and block actions before anim has end). @mohakapt |
@olegsvs So the expand/collapse logic works fine otherwise? |
@kizitonwose Yep, I no longer had problems with multiple state changes or changing screens during animation, as I said, in problematic projects need to check the animation code for a change in height at the end of which there is a change in the calendar state, if animation is used. I think the creators of such Issue need to attach a code for changing the state of the weekMode |
Hello, I checked my code but couldn't find anything different from the sample in this project. I'm setting up the calendar view exactly like the example here Example1Fragment.kt. Personally, I couldn't reproduce the issue myself, on my devices the component wouldn't crash no matter what I do. The issue is only appearing on my Crashlytics reports from real users. As a workaround I'm calling the |
A temporary workaround that I see would be to use |
This is now fixed in version 2.0.0 |
I'm using this library in my application, recently i started to receive a large amount of crash reports from my users. I cannot reproduce the issue while debugging.
I'm using the latest version of the library.
The text was updated successfully, but these errors were encountered: