nwg-piotr / nwg-drawer

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

nwg-drawer upgrade from 0.2.8 to 0.3.0 broke #81

Closed RossComputerGuy closed 1 year ago

RossComputerGuy commented 1 year ago

Today I decided to update my NixOS machines so I can play Portal with RTX. However, once I rebooted into the updated system, I get this error with nwg-drawer.

INFO[0000] Preferring dark theme variants
INFO[0000] Using style from /home/ross/.config/nwg-drawer/drawer.css
panic: runtime error: slice bounds out of range [:117] with capacity 56

goroutine 1 [running]:
main.flowBoxButton({{0xc0001b480c, 0x28}, {0xc00018f265, 0x10}, {0xc00018f265, 0x10}, {0xc000220788, 0x51}, {0xc0001ca37c, 0x97}, ...})
    github.com/nwg-piotr/nwg-drawer/uicomponents.go:263 +0x4f5
main.setUpAppsFlowBox({0x0, 0x0, 0xc000300148?}, {0x0, 0x0})
    github.com/nwg-piotr/nwg-drawer/uicomponents.go:203 +0x298
main.main()
    github.com/nwg-piotr/nwg-drawer/main.go:469 +0x1966

The numbers mentioned in the panic aren't in my drawer.css file. I can also try using nwg-drawer with an empty css file and no arguments but I get the same error. I believe whatever change from 0.2.8 to 0.3.0 broke nwg-drawer. A fix would be appreciated as I don't have an easy way to open applications now.

nwg-piotr commented 1 year ago

This is actually a bug, reported as #62. It has been fixed in v0.3.1, and the current version is 0.3.6. Please contact your package maintainer.