go-gtk: Error while creating new ListStore
Gentoo, GTK+ 2.24.30, Go 1.7.0, latest go-gtk3 and go-sqlite3.
Encountering an error while initializing my application (https://github.com/pztrn/urtrator), on NewListStore() call:
Initializing requester goroutine pooler...
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xffffffff94108016 pc=0x7f4fa01cb1e8]
runtime stack:
runtime.throw(0x7bc8a1, 0x2a)
/usr/lib/go/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
/usr/lib/go/src/runtime/sigpanic_unix.go:12 +0x2cc
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x66ed10, 0xc420053a70, 0xc400000000)
/usr/lib/go/src/runtime/cgocall.go:131 +0x110 fp=0xc420053a28 sp=0xc4200539e8
github.com/mattn/go-gtk/gtk._Cfunc_gtk_list_store_newv(0x7f4f00000009, 0x7f4f941492b0, 0x0)
??:0 +0x4e fp=0xc420053a70 sp=0xc420053a28
github.com/mattn/go-gtk/gtk.NewListStore(0xc420053d38, 0x9, 0x9, 0x0)
/data/.go/src/github.com/mattn/go-gtk/gtk/gtk.go:5093 +0x124 fp=0xc420053ae8 sp=0xc420053a70
github.com/pztrn/urtrator/ui.(*MainWindow).initializeStorages(0xc420080480)
/data/.go/src/github.com/pztrn/urtrator/ui/mainwindow.go:599 +0x5c6 fp=0xc420053dd8 sp=0xc420053ae8
github.com/pztrn/urtrator/ui.(*MainWindow).Initialize(0xc420080480)
/data/.go/src/github.com/pztrn/urtrator/ui/mainwindow.go:324 +0x4d fp=0xc420053ee0 sp=0xc420053dd8
main.main()
/data/.go/src/github.com/pztrn/urtrator/urtrator.go:33 +0x150 fp=0xc420053f48 sp=0xc420053ee0
runtime.main()
/usr/lib/go/src/runtime/proc.go:183 +0x1f4 fp=0xc420053fa0 sp=0xc420053f48
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc420053fa8 sp=0xc420053fa0
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2086 +0x1
goroutine 5 [chan receive]:
database/sql.(*DB).connectionOpener(0xc4200b11e0)
/usr/lib/go/src/database/sql/sql.go:730 +0x4a
created by database/sql.Open
/usr/lib/go/src/database/sql/sql.go:493 +0x1e9
exit status 2
OS X 10.11.6, GTK+ 2.24.31, Go 1.7.1, same app crashing like that:
Loading favorite servers...
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x7fff9f0f0a7a]
runtime stack:
runtime.throw(0x43f18f8, 0x2a)
/usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
/usr/local/Cellar/go/1.7.1/libexec/src/runtime/sigpanic_unix.go:12 +0x2cc
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4233480, 0xc420049dd0, 0x0)
/usr/local/Cellar/go/1.7.1/libexec/src/runtime/cgocall.go:131 +0x110 fp=0xc420049da0 sp=0xc420049d60
github.com/mattn/go-gtk/gtk._Cfunc_gtk_main()
??:0 +0x41 fp=0xc420049dd0 sp=0xc420049da0
github.com/mattn/go-gtk/gtk.Main()
/Volumes/DATA/.go/src/github.com/mattn/go-gtk/gtk/gtk.go:248 +0x14 fp=0xc420049dd8 sp=0xc420049dd0
github.com/pztrn/urtrator/ui.(*MainWindow).Initialize(0xc4200a2120)
/Volumes/DATA/.go/src/github.com/pztrn/urtrator/ui/mainwindow.go:456 +0xcf4 fp=0xc420049ee0 sp=0xc420049dd8
main.main()
/Volumes/DATA/.go/src/github.com/pztrn/urtrator/urtrator.go:33 +0x150 fp=0xc420049f48 sp=0xc420049ee0
runtime.main()
/usr/local/Cellar/go/1.7.1/libexec/src/runtime/proc.go:183 +0x1f4 fp=0xc420049fa0 sp=0xc420049f48
runtime.goexit()
/usr/local/Cellar/go/1.7.1/libexec/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc420049fa8 sp=0xc420049fa0
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.7.1/libexec/src/runtime/asm_amd64.s:2086 +0x1
goroutine 35 [chan receive]:
database/sql.(*DB).connectionOpener(0xc4200d51e0)
/usr/local/Cellar/go/1.7.1/libexec/src/database/sql/sql.go:730 +0x4a
created by database/sql.Open
/usr/local/Cellar/go/1.7.1/libexec/src/database/sql/sql.go:493 +0x1e9
Is that related to GTK bindings, or SQLite3? If GTK - what’s the problem? Any ideas?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (16 by maintainers)
Yea, just like I do previously (now switched to internal caching with maps). Well, here is nothing to do with go-gtk, so I just close it. Thanks for your time!
Well, it was my code, after adding runtime.LockOSThread() in my database initialization sequence, everything is now normal, no more panics, and no go-gtk sources changes (as well as go-sqlite3). Yet saw nothing about LockOSThread in https://github.com/mattn/go-sqlite3 repo, so just asked is this related to sqlite3, or gtk requires that.