App fails to launch
The app fails to launch. (NixOS package)
mpris-timer output in terminal:
2025/10/05 18:47:17 ERROR gdk_display_manager_get() was called before gtk_init() priority=3 code_file=../gdk/gdkdisplaymanager.c code_line=310 code_func=gdk_display_manager_get glib_domain=Gdk
SIGTRAP: trace trap
PC=0x7ff4ed90edbf m=0 sigcode=128
signal arrived during cgo execution
goroutine 1 gp=0xc000002380 m=0 mp=0x2b33b40 [syscall, locked to thread]:
runtime.cgocall(0x1158ab0, 0xc00004fd50)
runtime/cgocall.go:167 +0x4b fp=0xc00004fd28 sp=0xc00004fcf0 pc=0x58764b
github.com/efogdev/gotk4-adwaita/pkg/adw._Cfunc_adw_style_manager_get_default()
_cgo_gotypes.go:13377 +0x45 fp=0xc00004fd50 sp=0xc00004fd28 pc=0xeceac5
github.com/efogdev/gotk4-adwaita/pkg/adw.StyleManagerGetDefault()
github.com/efogdev/gotk4-adwaita/[email protected]/adw/adw-style-manager.go:399 +0x17 fp=0xc00004fd80 sp=0xc00004fd50 pc=0xf1cef7
mpris-timer/internal/core.LoadFlags()
mpris-timer/internal/core/cli.go:42 +0x48b fp=0xc00004fe08 sp=0xc00004fd80 pc=0x111d00b
main.main()
mpris-timer/cmd/main.go:26 +0x8a fp=0xc00004ff50 sp=0xc00004fe08 pc=0x113b52a
runtime.main()
runtime/proc.go:285 +0x29d fp=0xc00004ffe0 sp=0xc00004ff50 pc=0x5561dd
runtime.goexit({})
runtime/asm_amd64.s:1693 +0x1 fp=0xc00004ffe8 sp=0xc00004ffe0 pc=0x592c21
goroutine 17 gp=0xc0000028c0 m=1 mp=0xc0000b6008 [syscall, locked to thread]:
runtime.goexit({})
runtime/asm_amd64.s:1693 +0x1 fp=0xc0000c4fe8 sp=0xc0000c4fe0 pc=0x592c21
goroutine 2 gp=0xc000002e00 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:460 +0xce fp=0xc0000b0fa8 sp=0xc0000b0f88 pc=0x58aaae
runtime.goparkunlock(...)
runtime/proc.go:466
runtime.forcegchelper()
runtime/proc.go:373 +0xb3 fp=0xc0000b0fe0 sp=0xc0000b0fa8 pc=0x556513
runtime.goexit({})
runtime/asm_amd64.s:1693 +0x1 fp=0xc0000b0fe8 sp=0xc0000b0fe0 pc=0x592c21
created by runtime.init.7 in goroutine 1
runtime/proc.go:361 +0x1a
goroutine 3 gp=0xc000003340 m=nil [GC sweep wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:460 +0xce fp=0xc0000b1780 sp=0xc0000b1760 pc=0x58aaae
runtime.goparkunlock(...)
runtime/proc.go:466
runtime.bgsweep(0xc000048080)
runtime/mgcsweep.go:279 +0x94 fp=0xc0000b17c8 sp=0xc0000b1780 pc=0x53db34
runtime.gcenable.gowrap1()
runtime/mgc.go:212 +0x25 fp=0xc0000b17e0 sp=0xc0000b17c8 pc=0x531b85
runtime.goexit({})
runtime/asm_amd64.s:1693 +0x1 fp=0xc0000b17e8 sp=0xc0000b17e0 pc=0x592c21
created by runtime.gcenable in goroutine 1
runtime/mgc.go:212 +0x66
goroutine 4 gp=0xc000003500 m=nil [GC scavenge wait]:
runtime.gopark(0xc000048080?, 0x173d5d0?, 0x1?, 0x0?, 0xc000003500?)
runtime/proc.go:460 +0xce fp=0xc0000b1f78 sp=0xc0000b1f58 pc=0x58aaae
runtime.goparkunlock(...)
runtime/proc.go:466
runtime.(*scavengerState).park(0x2b326e0)
runtime/mgcscavenge.go:425 +0x49 fp=0xc0000b1fa8 sp=0xc0000b1f78 pc=0x53b609
runtime.bgscavenge(0xc000048080)
runtime/mgcscavenge.go:653 +0x3c fp=0xc0000b1fc8 sp=0xc0000b1fa8 pc=0x53bb9c
runtime.gcenable.gowrap2()
runtime/mgc.go:213 +0x25 fp=0xc0000b1fe0 sp=0xc0000b1fc8 pc=0x531b25
runtime.goexit({})
runtime/asm_amd64.s:1693 +0x1 fp=0xc0000b1fe8 sp=0xc0000b1fe0 pc=0x592c21
created by runtime.gcenable in goroutine 1
runtime/mgc.go:213 +0xa5
goroutine 18 gp=0xc000102700 m=nil [finalizer wait]:
runtime.gopark(0x565555?, 0x5294a5?, 0xb8?, 0x1?, 0xc000002380?)
runtime/proc.go:460 +0xce fp=0xc0000b0620 sp=0xc0000b0600 pc=0x58aaae
runtime.runFinalizers()
runtime/mfinal.go:210 +0x107 fp=0xc0000b07e0 sp=0xc0000b0620 pc=0x530a07
runtime.goexit({})
runtime/asm_amd64.s:1693 +0x1 fp=0xc0000b07e8 sp=0xc0000b07e0 pc=0x592c21
created by runtime.createfing in goroutine 1
runtime/mfinal.go:172 +0x3d
goroutine 19 gp=0xc0001028c0 m=nil [cleanup wait]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
runtime/proc.go:460 +0xce fp=0xc0000ac768 sp=0xc0000ac748 pc=0x58aaae
runtime.goparkunlock(...)
runtime/proc.go:466
runtime.(*cleanupQueue).dequeue(0x2b32b00)
runtime/mcleanup.go:439 +0xc5 fp=0xc0000ac7a0 sp=0xc0000ac768 pc=0x52dc25
runtime.runCleanups()
runtime/mcleanup.go:635 +0x45 fp=0xc0000ac7e0 sp=0xc0000ac7a0 pc=0x52e2e5
runtime.goexit({})
runtime/asm_amd64.s:1693 +0x1 fp=0xc0000ac7e8 sp=0xc0000ac7e0 pc=0x592c21
created by runtime.(*cleanupQueue).createGs in goroutine 1
runtime/mcleanup.go:589 +0xa5
goroutine 20 gp=0xc000102a80 m=nil [runnable, locked to thread]:
runtime.gcTrigger.test({0x0?, 0x0?, 0x0?})
runtime/mgc.go:616 +0xdc fp=0xc000286bc0 sp=0xc000286bb8 pc=0x531f3c
runtime.mallocgcSmallScanNoHeader(0x20, 0x13c6a60)
runtime/malloc.go:1436 +0x2cf fp=0xc000286c20 sp=0xc000286bc0 pc=0x528b2f
runtime.mallocgc(0x20, 0x13c6a60, 0x1)
runtime/malloc.go:1066 +0xa5 fp=0xc000286c50 sp=0xc000286c20 pc=0x588305
runtime.newobject(0x66e7d7?)
runtime/malloc.go:1747 +0x25 fp=0xc000286c78 sp=0xc000286c50 pc=0x5294a5
github.com/diamondburned/gotk4/pkg/core/slab.(*Slab).Get(0x2b32420, 0x0)
github.com/diamondburned/gotk4/[email protected]/core/slab/slab.go:79 +0x7b fp=0xc000286cd0 sp=0xc000286c78 pc=0x636d7b
github.com/diamondburned/gotk4/pkg/core/gbox.Get(...)
github.com/diamondburned/gotk4/[email protected]/core/gbox/box.go:101
github.com/diamondburned/gotk4/pkg/glib/v2._gotk4_glib2_LogWriterFunc(0x80, 0x7ff4a340be60, 0x6, 0x590c52?)
github.com/diamondburned/gotk4/[email protected]/glib/v2/glib_export.go:162 +0x33 fp=0xc000286d20 sp=0xc000286cd0 pc=0x7080f3
_cgoexp_558f07b708c9__gotk4_glib2_LogWriterFunc(0x7ff4a340bd80)
_cgo_gotypes.go:12607 +0x28 fp=0xc000286d50 sp=0xc000286d20 pc=0x70a168
runtime.cgocallbackg1(0x70a140, 0x7ff4a340bd80, 0x0)
runtime/cgocall.go:446 +0x289 fp=0xc000286e08 sp=0xc000286d50 pc=0x51ed09
runtime.cgocallbackg(0x70a140, 0x7ff4a340bd80, 0x0)
runtime/cgocall.go:350 +0x130 fp=0xc000286e70 sp=0xc000286e08 pc=0x51e990
runtime.cgocallbackg(0x70a140, 0x7ff4a340bd80, 0x0)
<autogenerated>:1 +0x29 fp=0xc000286e98 sp=0xc000286e70 pc=0x5953e9
runtime.cgocallback(0xc000286ef8, 0x587675, 0x1181400)
runtime/asm_amd64.s:1082 +0xcc fp=0xc000286ec0 sp=0xc000286e98 pc=0x5929ec
runtime.systemstack_switch()
runtime/asm_amd64.s:478 +0x8 fp=0xc000286ed0 sp=0xc000286ec0 pc=0x590c08
runtime.cgocall(0x1181400, 0xc000286f30)
runtime/cgocall.go:185 +0x75 fp=0xc000286f08 sp=0xc000286ed0 pc=0x587675
github.com/diamondburned/gotk4/pkg/gio/v2._Cfunc_g_application_register(0x10b336b0, 0x0, 0xc000280000)
_cgo_gotypes.go:14076 +0x46 fp=0xc000286f30 sp=0xc000286f08 pc=0x71b166
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Register.func1(...)
github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:42076
github.com/diamondburned/gotk4/pkg/gio/v2.(*Application).Register(0xc000202e10, {0x1747af0, 0xc000201540})
github.com/diamondburned/gotk4/[email protected]/gio/v2/gio.go:42076 +0x155 fp=0xc000286fb0 sp=0xc000286f30 pc=0x7a8a15
mpris-timer/internal/core.RegisterApp.func1()
mpris-timer/internal/core/glib.go:17 +0x2d fp=0xc000286fe0 sp=0xc000286fb0 pc=0x11206cd
runtime.goexit({})
runtime/asm_amd64.s:1693 +0x1 fp=0xc000286fe8 sp=0xc000286fe0 pc=0x592c21
created by mpris-timer/internal/core.RegisterApp in goroutine 1
mpris-timer/internal/core/glib.go:16 +0xc5
Hi, what's your system libadwaita version? 1.5 or higher is required. You can try using the flatpak version, it comes with the runtime so most likely will work fine.
I have version 1.7.6 of libadwaita installed.
After testing the flatpak I can confirm that it works; that being said, I personally don't really want to have flatpak installed for just one app. So. I hope that we can figure out what is wrong with the nix package.
Just pushed a potential fix, you can either build locally from the main branch, or use the binary from the github actions. Let me know how it goes
I tried for an hour to build it locally however it was getting stuck on compiling. I assume this was caused by something I was doing wrong but frankly I do not have the time right now to dedicate to troubleshooting why this issue was occurring. Hence, because you pushed the changes to main, I am just going to wait until that update is up-streamed to nixpkgs-unstable. I will report at that point.
...yeah that's not you getting stuck, that's C compiler being C compiler. You could've tried the binary from github actions. Anyways, will publish a new version soon. Thanks for reporting.
2.2.0 is now released, please ask the NixOS package maintainer to update
I created the request
Should be fixed now
I can confirm, the issue was resolved; I can now launch the app.
That being said, I did find a second problem with launching the app; I'm not sure if this should be a separate issue as it is unrelated to the first, but hey, it's kind of similar and it is fairly easy to fix so I am just going to report it here.
I could not launch the app through rofi. This was because the application path contained the line Exec=play-timer. On the nix package the command is mpris-timer so you can simply correct that to fix it.
I don't know if you have any affiliation with the nix package but I imagine that an actual fix for this second issue is probably something to be taken up with the nixpkg maintainers instead of the package itself. That being said, my solution works fine for me, so... I'm going to proceed to not think about it anymore.