OpenLauncherTeam / openlauncher

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

Crash on desktop after hiding/uninstalling all apps contained in a folder #523

Closed tildica closed 4 years ago

tildica commented 4 years ago

General Information

Description

If you make a folder with apps, then hide (or uninstall) all of those apps, a blank folder will stay on desktop. Trying to open it will crash the app. Here's an image showing how to recreate the bug.

peek

It would probably be better if apps on "desktop" aren't hidden. It makes more sense from a user perspective. If you've placed an app on desktop then you probably don't want it hidden, and you can remove shortcuts from desktop anyways. Or, maybe there should be an option to show hidden apps on desktop like there is for the search bar. However, after further testing I've found that even uninstalling apps will leave blank folders. I can see a few similar issues posted about this before. Perhaps folders should be checked if they're null/blank when the desktop is shown, or if they contain uninstalled/hidden apps. A less elegant solution would be to handle folders like you do the app drawer, since it doesn't seem to crash when hiding or uninstalling apps.

May be related to #345 , #446 , #458

Log

Build version: 0.7.1 Build date: 1980-01-01 00:00:00 Current date: 2019-11-25 10:03:12 Device: Samsung SM-G928F

Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnLongClickListener(android.view.View$OnLongClickListener)' on a null object reference at com.benny.openlauncher.widget.GroupPopupView.showPopup(GroupPopupView.java:119) at com.benny.openlauncher.widget.AppItemView$Builder$3.onClick(AppItemView.java:222) at android.view.View.performClick(View.java:6205) at android.view.View$PerformClick.run(View.java:23653) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6682) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

just-Nob commented 4 years ago

I have an issue (bug) that seems to be related to this one, but the way to force the crash is a little bit different:

I have some folders on the desktops with multiple app links inside. Some of the folders are going to crash, even if there are multiple app links inside, i.e. these folders are definitely not empty.

I also haven't (intentionally) hidden or deleted/removed any apps, and it took a long time before I had an idea what may happened to those folders that suddenly crashed OpenLauncher when opening them.

. Now I recognized the following: I have a folder where I put all my apps for calling app stores (F-Droid as well as Google play). Those 4 apps that I had "bundled" there for my convenience are: F-Droid, G-Droid, Google Play Store, Aurora Store (an alternative store, available in the F-Droid repo, to access the Google Play repo). All four app icons were visible in the folder's little preview icon on the desktop. I opened the folder regularly for keeping all my apps up to date.

A few days ago, the Aurora Store was updated and I updated it on my device via F-Droid. After doing so, the Aurora Store's "mini icon" in the folder's content preview was gone and the OpenLauncher now crashes every time I try to open that folder.

I guess that the reason is F-Droid's way to update its apps: The app is first removed, then the new version is installed. This is similar to the described behavior, where opening the folder crashes after the apps inside are deinstalled.

just-Nob commented 4 years ago

Here's the log:

Build version: 0.7.2 Build date: 1979-11-30 01:00:00 Current date: 2020-01-09 15:45:28 Device: Unknown

Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnLongClickListener(android.view.View$OnLongClickListener)' on a null object reference at com.benny.openlauncher.widget.GroupPopupView.showPopup(GroupPopupView.java:119) at com.benny.openlauncher.widget.AppItemView$Builder$3.onClick(AppItemView.java:222) at android.view.View.performClick(View.java:6294) at android.view.View$PerformClick.run(View.java:24774) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6543) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

just-Nob commented 4 years ago

Funny build date... :D

5p0ng3b0b commented 4 years ago

Same problem here but slightly different error report. I'm running rooted Android 9 FWIW.

Build version: 0.7.2 Build date: 1979-11-30 00:00:00 Current date: 2020-02-09 21:39:45 Device: N5plus N5PLUS

Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnLongClickListener(android.view.View$OnLongClickListener)' on a null object reference at com.benny.openlauncher.widget.GroupPopupView.showPopup(GroupPopupView.java:119) at com.benny.openlauncher.widget.AppItemView$Builder$3.onClick(AppItemView.java:222) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

DrizztFR commented 4 years ago

Hello. Slightly different problem here but seems related.

I have multiple apps in a folder and I uninstalled several by long-clicking on the icons inside the folder. After a few uninstallations, I can no longer access the folder (which is not empty) because OpenLauncher will crash every time. A reboot doesn't change anything.

Build version: 0.7.2 Build date: 1979-11-30 01:00:00 Current date: 2020-02-26 12:58:04 Device: Xiaomi Mi MIX 2S

Stack trace:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnLongClickListener(android.view.View$OnLongClickListener)' on a null object reference at com.benny.openlauncher.widget.GroupPopupView.showPopup(GroupPopupView.java:119) at com.benny.openlauncher.widget.AppItemView$Builder$3.onClick(AppItemView.java:222) at android.view.View.performClick(View.java:6597) at android.view.View.performClickInternal(View.java:6574) at android.view.View.access$3100(View.java:778) at android.view.View$PerformClick.run(View.java:25885) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6718) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)