Code Monkey home page Code Monkey logo

Comments (3)

denizmveli avatar denizmveli commented on September 21, 2024

@jenzz does PR #53 fix this issue? Can you provide some notes on how you created this error?

from androidstaggeredgrid.

jleidgens avatar jleidgens commented on September 21, 2024

We also have this issue in our app. Except for this crash I really like your StaggeredGrid.

Our Stacktrace looks like this:

0   java.lang.ArrayIndexOutOfBoundsException: length=3; index=3
1   at com.etsy.android.grid.StaggeredGridView.getChildTop(StaggeredGridView.java:571)
2   at com.etsy.android.grid.ExtendableListView.fillGap(ExtendableListView.java:1259)
3   at com.etsy.android.grid.ExtendableListView.moveTheChildren(ExtendableListView.java:1233)
4   at com.etsy.android.grid.ExtendableListView.scrollIfNeeded(ExtendableListView.java:1056)
5   at com.etsy.android.grid.ExtendableListView.startScrollIfNeeded(ExtendableListView.java:1020)
6   at com.etsy.android.grid.ExtendableListView.onInterceptTouchEvent(ExtendableListView.java:776)
7   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2060)
8   at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)
9   at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
10  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)
11  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
12  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)
13  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
14  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)
15  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
16  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)
17  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
18  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)
19  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
20  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)
21  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
22  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)
23  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
24  at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2418)
25  at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2161)
26  at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2139)
27  at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1476)
28  at android.app.Activity.dispatchTouchEvent(Activity.java:2487)
29  at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2087)
30  at android.view.View.dispatchPointerEvent(View.java:7535)
31  at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3415)
32  at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3347)
33  at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4456)
34  at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4434)
35  at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4538)
36  at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)
37  at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
38  at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:163)
39  at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:4506)
40  at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:4557)
41  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
42  at android.view.Choreographer.doCallbacks(Choreographer.java:555)
43  at android.view.Choreographer.doFrame(Choreographer.java:523)
44  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
45  at android.os.Handler.handleCallback(Handler.java:615)
46  at android.os.Handler.dispatchMessage(Handler.java:92)
47  at android.os.Looper.loop(Looper.java:137)
48  at android.app.ActivityThread.main(ActivityThread.java:4921)
49  at java.lang.reflect.Method.invokeNative(Native Method)
50  at java.lang.reflect.Method.invoke(Method.java:511)
51  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
52  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
53  at dalvik.system.NativeStart.main(Native Method)

It happens on screen rotation on tablets I suspect it only happens if not enough items are available to fill the screen. But I can't reproduce this always.

from androidstaggeredgrid.

jenzz avatar jenzz commented on September 21, 2024

@denizmveli #53 seems to fix the issue. I haven't seen the crash again since using that fix.

from androidstaggeredgrid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.