nwg-piotr / nwg-drawer

Application drawer for wlroots-based Wayland compositors
MIT License
240 stars 25 forks source link

Runtime error: slice bounds out of range #62

Closed Sunderland93 closed 2 years ago

Sunderland93 commented 2 years ago

Hello. I build nwg-drawer for Ubuntu 22.04 in my PPA https://launchpad.net/~ubuntusway-dev/+archive/ubuntu/dev But program does not run and failed with error:

INFO[0000] term: foot                                   
INFO[0000] lang: ru_RU                                  
INFO[0000] Config dir: /home/sunderland93/.config/nwg-drawer 
INFO[0000] Found 0 pinned items                         
INFO[0000] Found 69 desktop files                       
INFO[0000] Skipped 0 duplicates; 26 .desktop entries hidden by "NoDisplay=true" 
INFO[0000] Found 6 associations in /home/sunderland93/.config/nwg-drawer/preferred-apps.json 
INFO[0000] Found 0 search exclusions in /home/sunderland93/.config/nwg-drawer/excluded-dirs 
INFO[0000] Preferring dark theme variants               
INFO[0000] Using style from /home/sunderland93/.config/nwg-drawer/drawer.css 
panic: runtime error: slice bounds out of range [:117] with capacity 72

goroutine 1 [running]:
main.flowBoxButton({{0xc000023858, 0x1d}, {0xc0000174d5, 0x8}, {0xc0002c6411, 0x8}, {0xc0002de448, 0x2f}, {0xc0002a6c6c, 0x7b}, ...})
    github.com/nwg-piotr/nwg-drawer/uicomponents.go:263 +0x4f5
main.setUpAppsFlowBox({0x0, 0x0, 0xc0000103e0?}, {0x0, 0x0})
    github.com/nwg-piotr/nwg-drawer/uicomponents.go:203 +0x298
main.main()
    github.com/nwg-piotr/nwg-drawer/main.go:469 +0x1966
nwg-piotr commented 2 years ago

Could you build from the fix62 branch and check if this helps?

Sunderland93 commented 2 years ago

Works great! Thank you

nwg-piotr commented 2 years ago

Thanks for pointing it out. It would never show up in Polish nor English.