albert icon indicating copy to clipboard operation
albert copied to clipboard

albert freezing on entering query

Open isshin1 opened this issue 1 year ago • 43 comments

Package source

AUR

App report

Albert version: 0.23.0
           Build date: Mar 16 2024 14:00:29
           Qt version: 6.7.0
            Build ABI: x86_64-little_endian-lp64
   Build architecture: x86_64
     CPU architecture: x86_64
          Kernel type: linux
       Kernel version: 6.8.5-arch1-1
                   OS: Arch Linux
              OS type: arch
           OS version: unknown
        Platform name: wayland
           Style name: fusion
     Available styles: Breeze, Windows, Fusion
           Icon theme: hicolor
                 Font: Sans Serif,9,-1,5,400,0,0,0,0,0,0,0,0,0,0,1
             Language: English
               Locale: en_IN
      Binary location: /usr/bin/albert
          Working dir: /home/kushy
            Arguments: albert
                $LANG: en_IN.UTF-8
$QT_QPA_PLATFORMTHEME: qt5ct
                $PATH: /var/lib/snapd/snap/bin/:/home/kushy/.local/bin:/usr/local/bin:/home/kushy/.config/sway/scripts:/home/kushy/.scripts:/home/kushy/.go/bin:/home/kushy/.cargo/bin:/usr/lib/jvm/java-8-openjdk:/usr/lib/jvm/java-8-openjdk/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/lib/rustup/bin:/opt/android-sdk/platform-tools/:/opt/android-sdk/tools/bin/:/emulator:/opt/android-sdk/tools/:/home/kushy/.npm-packages/bin
               $SHELL: /usr/bin/zsh
    $XDG_SESSION_TYPE: wayland
 $XDG_CURRENT_DESKTOP: sway
     $DESKTOP_SESSION: 
 $XDG_SESSION_DESKTOP:

Current Behavior

albert freezes for a few seconds when entering query immediately after albert window pops up. Issue was more severe when extensions were turned on, so i disabled all plugins except applications. reproducibility got reduced, but it still happens. experiencing the issue on 2 different systems, arch and endeavour, same version of albert ( aur latest )

Expected Behavior

albert should not hang/freeze regardless of query

Anything else?

i could not see anything specific in logs, with or without extensions on, except for this

21:56:58 [warn:albert] Busy wait on query: #15

and sometimes

Read timed out. Albert busy?

when i run albert show manually in terminal

isshin1 avatar Apr 19 '24 16:04 isshin1

Please post the logs when running a new albert instance (quit albert before) from terminal using QT_LOGGING_RULES='albert.*=true' albert. What if all extensions are disabled?

ManuelSchneid3r avatar Apr 22 '24 08:04 ManuelSchneid3r

What if all extensions are disabled?

i couldnt replicate the issue with all disabled, so likely the application plugin is the culprit

with applications plugin on, it got stuck on 2nd query when i typed random gibberish

https://gist.github.com/Iss-in/54ed7d638238a39706e131f06ab4c6ff

ist i searched for firefox, which worked, then i typed "asdas" and input got stuck

isshin1 avatar Apr 22 '24 09:04 isshin1

Have you seen those lines?

Bildschirmfoto 2024-04-22 um 12 06 15

ManuelSchneid3r avatar Apr 22 '24 10:04 ManuelSchneid3r

does it means that these plugins are enabled ? image because i definitely turned them off

isshin1 avatar Apr 22 '24 10:04 isshin1

The logs look regular. did albert freeze while you caputred this output?

However theres one thing to note:

15:04:47 [warn:albert] No icons found for QList(xdg:firefox_work, :unkown)
15:04:47 [warn:albert] No icons found for QList(xdg:firefox_personal, :unkown)

Looks like you modified the desktop entries. Where did you put the icons?

ManuelSchneid3r avatar Apr 22 '24 10:04 ManuelSchneid3r

The logs look regular. did albert freeze while you caputred this output?

However theres one thing to note:

15:04:47 [warn:albert] No icons found for QList(xdg:firefox_work, :unkown)
15:04:47 [warn:albert] No icons found for QList(xdg:firefox_personal, :unkown)

yes, first result was fine, on 2nd query i typed random letters and it got stuck

isshin1 avatar Apr 22 '24 10:04 isshin1

some of the entries which i made manually are in .local/share/applications icons are in /usr/share/icons/hicolor

edit: actually seems like some of these are missing, but still that should not be the cause of this , right ? since it wasnt the "firefox" keyword search that caused freeze

isshin1 avatar Apr 22 '24 10:04 isshin1

does it means that these plugins are enabled ?

it means that the plugins are scanned twice? do you have some weird links? wait arch links /usr/lib to /lib or such right?

ManuelSchneid3r avatar Apr 22 '24 10:04 ManuelSchneid3r

File: /lib -> usr/lib yes

isshin1 avatar Apr 22 '24 10:04 isshin1

what exactly happens if the input is stuck? in the logs all queries finished.

ManuelSchneid3r avatar Apr 22 '24 10:04 ManuelSchneid3r

edit: actually seems like some of these are missing, but still that should not be the cause of this , right ?

no just a side note. missing icons should not affect queries

ManuelSchneid3r avatar Apr 22 '24 10:04 ManuelSchneid3r

Kooha-2024-04-22-15-54-33.webm

after it freezes, normally it resumes itself after a while

isshin1 avatar Apr 22 '24 10:04 isshin1

I tried it on manjaro. I cant reproduce. I also added a missing icon entry. Works as expected. Any ideas?

The above loggingrules are not correct. The dot excluded core debug messages. Try again using

QT_LOGGING_RULES=albert*=true albert

also see if it somehow depends on the platform

QT_LOGGING_RULES=albert*=true albert --platform xcb

ManuelSchneid3r avatar Apr 22 '24 11:04 ManuelSchneid3r

16:46:33 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
16:46:33 [debg:albert.query_runtimes] │     0 ms│     0 ms│     1│ #19 's' albert
16:46:33 [debg:albert.query_runtimes] │     0 ms│     0 ms│     4│ #19 's' pluginregistry
16:46:33 [debg:albert.query_runtimes] │     0 ms│     0 ms│    66│ #19 's' applications_xdg
16:46:33 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
16:46:33 [debg:albert.query_runtimes] │     0 ms│     0 ms│    71│ #19 GLOBAL 's'
16:46:33 [debg:albert.query_runtimes] │     0 ms│ ------- │ ---- │ #19 TOTAL
16:46:43 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
16:46:43 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #20 'ss' albert
16:46:43 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
16:46:43 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
16:46:43 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
16:46:43 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
16:46:43 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #23 GLOBAL 'ssdsd'

there is absolutely nothing in logs, simply a long delay when freeze happens. i will try to see if its reproducible in gnome

isshin1 avatar Apr 22 '24 11:04 isshin1

same thing in both gnome X and wayland session. in gnome wayland , i got the warning that window was not responding.

isshin1 avatar Apr 22 '24 13:04 isshin1

I can't tell. I switched to my Linux box yesterday. Using the aur build and from source I could jot reproduce it. Have you tried to purge everything and build from scratch?

ManuelSchneid3r avatar Apr 23 '24 11:04 ManuelSchneid3r

seems like it turned out to be a case of corrupted config. deleted the config folder and its working fine now. idk what happened which caused the issue on both systems

isshin1 avatar Apr 23 '24 16:04 isshin1

its not completely gone, but extremely hard to reproduce now.

isshin1 avatar Apr 24 '24 12:04 isshin1

actually scratch that, running with applications plugin enabled

QT_LOGGING_RULES=albert*=true albert

and its completely reproducible on my end

17:54:57 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
17:54:57 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #0 GLOBAL ''
17:54:57 [debg:albert.query_runtimes] │     0 ms│ ------- │ ---- │ #0 TOTAL
17:54:58 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
17:54:58 [debg:albert.query_runtimes] │     0 ms│     0 ms│     2│ #1 'c' albert
17:54:58 [debg:albert.query_runtimes] │     0 ms│     0 ms│     3│ #1 'c' pluginregistry
17:54:58 [debg:albert.query_runtimes] │     0 ms│     0 ms│    68│ #1 'c' applications_xdg
17:54:58 [debg:albert.query_runtimes] │    10 ms│     0 ms│     1│ #1 'c' calculator_qalculate
17:54:58 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
17:54:58 [debg:albert.query_runtimes] │    11 ms│     0 ms│    74│ #1 GLOBAL 'c'
17:54:58 [debg:albert.query_runtimes] │    11 ms│ ------- │ ---- │ #1 TOTAL
17:54:58 [warn:albert] No icons found for QList(xdg:utilities-system-monitor, :unkown)
17:54:58 [warn:albert] No icons found for QList(xdg:utilities-system-monitor, :unkown)
17:54:58 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
17:54:58 [debg:albert.query_runtimes] │     0 ms│     0 ms│     1│ #2 'co' albert
17:54:58 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #2 'co' pluginregistry
17:54:58 [debg:albert.query_runtimes] │     0 ms│     0 ms│    33│ #2 'co' applications_xdg
17:54:58 [warn:albert] No icons found for QList(xdg:utilities-system-monitor, :unkown)
17:54:58 [debg:albert.qalculate] "co" is not a valid variable/function/unit.
17:54:58 [debg:albert.query_runtimes] │    10 ms│     0 ms│     0│ #2 'co' calculator_qalculate
17:54:58 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
17:54:58 [debg:albert.query_runtimes] │    10 ms│     0 ms│    34│ #2 GLOBAL 'co'
17:54:58 [debg:albert.query_runtimes] │    10 ms│ ------- │ ---- │ #2 TOTAL
17:54:58 [warn:albert] No icons found for QList(xdg:utilities-system-monitor, :unkown)
17:54:58 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
17:54:58 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #3 'cou' albert
17:54:58 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #3 'cou' pluginregistry
17:54:58 [debg:albert.query_runtimes] │     0 ms│     0 ms│     1│ #3 'cou' applications_xdg
17:54:58 [warn:albert] No icons found for QList(xdg:utilities-system-monitor, :unkown)
17:54:58 [debg:albert.qalculate] "cou" is not a valid variable/function/unit.
17:54:58 [debg:albert.query_runtimes] │    10 ms│     0 ms│     0│ #3 'cou' calculator_qalculate
17:54:58 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
17:54:58 [debg:albert.query_runtimes] │    10 ms│     0 ms│     1│ #3 GLOBAL 'cou'
17:54:58 [debg:albert.query_runtimes] │    10 ms│ ------- │ ---- │ #3 TOTAL
17:55:10 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
17:55:10 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
17:55:10 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
17:55:10 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
17:55:10 [debg:albert.query_runtimes] │ Handling│  Scoring│ Count│
17:55:10 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
17:55:10 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
17:55:10 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #5 GLOBAL 'coutn'
17:55:10 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
17:55:10 [debg:albert.query_runtimes] │     0 ms│ ------- │ ---- │ #5 TOTAL
17:55:10 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #7 GLOBAL 'coutnnn'
17:55:10 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
17:55:10 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #6 GLOBAL 'coutnn'
17:55:10 [debg:albert.query_runtimes] │     0 ms│ ------- │ ---- │ #6 TOTAL
17:55:10 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #4 GLOBAL 'cout'
17:55:10 [debg:albert.query_runtimes] │     0 ms│ ------- │ ---- │ #4 TOTAL
17:55:10 [debg:albert.query_runtimes] │     0 ms│ ------- │ ---- │ #7 TOTAL
17:55:10 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #8 'coutnnnn' albert
17:55:10 [debg:albert.query_runtimes] │     0 ms│     0 ms│     0│ #8 'coutnnnn' pluginregistry
17:55:10 [debg:albert] Clearing icon cache
17:55:10 [debg:albert.query_runtimes] │     5 ms│     0 ms│     0│ #8 'coutnnnn' applications_xdg
17:55:10 [debg:albert] Query deleted. [#0 '']
17:55:10 [debg:albert] Query deleted. [#1 'c']
17:55:10 [debg:albert] Query deleted. [#2 'co']
17:55:10 [debg:albert] Query deleted. [#3 'cou']
17:55:10 [debg:albert] Query deleted. [#4 'cout']
17:55:10 [debg:albert] Query deleted. [#5 'coutn']
17:55:10 [debg:albert] Query deleted. [#6 'coutnn']
17:55:10 [debg:albert] Query deleted. [#7 'coutnnn']
17:55:10 [warn:albert] Busy wait on query: #8
17:55:10 [debg:albert.query_runtimes] │    11 ms│     0 ms│     0│ #8 'coutnnnn' calculator_qalculate
17:55:10 [debg:albert.query_runtimes] │ Handling│  Sorting│ Count│
17:55:10 [debg:albert.query_runtimes] │    12 ms│     0 ms│     0│ #8 GLOBAL 'coutnnnn'
17:55:10 [debg:albert.query_runtimes] │    12 ms│ ------- │ ---- │ #8 TOTAL

gets stuck when i type counter as query 17:54:58 -> 17:55:10

thing to note here is that it only happens once after i start albert, not on successive retries

isshin1 avatar Apr 24 '24 12:04 isshin1

You could run it using the logging filter '*=true' to see what happens internally

ManuelSchneid3r avatar Apr 24 '24 14:04 ManuelSchneid3r

actually scratch that, running with applications plugin enabled

QT_LOGGING_RULES=albert*=true albert

That's what I did , no ?

isshin1 avatar Apr 24 '24 14:04 isshin1

QT_LOGGING_RULES='*=true' albert You should get an enormous load of qt logs. better quit the session fast.

ManuelSchneid3r avatar Apr 24 '24 14:04 ManuelSchneid3r

http://0x0.st/XHmR.txt

delay happens around line 4682

isshin1 avatar Apr 25 '24 15:04 isshin1

The last messages before the lag were about the svg renderer. Maybe this is the cause. Have you put custom icons in your icon set? Qt svg does not support all fancy extensions out there and I would not be surprised if the desktop entry and icon lookup specs limit the formats to a least common denominator.

ManuelSchneid3r avatar Apr 26 '24 07:04 ManuelSchneid3r

damn yes, i have done it for a few icons, adding them to default icon theme. now that i think, letme check

isshin1 avatar Apr 26 '24 07:04 isshin1

that was likely the issue, some icon for csgo was causing the issue, removed it, and the lag seems to be gone for now. will update incase something else happens. as of now, its not reproducible with regular usage.

thanks a lot

isshin1 avatar Apr 26 '24 18:04 isshin1

Fine. Reopen if it occurs again. hf using albert

ManuelSchneid3r avatar Apr 26 '24 19:04 ManuelSchneid3r

I know this issue is closed, but thought I would add my experience. Starting from a 'cleaned' Albert (commit: 3122af6 and no .cache or .local files), I noticed that when typing 't' to search for and open Tweaks, Albert pauses and appears to hang. After (what seems like a very long time), the UI resumes with the first 5 't' selections presented. After that 't' works reasonably well for 'some time', but after some period of not using Albert, 't' again hangs things up. If I start selecting 't' items such that they are in my MRU/MFU history, things stay speedy. I am wondering if I have a lot of 't' items that are in some state that Albert does not like. I have not yet stumbled on other starting letters that cause this behavior.

tomporter518 avatar Apr 29 '24 12:04 tomporter518

@tomporter518 the env vars above help you debugging. If the query takes long the query runtimes will show it as well as the item count. If that's not the problem you could send the full log like issin did. Have you put custom icons in your icon dirs?

ManuelSchneid3r avatar Apr 29 '24 17:04 ManuelSchneid3r

Thanks for the ask about custom icons. I had read through this thread and saw that but didn't immediately recall doing that. Most of the icons in .local are from Wine or Chrome, but I did have one symlinked SVG, which seems to now be present in the shared highcolor set, when it wasn't before. I have removed that and will continue to test. So far that seems to make a difference and queries return nearly immediately.

tomporter518 avatar Apr 29 '24 21:04 tomporter518