OpenLauncherTeam / openlauncher

Customizable and Open Source Launcher for Android
Apache License 2.0
1.41k stars 413 forks source link

Crash after bootup if there are some widgets #613

Closed beaver4 closed 3 years ago

beaver4 commented 3 years ago

General Information

Description

When I turn my phone on, OpenLaucher randomly crashes showing the following error message.

Build version: 0.7.3 
Build date: 1981-01-01 01:01:02 
Current date: 2020-08-30 22:47:34 
Device: TCL 5015D 

Stack trace:  
java.lang.IndexOutOfBoundsException: Invalid index 0, size is 0
    at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:255)
    at java.util.ArrayList.get(ArrayList.java:308)
    at com.benny.openlauncher.widget.Desktop.getCurrentPage(Desktop.java:307)
    at com.benny.openlauncher.widget.WidgetContainer.updateWidgetOption(WidgetContainer.java:129)
    at com.benny.openlauncher.viewutil.ItemViewFactory$2.run(ItemViewFactory.java:139)
    at android.os.Handler.handleCallback(Handler.java:815)
    at android.os.Handler.dispatchMessage(Handler.java:104)
    at android.os.Looper.loop(Looper.java:194)
    at android.app.ActivityThread.main(ActivityThread.java:5631)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:372)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:959)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:754)

Steps to reproduce bug

  1. Long press the desktop, select "Widgets", pick any app widget to put it to desktop.
  2. Add one or more shortcuts to desktop.
  3. Reboot the phone 5-10 times.

Most likely some of the attempts to boot up will result in crash. Expected behavior: the desktop is shown every time you turn the phone on. It's tested on MTK6580-based phone. I'm ready to do more tests and provide additional information to help fixing this bug.

gsantner commented 3 years ago

Closing in favor of the Meta issue for Widgets #645 . Please have all discussion at that issue, including crashes, feature requests and more. I also lock this issue as there is nobody that wants to continue to reply on ~100+ mostly duplicate issues.

Currently nobody is working on OpenLauncher Widgets code, so why YOU who reads this message, not steps up? :wink: