-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
NPE onSizeChanged #41
Comments
I just encountered a similar problem:
My guess is it's related to a screen orientation change, but I cannot reproduce it on my devices. The crash was reported in the Play Store: Android version: Android 4.2 |
I'm having the same issue. The code that is causing this is in here, in StaggeredGridView.java: private void onColumnSync() {
} Specifically, this line is what is causing this crash for me: final double heightRatio = positionHeightRatios.get(pos); Above that, in the 1st for() loop, there is a "weirdness" check which breaks and moves on to the next record if the current record is null. If that condition is met, the height ratio will never be appended into positionHeightRatios at position "pos". Unfortunately, the next loop will still always check positionHeightRatios.get(pos), which, if the weirdness check succeeds, will be null for that pos. Which wouldn't be a problem, except that it's being saved into a primitive double. Can anyone else think of a reason that this can't or shouldn't be fixed by simply adding another break in the 2nd for loop if(positionHeightRatios.get(pos) == null)? Unfortunately I'm still unable to find a situation where the record is null, so I'm not completely sure what the side effects might be. I can't imagine they'd be worse than my app crashing, though. |
@resamsel @tumb1er it hasn't been accepted yet after almost a month, but the ridiculously simple fix I submitted has stopped all crashes due to this bug in my app. See code here: ajpolt@7699ba8 |
Fixed by #91 |
Got this exception from Google Play Developers Console:
Trying to reproduce locally, but not yet succeeded... Can I help with anything else?
The text was updated successfully, but these errors were encountered: