go-gtk icon indicating copy to clipboard operation
go-gtk copied to clipboard

Example demo don't work

Open wynalh opened this issue 9 years ago • 6 comments

demo error: fatal error: unexpected signal during runtime execution [signal 0xc0000005 code=0x0 addr=0x0 pc=0x55adf2]

runtime stack: invalid spdelta 0x55add0 0x55adf2 0x150f3b -1 runtime.gothrow(0x6e4ed0, 0x2a) c:/go/src/runtime/panic.go:503 +0x8e runtime.sigpanic() c:/go/src/runtime/os_windows.go:36 +0x65 invalid spdelta 0x55add0 0x55adf2 0x150f3b -1 _cgo_73cb713ea330_Cfunc__g_signal_connect() ?:0 +0x22

goroutine 1 [syscall, locked to thread]: runtime.cgocall_errno(0x55add0, 0xc082021a70, 0x0) c:/go/src/runtime/cgocall.go:130 +0xdb fp=0xc082021a50 sp=0xc082021a28 github.com/mattn/go-gtk/glib._Cfunc__g_signal_connect(0x0, 0x3d3bef0, 0x6, 0x0) E:/go/project/src/github.com/mattn/go-gtk/glib/:80 +0x4b fp=0xc082021a70 sp=0xc082021a50 github.com/mattn/go-gtk/glib.(_GObject).Connect(0xc08204a130, 0x683470, 0x7, 0x588320, 0xc082006400, 0x0, 0x0, 0x0, 0x0) E:/go/project/src/github.com/mattn/go-gtk/glib/glib.go:725 +0x2d7 fp=0xc082021b68 sp=0xc082021a70 github.com/mattn/go-gtk/gtk.(_Widget).Connect(0xc08204a128, 0x683470, 0x7, 0x588320, 0xc082006400, 0x0, 0x0, 0x0, 0x5) E:/go/project/src/github.com/mattn/go-gtk/gtk/gtk.go:9298 +0xc6 fp=0xc082021bc8 sp=0xc082021b68 main.main() E:/go/project/src/github.com/mattn/go-gtk/example/demo/demo.go:234 +0x1598 fp=0xc082021f98 sp=0xc082021bc8 runtime.main() c:/go/src/runtime/proc.go:63 +0xfa fp=0xc082021fe0 sp=0xc082021f98 runtime.goexit() c:/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc082021fe8 sp=0xc082021fe0

goroutine 17 [syscall, locked to thread]: runtime.goexit() c:/go/src/runtime/asm_amd64.s:2232 +0x1

my os is win7 64bit ,cpu:core i7

wynalh avatar Mar 10 '15 06:03 wynalh

Just run go run demo.go ?

mattn avatar Mar 10 '15 06:03 mattn

Mine doesn't work either. It tells me that gdk_pixbuf_get_pixels with length can't be found in the dynamic links library .

Razakhel avatar Mar 13 '15 14:03 Razakhel

@Eiwhaz What version of gtk do you use?

mattn avatar Mar 14 '15 14:03 mattn

I'm using the 2.22-64bits version, the all-in-one bundle. I tried the 3.X before I saw that you asked for the 2.X for Linux, thus I thought we were needing it as well for Windows (I maybe should have said first that I was trying to get it work on Windows indeed). The 3.X didn't work either, though I don't recall the error messages.

Razakhel avatar Mar 14 '15 14:03 Razakhel

2.22 doesn't have gdk_pixbuf_get_pixels

https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-The-GdkPixbuf-Structure.html#gdk-pixbuf-get-pixels-with-length

Since 2.26

mattn avatar Mar 14 '15 14:03 mattn

Same problem here. I first installed using "make example", then tried "go run demo.go", but I get a fatal error:

fatal error: unexpected signal during runtime execution
[signal 0xb code=0x80 addr=0x0 pc=0x7fb8ec16d950]

runtime stack:
runtime.throw(0x76cde0, 0x2a)
    /usr/lib/go-1.6/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
    /usr/lib/go-1.6/src/runtime/sigpanic_unix.go:12 +0x5a

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x5dc030, 0xc82004fb68, 0x100000000000000)
    /usr/lib/go-1.6/src/runtime/cgocall.go:123 +0x11b fp=0xc82004fb30 sp=0xc82004fb00
github.com/mattn/go-gtk/gtk._Cfunc_gtk_init(0xc82000a2c4, 0xc82000a2c8)
    ??:0 +0x36 fp=0xc82004fb68 sp=0xc82004fb30
github.com/mattn/go-gtk/gtk.Init(0xb17070)
    /home/foo/rdata/pdata/go-projects/src/github.com/mattn/go-gtk/gtk/gtk.go:230 +0x1ff fp=0xc82004fc40 sp=0xc82004fb68
main.main()
    /home/foo/rdata/pdata/go-projects/src/github.com/mattn/go-gtk/example/demo/demo.go:49 +0x32 fp=0xc82004ff50 sp=0xc82004fc40
runtime.main()
    /usr/lib/go-1.6/src/runtime/proc.go:188 +0x2b0 fp=0xc82004ffa0 sp=0xc82004ff50
runtime.goexit()
    /usr/lib/go-1.6/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc82004ffa8 sp=0xc82004ffa0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
    /usr/lib/go-1.6/src/runtime/asm_amd64.s:1998 +0x1
exit status 2

I have tried some of the other examples, but I get fatal errors on all of them.

Running Linux 4.6.0-0.bpo.1-amd64 #1 SMP Debian 4.6.4-1~bpo8+1 (2016-08-11) x86_64 GNU/Linux

unixdigest avatar Aug 25 '16 01:08 unixdigest