1

Whenever choosing an action from the native share menu, the whole widget freezes for a few seconds. It happens every time, no matter what app I want to share to. It seems that the share menu only becomes responsive after those few seconds after being opened:

https://vimeo.com/386471272

When using a non-native share menu, like the one in Firefox Preview, the delay is gone:

https://vimeo.com/386471520

I'm on Android 8.1.0 (LineageOS)

What could be the source of the issue?

EDIT:

I've checked logcat for weird errors and here are some suspicious looking ones:

[01-22 16:10:01.087 8020:8020 E/ActivityThread]
Activity com.android.internal.app.ChooserActivity has leaked ServiceConnection ChooserTargetServiceConnection{service=null, activity=ActivityInfo{d52e89e com.moez.QKSMS.feature.compose.ComposeActivity}} that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.android.internal.app.ChooserActivity has leaked ServiceConnection ChooserTargetServiceConnection{service=null, activity=ActivityInfo{d52e89e com.moez.QKSMS.feature.compose.ComposeActivity}} that was originally bound here
    at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1532)
    at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1424)
    at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1605)
    at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:1565)
    at android.content.ContextWrapper.bindServiceAsUser(ContextWrapper.java:691)
    at com.android.internal.app.ChooserActivity.queryTargetServices(ChooserActivity.java:531)
    at com.android.internal.app.ChooserActivity$ChooserListAdapter.onListRebuilt(ChooserActivity.java:1025)
    at com.android.internal.app.ResolverActivity$ResolveListAdapter$2.run(ResolverActivity.java:1585)
    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:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

[01-22 16:10:01.113 8020:8020 E/ActivityThread]
Activity com.android.internal.app.ChooserActivity has leaked ServiceConnection ChooserTargetServiceConnection{service=null, activity=ActivityInfo{200f0aa org.telegram.ui.LaunchActivity}} that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.android.internal.app.ChooserActivity has leaked ServiceConnection ChooserTargetServiceConnection{service=null, activity=ActivityInfo{200f0aa org.telegram.ui.LaunchActivity}} that was originally bound here
    at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1532)
    at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1424)
    at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1605)
    at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:1565)
    at android.content.ContextWrapper.bindServiceAsUser(ContextWrapper.java:691)
    at com.android.internal.app.ChooserActivity.queryTargetServices(ChooserActivity.java:531)
    at com.android.internal.app.ChooserActivity$ChooserListAdapter.onListRebuilt(ChooserActivity.java:1025)
    at com.android.internal.app.ResolverActivity$ResolveListAdapter$2.run(ResolverActivity.java:1585)
    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:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

[01-22 16:10:01.134 1297:1297 E/BufferItemConsumer]
[unnamed-1297-915] Failed to release buffer: Unknown error -1 (1)

[01-22 16:10:01.151 8020:8020 E/ActivityThread]
Activity com.android.internal.app.ChooserActivity has leaked ServiceConnection ChooserTargetServiceConnection{service=null, activity=ActivityInfo{6eaf7e4 org.xbmc.kore.ui.sections.remote.RemoteActivity}} that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.android.internal.app.ChooserActivity has leaked ServiceConnection ChooserTargetServiceConnection{service=null, activity=ActivityInfo{6eaf7e4 org.xbmc.kore.ui.sections.remote.RemoteActivity}} that was originally bound here
    at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1532)
    at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1424)
    at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1605)
    at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:1565)
    at android.content.ContextWrapper.bindServiceAsUser(ContextWrapper.java:691)
    at com.android.internal.app.ChooserActivity.queryTargetServices(ChooserActivity.java:531)
    at com.android.internal.app.ChooserActivity$ChooserListAdapter.onListRebuilt(ChooserActivity.java:1025)
    at com.android.internal.app.ResolverActivity$ResolveListAdapter$2.run(ResolverActivity.java:1585)
    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:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

EDIT 2:

uninstalling apps mentioned in the above logcat did not resolve the issue

EDIT 3:

Here's the entire log that captures the time where the freeze occurs:

<<< log_count = 27 >>>
[01-22 19:48:37.925 1297:1297 E/BufferItemConsumer]
[unnamed-1297-925] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:37.986 816:831 E/NotificationService]
Suppressing notification from package by user request.

[01-22 19:48:37.993 1297:1297 E/BufferItemConsumer]
[unnamed-1297-926] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:38.258 1297:1297 E/BufferItemConsumer]
[unnamed-1297-927] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:38.325 420:2123 E/SurfaceFlinger]
Failed to find layer (com.dp.logcatapp/com.dp.logcatapp.activities.MainActivity#0) in layer parent (no-parent).

[01-22 19:48:38.344 1297:1297 E/BufferItemConsumer]
[unnamed-1297-928] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:42.319 419:419 E/lowmemorykiller]
Error writing /proc/22962/oom_score_adj; errno=22

[01-22 19:48:42.319 419:419 E/lowmemorykiller]
Error opening /proc/22890/oom_score_adj; errno=2

[01-22 19:48:42.332 816:25704 E/JavaBinder]
!!! FAILED BINDER TRANSACTION !!!  (parcel size = 76)

[01-22 19:48:42.421 816:833 E/zygote64]
Error encountered killing process cgroup uid 99586 pid 22994: No such file or directory

[01-22 19:48:44.079 18370:23548 E/tasks.model.Sources]
error inflating model for at.bitfire.davdroid
org.dmfs.tasks.model.ModelInflaterException: No model definition found for package at.bitfire.davdroid
    at org.dmfs.tasks.model.XmlModel.inflate(XmlModel.java:24)
    at org.dmfs.tasks.model.Sources.getAccounts(Sources.java:8)
    at org.dmfs.tasks.model.Sources.<init>(Sources.java:14)
    at org.dmfs.tasks.model.Sources.getInstance(Sources.java:2)
    at org.dmfs.tasks.utils.AsyncModelLoader.doInBackground(AsyncModelLoader.java:4)
    at org.dmfs.tasks.utils.AsyncModelLoader.doInBackground(AsyncModelLoader.java:1)
    at android.os.AsyncTask$2.call(AsyncTask.java:333)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    at java.lang.Thread.run(Thread.java:764)

[01-22 19:48:44.549 23484:23484 E/ActivityThread]
Activity com.android.internal.app.ChooserActivity has leaked ServiceConnection ChooserTargetServiceConnection{service=null, activity=ActivityInfo{7d65a6 org.telegram.ui.LaunchActivity}} that was originally bound here
android.app.ServiceConnectionLeaked: Activity com.android.internal.app.ChooserActivity has leaked ServiceConnection ChooserTargetServiceConnection{service=null, activity=ActivityInfo{7d65a6 org.telegram.ui.LaunchActivity}} that was originally bound here
    at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1532)
    at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:1424)
    at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1605)
    at android.app.ContextImpl.bindServiceAsUser(ContextImpl.java:1565)
    at android.content.ContextWrapper.bindServiceAsUser(ContextWrapper.java:691)
    at com.android.internal.app.ChooserActivity.queryTargetServices(ChooserActivity.java:531)
    at com.android.internal.app.ChooserActivity$ChooserListAdapter.onListRebuilt(ChooserActivity.java:1025)
    at com.android.internal.app.ResolverActivity$ResolveListAdapter$2.run(ResolverActivity.java:1585)
    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:6494)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:440)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

[01-22 19:48:46.452 1297:1297 E/BufferItemConsumer]
[unnamed-1297-929] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:46.495 23571:23571 E//system/bin/webview_zygote32]
Failed to make and chown /acct/uid_99589: Permission denied

[01-22 19:48:46.495 23571:23571 E/Zygote]
createProcessGroup(99589, 0) failed: Permission denied

[01-22 19:48:46.510 1297:1297 E/BufferItemConsumer]
[unnamed-1297-930] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:46.730 23599:23599 E/asset]
setgid: Operation not permitted

[01-22 19:48:46.758 1297:1297 E/BufferItemConsumer]
[unnamed-1297-931] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:47.107 1297:1297 E/BufferItemConsumer]
[unnamed-1297-932] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:47.604 419:419 E/lowmemorykiller]
Error opening /proc/23119/oom_score_adj; errno=2

[01-22 19:48:47.604 419:419 E/lowmemorykiller]
Error writing /proc/23484/oom_score_adj; errno=22

[01-22 19:48:47.613 419:419 E/lowmemorykiller]
Error writing /proc/23484/oom_score_adj; errno=22

[01-22 19:48:50.221 1297:1297 E/BufferItemConsumer]
[unnamed-1297-933] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:50.351 1297:1297 E/BufferItemConsumer]
[unnamed-1297-934] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:51.491 1297:1297 E/BufferItemConsumer]
[unnamed-1297-935] Failed to release buffer: Unknown error -1 (1)

[01-22 19:48:51.596 816:831 E/NotificationService]
Suppressing notification from package by user request.

[01-22 19:48:51.634 1297:1297 E/BufferItemConsumer]
[unnamed-1297-936] Failed to release buffer: Unknown error -1 (1)

EDIT 4: I've ran locgat 5 separate times, each exhibiting the delay (of various duration, but 2s+ at least every time. Here's the log, attached as a link because otherwise I'd exceed the character limit:

https://hub.sealcode.org/P17

8
  • 1
    Check the adb logcat while opening the share menu for strange entries or errors. I would assume that one app in the sharing list causes this problem. – Robert Jan 22 '20 at 14:39
  • @Robert thanks! I've added the logcat output to the main question – Kuba Orlik Jan 22 '20 at 15:13
  • The logcat messages don't indicate that there is a delay. You should better upload the part where the actual delay happens. – Robert Jan 22 '20 at 18:05
  • Ok, I've added the full log just now! – Kuba Orlik Jan 22 '20 at 18:51
  • Looks like your device is running out of RAM therefore it tries to free RAM (lowmemorykiller log entries) which takes a while. You test it may be four to five times and check logcat if the lowmemorykiller is always very active at the time the share menu is open and unresponsive. – Robert Jan 22 '20 at 19:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.