pauloo27/gotroller

gotroller-gui panic: interface conversion: interface {} is uint64, not int64)

Closed this issue · 7 comments

I'm totally new to this but it seems like it could fit the bill for what I'm looking for, so thank you!

Compiled without error, polybar module displays, playerctl functions work, but I can't seem to launch the GUI.

Trying to launch gotroller-gui from the command line gives: panic: interface conversion: interface {} is uint64, not int64)

Hopefully relevant information:

go version:
go1.20.5 linux/amd64

kernel:
6.4.1-arch2-1 #1 SMP PREEMPT_DYNAMIC Tue, 04 Jul 2023 08:39:40 +0000 x86_64 GNU/Linux

output here:

>>> gotroller-gui                                                                    ─╯

Starting GUI...

(gotroller-gui:374716): Gdk-WARNING **: 23:49:15.417: Cannot transform xsetting gtk-xft-dpi of type gchararray to type gint


(gotroller-gui:374716): Gdk-WARNING **: 23:49:15.471: Cannot transform xsetting gtk-xft-dpi of type gchararray to type gint


(gotroller-gui:374716): Gdk-WARNING **: 23:49:15.471: Cannot transform xsetting gtk-enable-input-feedback-sounds of type gchararray to type gboolean


(gotroller-gui:374716): Gdk-WARNING **: 23:49:15.472: Cannot transform xsetting gtk-enable-event-sounds of type gchararray to type gboolean


(gotroller-gui:374716): Gdk-WARNING **: 23:49:15.474: Cannot transform xsetting gtk-enable-input-feedback-sounds of type gchararray to type gboolean

panic: interface conversion: interface {} is uint64, not int64

goroutine 1 [running]:
github.com/Pauloo27/go-mpris.(*Player).GetLength(0x873588?)
	/home/shanec80/go/pkg/mod/github.com/!pauloo27/go-mpris@v1.4.1-0.20210321141042-f1f38fb92c04/mpris.go:272 +0xef
github.com/Pauloo27/gotroller/gui/window.createProgressBar.func2(0x0?)
	/backups/github/carakesa/gotroller/gui/window/progress_bar.go:33 +0x3f
github.com/Pauloo27/gotroller/gui/window.updateAll()
	/backups/github/carakesa/gotroller/gui/window/updater.go:15 +0x5d
github.com/Pauloo27/gotroller/gui/window.StartGUI.func2.1.1()
	/backups/github/carakesa/gotroller/gui/window/main.go:97 +0x17
reflect.Value.call({0x78dbc0?, 0x89ae50?, 0xc00018c010?}, {0x8697a6, 0x4}, {0xb350a0, 0x0, 0x3a0?})
	/usr/lib/go/src/reflect/value.go:586 +0xb0b
reflect.Value.Call({0x78dbc0?, 0x89ae50?, 0x114e970?}, {0xb350a0?, 0xc000111b80?, 0xc000111b50?})
	/usr/lib/go/src/reflect/value.go:370 +0xbc
github.com/gotk3/gotk3/glib.goMarshal(0xc000111ce8?, 0x7f2fe6efda10, 0x0, 0x0, 0x4c0551?, 0x485a9d?)
	/home/shanec80/go/pkg/mod/github.com/gotk3/gotk3@v0.5.3-0.20210223154815-289cfb6dbf32/glib/glib.go:272 +0x745
github.com/gotk3/gotk3/gtk._Cfunc_gtk_main()
	_cgo_gotypes.go:17223 +0x45
github.com/gotk3/gotk3/gtk.Main(...)
	/home/shanec80/go/pkg/mod/github.com/gotk3/gotk3@v0.5.3-0.20210223154815-289cfb6dbf32/gtk/gtk.go:1231
github.com/Pauloo27/gotroller/gui/window.StartGUI()
	/backups/github/carakesa/gotroller/gui/window/main.go:110 +0x275
main.main()
	/backups/github/carakesa/gotroller/gui/main.go:11 +0x57

Hello.

What player are you running? I've tried with Firefox and some others and it worked fine.

Btw, the GUI changed a lot and I forgot to update the README, let me know if you prefer the old one so I can tag it for you, here is the new one:

(dont worry, it will use your gtk theme's color, the title bar also follow your system's preference and may not appear)

image
image

(some buttons like the "loop" are not working yet...)

With spotify I could reproduce the crash.

Working on a fix...

Fix pushed to master, can you please test it?

Thanks for the issue.

I think 99% of the things will work on spotify as well.

If anything breaks, feel free to open a issue.