Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Launcher crashes #2158

Closed
a1lu opened this issue Sep 16, 2023 · 4 comments · Fixed by #2159
Closed

Launcher crashes #2158

a1lu opened this issue Sep 16, 2023 · 4 comments · Fixed by #2159
Labels
crash App crashes

Comments

@a1lu
Copy link

a1lu commented Sep 16, 2023

Describe the crash
When I enter something in the search bar the app crashes sometimes. Maybe related to #2156

To Reproduce
Steps to reproduce the crash:

  1. Go to home screen and enter something
  2. App crashes.

Stack trace

FATAL EXCEPTION: main
Process: fr.neamar.kiss, PID: 24558
java.lang.NullPointerException
	at android.os.Parcel.createExceptionOrNull(Parcel.java:3026)
	at android.os.Parcel.createException(Parcel.java:3004)
	at android.os.Parcel.readException(Parcel.java:2980)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:190)
	at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:153)
	at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:780)
	at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:2048)
	at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1863)
	at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1696)
	at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:1643)
	at android.content.pm.LauncherApps.getUriShortcutIconFd(LauncherApps.java:1369)
	at android.content.pm.LauncherApps.getUriShortcutIconFd(LauncherApps.java:1359)
	at android.content.pm.LauncherApps.getShortcutIconDrawable(LauncherApps.java:1410)
	at fr.neamar.kiss.DataHandler$$ExternalSyntheticApiModelOutline0.m(R8$$SyntheticClass:2)
	at fr.neamar.kiss.result.ShortcutsResult.getDrawable(ShortcutsResult.java:35)
	at fr.neamar.kiss.result.ShortcutsResult.display(ShortcutsResult.java:273)
	at fr.neamar.kiss.adapter.RecordAdapter.getView(RecordAdapter.java:15)
	at android.widget.AbsListView.obtainView(AbsListView.java:2458)
	at android.widget.ListView.makeAndAddView(ListView.java:2067)
	at android.widget.ListView.fillUp(ListView.java:828)
	at android.widget.ListView.layoutChildren(ListView.java:1805)
	at android.widget.AbsListView.onLayout(AbsListView.java:2255)
	at android.view.View.layout(View.java:23798)
	at android.view.ViewGroup.layout(ViewGroup.java:6413)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:23798)
	at android.view.ViewGroup.layout(ViewGroup.java:6413)
	at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1103)
	at android.view.View.layout(View.java:23798)
	at android.view.ViewGroup.layout(ViewGroup.java:6413)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at android.view.View.layout(View.java:23798)
	at android.view.ViewGroup.layout(ViewGroup.java:6413)
	at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
	at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
	at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
	at android.view.View.layout(View.java:23798)
	at android.view.ViewGroup.layout(ViewGroup.java:6413)
	at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
	at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
	at com.android.internal.policy.DecorView.onLayout(DecorView.java:799)
	at android.view.View.layout(View.java:23798)
	at android.view.ViewGroup.layout(ViewGroup.java:6413)
	at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4114)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3455)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2367)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9293)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
	at android.view.Choreographer.doCallbacks(Choreographer.java:899)
	at android.view.Choreographer.doFrame(Choreographer.java:832)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7940)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ExecInit.main(ExecInit.java:49)
	at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
	at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)

Additional information

  • App version: 3.20
  • Did the crash start happening with this version? yes
  • App installed via: (f-droid, Play Store, debug APK): fdroid
@a1lu a1lu added the crash App crashes label Sep 16, 2023
@marunjar
Copy link
Collaborator

Looks like any of the shortcuts you are using has an invalid icon set 😢
The only thing we can do here is to catch this exception: this may result in an empty icon to be shown, but at least KISS can still be used.

In the meantime, you may try to disable shortcuts you don't need through KISS Settings > History Settings > View or edit apps excluded from showing shortcuts

@a1lu
Copy link
Author

a1lu commented Sep 17, 2023

How can I know which shortcut is responsible for the crash?

The only thing we can do here is to catch this exception: this may result in an empty icon to be shown, but at least KISS can still be used.

That would be totally fine for me and could be a help in finding the corrupt shortcut.

@a1lu
Copy link
Author

a1lu commented Sep 17, 2023

Most of my apps use the arcticons icon set, so I guess only apps that are not supported by this may be affected? I disabled all of these apps like you said and will see if this helps.

I did a quick web search and did not find any information about what exactly shortcuts are how to see all my shortcuts. Is there anywhere a list of these? I am not aware of creating any shortcuts to apps. I only added two web pages in my browser "to Home screen".

Also I found a toggle Show app icon on shortcuts at KISS Settings > User experience > Misc and disabled this, though this does not seem to help (it crashed on first search with disabled toggle).

marunjar added a commit to marunjar/KISS that referenced this issue Sep 17, 2023
- catch some exceptions thrown when handling broken shortcuts
- add more exception logging
- hopefully fixes Neamar#2158
@marunjar
Copy link
Collaborator

Most of my apps use the arcticons icon set, so I guess only apps that are not supported by this may be affected? I disabled all of these apps like you said and will see if this helps.

this is not related to any icon pack

I did a quick web search and did not find any information about what exactly shortcuts are how to see all my shortcuts. Is there anywhere a list of these? I am not aware of creating any shortcuts to apps. I only added two web pages in my browser "to Home screen".

there is no list with all shortcuts
there are also dynamic shortcuts, which are created/updated automatically by apps, e.g. last contacts of WhatsApp or Signal

Also I found a toggle Show app icon on shortcuts at KISS Settings > User experience > Misc and disabled this, though this does not seem to help (it crashed on first search with disabled toggle).

also not related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash App crashes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants