Coder Social home page Coder Social logo

Comments (50)

nwg-piotr avatar nwg-piotr commented on August 19, 2024 2

Thank you! When I'm home, I'll prepare another version on this branch, w/ some more debug messages.

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024 1

One way or another, we have just 2 culprit candidates: searchEntry or statusLabel.

from nwg-drawer.

varac avatar varac commented on August 19, 2024 1

Yes it does !

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024 1

Thank you, @OlivierNicole. If so, I'll merge the branch soon.

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024 1

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

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

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.

from nwg-drawer.

OlivierNicole avatar OlivierNicole commented on August 19, 2024

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.

from nwg-drawer.

OlivierNicole avatar OlivierNicole commented on August 19, 2024

I'll try to find some time to get a GDB backtrace.

from nwg-drawer.

OlivierNicole avatar OlivierNicole commented on August 19, 2024

On second thought, I'm not sure I know how to do that, given that when unresponsive, nwg-drawer blocks my entire desktop.

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

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:

  1. Open a terminal window on one of them;
  2. pkill -f nwg-drawer;
  3. nwg-drawer -d, then move the mouse pointer quickly to another output, for the drawer to open there;
  4. type your killer phrase;
  5. Check if you see something unusual in the terminal window?

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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.

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Hmmm... No idea why "game" could be not a valid UTF-8 string, but we have at least some little clue.

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

@OlivierNicole, @zoro11031: what's your $LANG?

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

echo $LANG
en_US.UTF-8

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

May I see the full locale output?

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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

And here's a video of it happening

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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=

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

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. :/

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

Unfortunately hiding the desktop file for game2text doesn't seem to have fixed the issue :/

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Could you check and show me the content of the .desktop file of the focused item? Probably this one:

image

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Also, to make sure that the error doesn't come from the file search, please check if it still occurs with the -nofs argument.

from nwg-drawer.

OlivierNicole avatar OlivierNicole commented on August 19, 2024

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=

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

@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.

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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. 

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

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.

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

No, they're mounted in /mnt. I'll try it anyway when I'm off work just to see

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

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/[email protected]/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.

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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 

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

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.

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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!

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Yeah, but it needs to be resolved. Let me know if some clue appears.

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Whatever that I can see on my development machine will be of help.

from nwg-drawer.

varac avatar varac commented on August 19, 2024

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 ?

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

@varac It shouldn't search it at all. May I see the content of your ~/.config/user-dirs.dirs file?

from nwg-drawer.

varac avatar varac commented on August 19, 2024

@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/"

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

[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?

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

I've also fixed the userDirsFile path to use the XDG_CONFIG_HOME variable.

from nwg-drawer.

varac avatar varac commented on August 19, 2024

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/[email protected]/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.

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

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.

from nwg-drawer.

varac avatar varac commented on August 19, 2024

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 !

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

Excellent, but does it prevent the drawer from hanging?

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

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.

from nwg-drawer.

OlivierNicole avatar OlivierNicole commented on August 19, 2024

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. 😃

from nwg-drawer.

zoro11031 avatar zoro11031 commented on August 19, 2024

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

from nwg-drawer.

nwg-piotr avatar nwg-piotr commented on August 19, 2024

@zoro11031 I'm merging one way or another. Let me know if it still misbehaves on your side.

from nwg-drawer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.