OpenLauncherTeam / openlauncher

Customizable and Open Source Launcher for Android
Apache License 2.0
1.44k stars 414 forks source link

App menu crashes when scrolling to bottom #646

Open adrianhelvik opened 3 years ago

adrianhelvik commented 3 years ago

Scrolling to the bottom of the app list crashes the app. Just installed on Play store. My bet: There is a s[s.length] or <= string.length somewhere.

Build version: 0.5.8(alpha) 
Build date: 1979-11-30 00:00:00 
Current date: 2021-02-01 19:42:29 
Device: Samsung SM-G970F 

Stack trace:  
java.lang.StringIndexOutOfBoundsException: length=13; index=14
    at java.lang.String.substring(String.java:2060)
    at com.benny.openlauncher.core.widget.AppItemView.onDraw(AppItemView.java:196)
    at android.view.View.draw(View.java:23915)
    at android.view.View.updateDisplayListIfDirty(View.java:22790)
    at android.view.View.draw(View.java:23645)
    at android.view.ViewGroup.drawChild(ViewGroup.java:5336)
    at android.support.v7.widget.RecyclerView.drawChild(RecyclerView.java:4607)
    at android.view.ViewGroup.dispatchDraw(ViewGroup.java:5093)
    at android.view.View.draw(View.java:23918)
    at android.support.v7.widget.RecyclerView.draw(RecyclerView.java:4013)
    at android.view.View.updateDisplayListIfDirty(View.java:22790)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:5320)
    at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:5292)
    at android.view.View.updateDisplayListIfDirty(View.java:22745)
    at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:567)
    at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:573)
    at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:650)
    at android.view.ViewRootImpl.draw(ViewRootImpl.java:4906)
    at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:4613)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3754)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2519)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9775)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1010)
    at android.view.Choreographer.doCallbacks(Choreographer.java:809)
    at android.view.Choreographer.doFrame(Choreographer.java:744)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:995)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:246)
    at android.app.ActivityThread.main(ActivityThread.java:8425)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:596)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
dreparn commented 2 years ago

Same thing happens to me.

Error log output: Build version: 0.5.8(alpha) Build date: 1979-11-30 00:00:00 Current date: 2022-03-04 01:52:49 Device: Samsung SM-G390F

Stack trace:
java.lang.StringIndexOutOfBoundsException: length=14; index=15 at java.lang.String.substring(String.java:2032) at com.benny.openlauncher.core.widget.AppItemView.onDraw(AppItemView.java:196) at android.view.View.draw(View.java:21879) at android.view.View.updateDisplayListIfDirty(View.java:20752) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.support.v7.widget.RecyclerView.drawChild(RecyclerView.java:4607) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.draw(View.java:21882) at android.support.v7.widget.RecyclerView.draw(RecyclerView.java:4013) at android.view.View.updateDisplayListIfDirty(View.java:20752) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.updateDisplayListIfDirty(View.java:20738) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.draw(View.java:21882) at android.view.View.updateDisplayListIfDirty(View.java:20752) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at io.codetail.widget.RevealFrameLayout.drawChild(RevealFrameLayout.java:32) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.draw(View.java:21882) at android.view.View.updateDisplayListIfDirty(View.java:20752) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.updateDisplayListIfDirty(View.java:20738) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.draw(View.java:21882) at android.view.View.updateDisplayListIfDirty(View.java:20752) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.support.v4.widget.DrawerLayout.drawChild(DrawerLayout.java:1367) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.updateDisplayListIfDirty(View.java:20738) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.updateDisplayListIfDirty(View.java:20738) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.updateDisplayListIfDirty(View.java:20738) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.updateDisplayListIfDirty(View.java:20738) at android.view.View.draw(View.java:21605) at android.view.ViewGroup.drawChild(ViewGroup.java:4558) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4333) at android.view.View.draw(View.java:21882) at com.android.internal.policy.DecorView.draw(DecorView.java:1138) at android.view.View.updateDisplayListIfDirty(View.java:20752) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:725) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:731) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:840) at android.view.ViewRootImpl.draw(ViewRootImpl.java:4035) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3799) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3095) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1958) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8636) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:988) at android.view.Choreographer.doCallbacks(Choreographer.java:765) at android.view.Choreographer.doFrame(Choreographer.java:700) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7156) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

beaver4 commented 2 years ago

@adrianhelvik, @dreparn, which Android version do you use? How often is this behavior reproduced? Can you reproduce it in the latest version (OpenLauncher 0.7.4)?