E/AndroidRuntime( 893): FATAL EXCEPTION: main
E/AndroidRuntime( 893): java.lang.ArrayIndexOutOfBoundsException: length=20; index=20
E/AndroidRuntime( 893): at fr.neamar.kiss.adapter.RecordAdapter.getPositionForSection(RecordAdapter.java:196)
E/AndroidRuntime( 893): at android.widget.FastScroller.getThumbPositionForListPosition(FastScroller.java:649)
E/AndroidRuntime( 893): at android.widget.FastScroller.onScroll(FastScroller.java:457)
E/AndroidRuntime( 893): at android.widget.AbsListView.invokeOnItemScrollListener(AbsListView.java:1752)
E/AndroidRuntime( 893): at android.widget.ListView.layoutChildren(ListView.java:1762)
E/AndroidRuntime( 893): at android.widget.AbsListView.onLayout(AbsListView.java:2427)
E/AndroidRuntime( 893): at android.view.View.layout(View.java:14938)
E/AndroidRuntime( 893): at android.view.ViewGroup.layout(ViewGroup.java:4601)
E/AndroidRuntime( 893): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
E/AndroidRuntime( 893): at android.view.View.layout(View.java:14938)
E/AndroidRuntime( 893): at android.view.ViewGroup.layout(ViewGroup.java:4601)
E/AndroidRuntime( 893): at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1021)
E/AndroidRuntime( 893): at android.view.View.layout(View.java:14938)
E/AndroidRuntime( 893): at android.view.ViewGroup.layout(ViewGroup.java:4601)
E/AndroidRuntime( 893): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
E/AndroidRuntime( 893): at android.view.View.layout(View.java:14938)
E/AndroidRuntime( 893): at android.view.ViewGroup.layout(ViewGroup.java:4601)
E/AndroidRuntime( 893): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1694)
E/AndroidRuntime( 893): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1552)
E/AndroidRuntime( 893): at android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
E/AndroidRuntime( 893): at android.view.View.layout(View.java:14938)
E/AndroidRuntime( 893): at android.view.ViewGroup.layout(ViewGroup.java:4601)
E/AndroidRuntime( 893): at android.widget.FrameLayout.onLayout(FrameLayout.java:448)
E/AndroidRuntime( 893): at android.view.View.layout(View.java:14938)
E/AndroidRuntime( 893): at android.view.ViewGroup.layout(ViewGroup.java:4601)
E/AndroidRuntime( 893): at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2212)
E/AndroidRuntime( 893): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2026)
E/AndroidRuntime( 893): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1236)
E/AndroidRuntime( 893): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5160)
E/AndroidRuntime( 893): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:791)
E/AndroidRuntime( 893): at android.view.Choreographer.doCallbacks(Choreographer.java:591)
E/AndroidRuntime( 893): at android.view.Choreographer.doFrame(Choreographer.java:561)
E/AndroidRuntime( 893): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:777)
E/AndroidRuntime( 893): at android.os.Handler.handleCallback(Handler.java:725)
E/AndroidRuntime( 893): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 893): at android.os.Looper.loop(Looper.java:176)
E/AndroidRuntime( 893): at android.app.ActivityThread.main(ActivityThread.java:5365)
E/AndroidRuntime( 893): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 893): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 893): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
E/AndroidRuntime( 893): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
E/AndroidRuntime( 893): at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:132)
E/AndroidRuntime( 893): at dalvik.system.NativeStart.main(Native Method)
app version: 3.3.0
android version: 4.2.2
device used: Samsung S3 mini
woops this one is on me :\ (#926)
Do you have any app with a non-alphabetical first character? That's the only thing I can think of right now
Another question, do you have the bug all the time, or it only happened once?
No all apps start with a letter from the alphabet and yes the launcher crashes every time I click on the circle.
Ok, thanks for the additional details.
Are you able to compile KISS? If so, I can make a branch with additional logging to see what's going on
Yes I can do that :wink:
Cool! Can you try to compile and run d6f4899, and send me the error-level logs?
Thanks!
Here is the output just before the exception
E/malnvenshorn(12009): {D=55, E=52, F=46, G=43, A=63, B=61, C=59, L=34, M=33, N=30, O=26, H=41, I=40, K=36, U=4, T=5, W=2, V=3, P=25, S=14, R=22, X=0}
E/malnvenshorn(12009): [D, E, F, G, A, B, C, L, M, N, O, H, I, K, U, T, W, V, P, S, R, X]
E/malnvenshorn(12009): [A, B, C, D, E, F, G, H, I, K, L, M, N, O, P, R, S, T, U, V, W, X]
D/dalvikvm(12009): GC_CONCURRENT freed 342K, 9% free 13945K/15304K, paused 3ms+6ms, total 47ms
E/malnvenshorn(12009): Getting section 21 / 22
E/malnvenshorn(12009): Getting section 22 / 22
D/AndroidRuntime(12009): Shutting down VM
W/dalvikvm(12009): threadid=1: thread exiting with uncaught exception (group=0x41d94930)
Interesting.
First off, did you install anything new? In the first stack trace the length was 20. I'm curious if this changed because you installed something, or if something weird happened.
I might have an idea of what's going wrong. Do you have more than a full screen of applications starting with the letter "A"?
Ok, since you can compile, I believe I might have a fix.
In https://github.com/Neamar/KISS/blob/d6f4899ead7b475f32c1c9980fc22d49cf49e313/app/src/main/java/fr/neamar/kiss/adapter/RecordAdapter.java#L220, can you replace "- 1" with "- 2" ?
New line should be return sections.length - 2;
If the app doesn't crash, can you make sure that the slider on the right still works? Especially, does it still display "A" at the bottom (assuming the app at the top of the screen starts with an A)
I haven't installed something new, except for the debug version of this launcher which I compiled. Tried some apps before but deleted them.
Do you have more than a full screen of applications starting with the letter "A"?
Yes.
I will try the fix tomorrow.
Ok, cool. Hopefully this will fix it! Thanks for your help in debugging, it's really making things much easier for me :)
Tried the fix above and everything seem to work fine :+1:
It doesn't crash anymore and the scrollbar shows the first letter from the app at the top when scrolling up and down.
Thanks for your help in debugging, it's really making things much easier for me :)
I'm glad that I can help. It's a really nice project and I like the philosophy behind it, although I just started using this launcher. The search is very fast even on my (ancient) phone and the launcher doesn't distract from the essential. Keep up the good work!
Pushed a fix! Thanks :)
Extend the length of array 馃憤