Drawer becomes unresponsive for some inputs
OlivierNicole opened this issue · 50 comments
I'm using nwg-drawer 0.2.8 on NxOS 22.05.
How to reproduce
- Use NixOS?
- Install Tor Browser.
- Launch nwg-drawer, start typing
tor-
In my setup, the program just freezes and freezes my entire Sway desktop. If I hit Escape, the nwg-drawer exits and my desktop is back to normal after some time (around 10 s).
I don't know why Tor Browser in particular triggers this behavior. I have also noticed that nwg-drawer is not very responsive in general. Response to keypresses takes always takes at least half a second.
nwg-drawer output:
time="2022-08-03T23:50:40+02:00" level=info msg="term: foot"
time="2022-08-03T23:50:40+02:00" level=info msg="lang: fr_FR"
time="2022-08-03T23:50:40+02:00" level=info msg="Config dir: /home/olivier/.config/nwg-drawer"
time="2022-08-03T23:50:40+02:00" level=info msg="Copying file: /home/olivier/.config/nwg-drawer/drawer.css"
time="2022-08-03T23:50:40+02:00" level=info msg="Found 0 pinned items"
time="2022-08-03T23:50:40+02:00" level=info msg="Found 136 desktop files"
time="2022-08-03T23:50:40+02:00" level=info msg="Skipped 3 duplicates; 46 .desktop entries hidden by \"NoDisplay=true\""
time="2022-08-03T23:50:40+02:00" level=info msg="/home/olivier/.config/nwg-drawer/preferred-apps.json file not found"
time="2022-08-03T23:50:40+02:00" level=info msg="/home/olivier/.config/nwg-drawer/excluded-dirs file not found"
(nwg-drawer:2624720): dbind-WARNING **: 23:50:40.107: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
time="2022-08-03T23:50:40+02:00" level=error msg="ERROR: /home/olivier/.config/nwg-drawer/drawer.css css file not found or erroneous. Using GTK styling."
time="2022-08-03T23:50:40+02:00" level=error msg="<broken file>:1:0Failed to import: Erreur lors de l’ouverture du fichier /home/olivier/.config/nwg-drawer/drawer.css\u00a0: No such file or directory"
time="2022-08-03T23:50:40+02:00" level=warning msg="Undefined icon for "
(nwg-drawer:2624720): Gtk-WARNING **: 23:50:40.370: Found an icon but could not load it. Most likely gdk-pixbuf does not provide SVG support.
time="2022-08-03T23:50:40+02:00" level=info msg="Using XDG user dirs from /home/olivier/.config/user-dirs.dirs"
** (nwg-drawer:2624720): WARNING **: 23:50:40.431: gtk-layer-shell v0.6.0 may not work on GTK v3.24.34. If you experience crashes, check https://github.com/wmww/gtk-layer-shell/blob/master/compatibility.md
time="2022-08-03T23:50:40+02:00" level=info msg="UI created in 390 ms. Thank you for your patience."
time="2022-08-03T23:50:44+02:00" level=warning msg="Undefined icon for "
time="2022-08-03T23:50:46+02:00" level=warning msg="Undefined icon for "
time="2022-08-03T23:50:46+02:00" level=warning msg="Undefined icon for "
time="2022-08-03T23:51:08+02:00" level=warning msg="Undefined icon for "
I know nothing about NixOS, as well as tor. What wonders me are these lines:
AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
In my setup, the program just freezes and freezes my entire Sway desktop. If I hit Escape, the nwg-drawer exits and my desktop is back to normal after some time (around 10 s).
Anything wrong w/ your system configuration? Do you have these lines in your sway config file?
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
"ERROR: /home/olivier/.config/nwg-drawer/drawer.css css file not found or erroneous. Using GTK styling."
This file should be re-created if missing. You must have an error inside it.
Anything wrong w/ your system configuration? Do you have these lines in your sway config file?
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK exec hash dbus-update-activation-environment 2>/dev/null && \ dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
I do. But it looks like enabling the service gnome.at-spi2-core
made this line disappear for me.
"ERROR: /home/olivier/.config/nwg-drawer/drawer.css css file not found or erroneous. Using GTK styling."
This file should be re-created if missing. You must have an error inside it.
I created this file manually which makes this error also go away. By the way, the installation command make install
puts this file in /usr/share/nwg-drawer
and not in $XDG_CONFIG_HOME/nwg-drawer
like the code seems to expect it.
With these two errors disappeared, I still get the same behavior as before when typing tor
.
I'll try to find some time to get a GDB backtrace.
On second thought, I'm not sure I know how to do that, given that when unresponsive, nwg-drawer blocks my entire desktop.
I'm having this issue as well, except with the string "game". Nwg-drawer becomes unresponsive and starts blocking the desktop. The desktop responds to inputs underneath but I have found no other way to fix the issue other than dropping to TTY and killing sway. I'm on Arch using the latest zen kernel
I've not yet found my string to hang the drawer.
This will probably tell us nothing, but, in case you have 2 outputs, could you:
- Open a terminal window on one of them;
pkill -f nwg-drawer
;nwg-drawer -d
, then move the mouse pointer quickly to another output, for the drawer to open there;- type your killer phrase;
- Check if you see something unusual in the terminal window?
I don't have two monitors unfortunately, but I think I can type in the terminal while the drawer is hanging. Let me try it
So nothing printed on the terminal underneath the transparent drawer while the error was happening, however after spamming mouse clicks, the escape key, and the backspace for about 2 minutes the drawer died and some errors printed in the terminal:
(nwg-drawer:96360): Pango-WARNING **: 02:07:14.751: Invalid UTF-8 string passed to pango_layout_set_text()
(nwg-drawer:96360): Pango-WARNING **: 02:07:14.774: Invalid UTF-8 string passed to pango_layout_set_text()
(nwg-drawer:96360): Pango-WARNING **: 02:07:14.774: Invalid UTF-8 string passed to pango_layout_set_text()
(nwg-drawer:96360): Pango-WARNING **: 02:07:14.774: Invalid UTF-8 string passed to pango_layout_set_text()
^[^[Gdk-Message: 02:07:15.567: Lost connection to Wayland compositor.
Hmmm... No idea why "game" could be not a valid UTF-8 string, but we have at least some little clue.
@OlivierNicole, @zoro11031: what's your $LANG
?
echo $LANG
en_US.UTF-8
May I see the full locale
output?
I do have one custom .desktop file that I made that appears when I search "game", but it launches fine and doesn't cause issues when I scroll to it without searching so I'm not sure if it's the issue. It's the only unusual condition that's triggering though I think.
This is the contents of it:
#!/usr/bin/env xdg-open
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=bash game2text.sh
GenericName[en_US]=
GenericName=
Icon=/usr/share/icons/game2text.ico
MimeType=
Name[en_US]=game2text
Name=game2text
Path=/home/petergriffin/.local/share/game2text
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
May I see the full
locale
output?
locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
I do have one custom .desktop file
You could change its extension temporarily, to make sure.
locale
Nothing unusual.
It's damned difficult to find a solution to an error that you cannot reproduce. :/
One way or another, we have just 2 culprit candidates: searchEntry or statusLabel.
Unfortunately hiding the desktop file for game2text doesn't seem to have fixed the issue :/
Also, to make sure that the error doesn't come from the file search, please check if it still occurs with the -nofs
argument.
May I see the full
locale
output?
❯ locale
LANG=fr_FR.UTF-8
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
@OlivierNicole, OK, thanks. It seems the reason is different. Could you please check which app icon is focused when the drawer gets stuck, and then show me its .desktop file content? Also check if the drawer hangs if started with the -nofs
flag, please.
I think it's the file search. I just tried with and without file search, it freezes with, and doesn't without. I do have a second drive connected with a games folder, and a network drive connected that also has a games folder. Could it be possible that trying to parse through those drives is causing the hang?
As a side note, I haven't been able to reproduce the UTF issue in the console logs since the first time I ran it using nwg-drawer -d. This was the output of the last crash:
petergriffin ) nwg-drawer -d
INFO[0000] term: xterm-kitty
INFO[0000] lang: en_US
INFO[0000] Config dir: /home/petergriffin/.config/nwg-drawer
INFO[0000] Found 5 pinned items
INFO[0000] Found 127 desktop files
INFO[0000] Skipped 20 duplicates; 38 .desktop entries hidden by "NoDisplay=true"
INFO[0000] Custom associations file /home/petergriffin/.config/nwg-drawer/preferred-apps.json not found or invalid
INFO[0000] Found 5 search exclusions in /home/petergriffin/.config/nwg-drawer/excluded-dirs
INFO[0000] Preferring dark theme variants
INFO[0000] Using style from /home/petergriffin/.config/nwg-drawer/drawer.css
INFO[0000] Using XDG user dirs from /home/petergriffin/.config/user-dirs.dirs
INFO[0000] UI created in 206 ms. Thank you for your patience.
I do have a second drive connected with a games folder, and a network drive connected that also has a games folder. Could it be possible that trying to parse through those drives is causing the hang?
Only if they're mounted inside your home directory. I see you use excluded-dirs
. Try excluding them, and we will see.
No, they're mounted in /mnt. I'll try it anyway when I'm off work just to see
I think it's the file search.
Assuming you're right, I'd like to see the path that causes the failure. I added a line to print them while creating file search results. You'd need to install the go
package, if not yet installed, clone the debu68
branch, cd
into it, kill the running nwg-drawer instance, and then run go run . -d
. You'll see paths prefixed with "Path: ". Type "game" and see what the last line looks like.
Example (the phrase if "bro", as "game" returns just 1 result on my machine):
$ go run . -d
# github.com/gotk3/gotk3/glib
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_source’:
cgo-gcc-prolog:71:2: warning: ‘g_binding_get_source’ is deprecated: Use 'g_binding_dup_source' instead [-Wdeprecated-declarations]
In file included from /usr/include/glib-2.0/glib-object.h:24,
from /usr/include/glib-2.0/gio/gioenums.h:30,
from /usr/include/glib-2.0/gio/giotypes.h:30,
from /usr/include/glib-2.0/gio/gio.h:28,
from ../../go/pkg/mod/github.com/gotk3/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:115:23: note: declared here
115 | GObject * g_binding_get_source (GBinding *binding);
| ^~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_target’:
cgo-gcc-prolog:107:2: warning: ‘g_binding_get_target’ is deprecated: Use 'g_binding_dup_target' instead [-Wdeprecated-declarations]
/usr/include/glib-2.0/gobject/gbinding.h:119:23: note: declared here
119 | GObject * g_binding_get_target (GBinding *binding);
| ^~~~~~~~~~~~~~~~~~~~
INFO[0000] term: foot
INFO[0000] lang: pl_PL
INFO[0000] Config dir: /home/piotr/.config/nwg-drawer
INFO[0000] Found 6 pinned items
INFO[0000] Found 212 desktop files
INFO[0000] Skipped 23 duplicates; 58 .desktop entries hidden by "NoDisplay=true"
INFO[0000] Found 6 associations in /home/piotr/.config/nwg-drawer/preferred-apps.json
INFO[0000] /home/piotr/.config/nwg-drawer/excluded-dirs file not found
(nwg-drawer:125109): Gtk-WARNING **: 01:34:07.946: Theme parsing error: gtk.css:1:7: Invalid name of pseudo-class
INFO[0000] Preferring dark theme variants
INFO[0000] Using style from /home/piotr/.config/nwg-drawer/drawer.css
WARN[0000] Undefined icon for River
INFO[0000] Using XDG user dirs from /home/piotr/.config/user-dirs.dirs
INFO[0000] UI created in 268 ms. Thank you for your patience.
DEBU[0001] Path: #is_dir#/home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/01_So Far Away.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/02_Money For Nothing.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/03_Walk Of Life.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/04_Your Latest Trick.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/05_Why Worry.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/06_Ride Across The River.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/07_The Man's Too Strong.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/08_One World.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/09_Brothers In Arms.mp3
DEBU[0001] Path: /home/piotr/Muzyka/Dire Straits/1985_Brothers In Arms/BrothersInArms.m3u
DEBU[0001] Path: /home/piotr/Muzyka/Stachura Marek Galazka/03. Nie brooklinski most.mp3
To kill the hung drawer, you could use a key binding to pkill -f nwg-drawer
.
I think I figured out the culprit, it was game2text but not the desktop entry itself but the Python virtual environment in the application directory. It was being backed up to another folder outside of it's usually home and the drawer was catching it.
Here's a small sample (the logs go on for hundreds of lines)
DEBU[0049] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/osdetect.h
DEBU[0049] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/pageiterator.h
DEBU[0049] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/platform.h
DEBU[0049] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/publictypes.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/renderer.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/resultiterator.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/serialis.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/strngs.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/tess_version.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/tesscallback.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/thresholder.h
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/include/tesseract/unichar.h
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/libtesseract.4.dylib
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/libtesseract.a
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/libtesseract.dylib
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/pkgconfig
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/lib/pkgconfig/tesseract.pc
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/legacy
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/legacy/tessdata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/legacy/tessdata/eng.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/legacy/tessdata/jpn.traineddata
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/alto
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/ambigs.train
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/api_config
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/bigram
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/box.train
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/box.train.stderr
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/digits
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/get.images
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/hocr
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/inter
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/kannada
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/linebox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/logfile
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/lstm.train
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/lstmbox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/lstmdebug
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/makebox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/pdf
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/quiet
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/rebox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/strokewidth
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/tsv
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/txt
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/unlv
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/configs/wordstrbox
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/eng.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/eng.user-patterns
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/eng.user-words
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/jpn.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/jpn_vert.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/osd.traineddata
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/pdf.ttf
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/snum.traineddata
DEBU[0050] Path: #is_dir#/home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/batch
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/batch.nochop
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/matdemo
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/msdemo
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/nobatch
DEBU[0050] Path: /home/petergriffin/Documents/dotfiles/home/petergriffin/local/share/game2text/resources/bin/mac/tesseract/4.1.1/share/tessdata/tessconfigs/segdemo
Is it possible to code an upper limit to the amount of paths nwg-drawer will return before stopping the directory search? 50 seems like a good number, I feel like if you're looking for results beyond that you would be using grep or your file manager's search function haha
Hmm here's something though: I tried excluding the directory in question to see if it still caused issues... and the string is still causing the application to hang
Yes, the directory walk is effective enough to support hundreds of results.
Sorry, for now I have no idea how to fix the issue. I need to reproduce it on my machine first.
No worries, I'm using the -nofs argument right now as a workaround and it works as a temp fix for the issue. I'm okay with using my file browsers search function for everything for now. Thanks for taking a look anyway!
Yeah, but it needs to be resolved. Let me know if some clue appears.
Actually, the other day I ran it without fsmode and it locked up on a string that wasn't "gam". If I remember right it locked when I was trying to type emacs. So it seems the issue is either progressive somehow or there's something in common between both those queries on my system that's locking it. I'll mess around with it later and let you know
Whatever that I can see on my development machine will be of help.
I have the same, my magic word is fir
(when trying to start firefox).
I compiled nwd-drawer from the debu68
branch and these are the last log line before it hangs after entering fir
:
...
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D96355B993181D9E8F8C026A972A3B91773E832D
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D9652939ED84C93EB9D7328AC447C55D6BCBEA26
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D9655821BF2248235ACFCD6C4EE38AAD7CD727D1
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D973D2A51D7D9C2E4B74A39897A02A50D998C455
DEBU[0015] Path: /home/varac/.cache/mozilla/firefox/9gu3sl85.default-release/cache2/entries/D98090F6782674B0FA69780C73BF1E3B34F1194B
signal: killed
varac@sancho:~/projects/wayland/sway/nwg-drawer$ find /home/varac/.cache/mozilla/firefox/ |wc -l
7992
So maybe it chokes on my 7992 firefox cache files ? Why does it scan that directory in the first place ?
@varac It shouldn't search it at all. May I see the content of your ~/.config/user-dirs.dirs
file?
@varac It shouldn't search it at all. May I see the content of your
~/.config/user-dirs.dirs
file?
Sure:
varac@sancho:~/.config$ cat user-dirs.dirs
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run.
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/"
Thank you! When I'm home, I'll prepare another version on this branch, w/ some more debug messages.
[debu68 branch] I've added a line to see which paths are actually going to be searched. Should appear prefixed by DEBU[0000] User dirs map:
. Show me the output of just go run . -d
, w/o searching, please.
@varac Which distro do you use?
I've also fixed the userDirsFile path to use the XDG_CONFIG_HOME
variable.
Hugh, this might be related: ... home:/home/varac ... videos:/home/varac/
- does this mean it searches my whole homedir on each search ?
❯ go run . -d
# github.com/gotk3/gotk3/glib
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_source’:
cgo-gcc-prolog:71:2: warning: ‘g_binding_get_source’ is deprecated: Use 'g_binding_dup_source' instead [-Wdeprecated-declarations]
In file included from /usr/include/glib-2.0/glib-object.h:24,
from /usr/include/glib-2.0/gio/gioenums.h:30,
from /usr/include/glib-2.0/gio/giotypes.h:30,
from /usr/include/glib-2.0/gio/gio.h:28,
from /home/varac/go/pkg/mod/github.com/gotk3/gotk3@v0.6.1/glib/gbinding.go:3:
/usr/include/glib-2.0/gobject/gbinding.h:115:23: note: declared here
115 | GObject * g_binding_get_source (GBinding *binding);
| ^~~~~~~~~~~~~~~~~~~~
cgo-gcc-prolog: In function ‘_cgo_200740c87a77_Cfunc_g_binding_get_target’:
cgo-gcc-prolog:107:2: warning: ‘g_binding_get_target’ is deprecated: Use 'g_binding_dup_target' instead [-Wdeprecated-declarations]
/usr/include/glib-2.0/gobject/gbinding.h:119:23: note: declared here
119 | GObject * g_binding_get_target (GBinding *binding);
| ^~~~~~~~~~~~~~~~~~~~
INFO[0000] term: xterm-kitty
INFO[0000] lang: en_US
INFO[0000] Config dir: /home/varac/.config/nwg-drawer
INFO[0000] Found 0 pinned items
INFO[0000] Found 64 desktop files
INFO[0000] Skipped 8 duplicates; 7 .desktop entries hidden by "NoDisplay=true"
INFO[0000] /home/varac/.config/nwg-drawer/preferred-apps.json file not found
INFO[0000] Found 1 search exclusions in /home/varac/.config/nwg-drawer/excluded-dirs
INFO[0000] Preferring dark theme variants
INFO[0000] Using style from /home/varac/.config/nwg-drawer/drawer.css
DEBU[0000] userDirsFile found: /home/varac/.config/user-dirs.dirs
INFO[0000] Using XDG user dirs from /home/varac/.config/user-dirs.dirs
DEBU[0000] User dirs map: map[documents:/home/varac/Documents downloads:/home/varac/Downloads home:/home/varac music:/home/varac/Music pictures:/home/varac/Pictures videos:/home/varac/]
INFO[0000] UI created in 110 ms. Thank you for your patience.
I'm using Arch Linux installed 3 days ago.
does this mean it searches my whole homedir on each search ?
It looks like this. And the XDG_VIDEOS_DIR="$HOME/"
line is the culprit. The "home" key itself is being skipped.
Right - I had a symlink for Videos
in my homedir. I removed it and re-ran xdg-user-dirs-update
, but the content was the same as in #68 (comment).
I realized that I need to run xdg-user-dirs-update --force
in order to adjust a the file with sane directories:
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
With these dirs nwg-drawer works fast and like a charm. Thanks for this project !
Excellent, but does it prevent the drawer from hanging?
Yes it does !
Great!
Hope @OlivierNicole and @zoro11031 have the same issue, but it needs to be confirmed. Guys, this branch now also includes a fix to the userDirsFile path, that may be important on NixOS. Please give it a try.
Sorry for not being more responsive on this issue, I have not found the time recently.
I confirm that the issue no longer appears at 85cc2d7. 😃
Thank you, @OlivierNicole. If so, I'll merge the branch soon.
Sorry man, I've been busy with finals over here as well and haven't had a chance to look. I can give the new branch a try tonight if you still need testing for it
@zoro11031 I'm merging one way or another. Let me know if it still misbehaves on your side.
Just tried it out, just wanted to confirm that it fixed the behavior for me as well. Thanks as always for being so responsive and quick to update