go-app: Example crashing right away after go build or go run
I tried to just go build the example project then execute the binary, but it crashes right after it starts. The weird thing is if I use macpack
to build it then it doesn’t crash. I’m guessing the app wrapper provides data where the raw build does not.
Go ENV
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/euforic/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7.5/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7.5/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/3x/0rnfwj_x1jz2p0gzh_gg7_600000gn/T/go-build912724629=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
Crash Output
INFO 2017/01/30 14:00:47 driver.go:31: driver *mac.Driver is loaded
INFO 2017/01/30 14:00:47 component.go:62: main.Hello has been registered under the tag Hello
INFO 2017/01/30 14:00:47 component.go:62: main.AppMainMenu has been registered under the tag AppMainMenu
INFO 2017/01/30 14:00:47 component.go:62: main.WindowMenu has been registered under the tag WindowMenu
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x7fffb3c24b52]
runtime stack:
runtime.throw(0x41a1554, 0x2a)
/usr/local/Cellar/go/1.7.5/libexec/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
/usr/local/Cellar/go/1.7.5/libexec/src/runtime/sigpanic_unix.go:12 +0x2cc
goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x4141160, 0xc42004df20, 0x0)
/usr/local/Cellar/go/1.7.5/libexec/src/runtime/cgocall.go:131 +0x110 fp=0xc42004def0 sp=0xc42004deb0
github.com/murlokswarm/mac._Cfunc_Driver_Run()
??:0 +0x41 fp=0xc42004df20 sp=0xc42004def0
github.com/murlokswarm/mac.(*Driver).Run(0xc420010280)
/Users/euforic/go/src/github.com/murlokswarm/mac/driver.go:56 +0x14 fp=0xc42004df28 sp=0xc42004df20
github.com/murlokswarm/app.Run()
/Users/euforic/go/src/github.com/murlokswarm/app/app.go:43 +0x35 fp=0xc42004df40 sp=0xc42004df28
main.main()
/Users/euforic/go/src/github.com/blevein/play/examples/mac/hello/main.go:31 +0x30 fp=0xc42004df48 sp=0xc42004df40
runtime.main()
/usr/local/Cellar/go/1.7.5/libexec/src/runtime/proc.go:183 +0x1f4 fp=0xc42004dfa0 sp=0xc42004df48
runtime.goexit()
/usr/local/Cellar/go/1.7.5/libexec/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc42004dfa8 sp=0xc42004dfa0
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/Cellar/go/1.7.5/libexec/src/runtime/asm_amd64.s:2086 +0x1
goroutine 5 [chan receive]:
github.com/murlokswarm/app.startUIScheduler()
/Users/euforic/go/src/github.com/murlokswarm/app/ui.go:11 +0x51
created by github.com/murlokswarm/app.init.1
/Users/euforic/go/src/github.com/murlokswarm/app/ui.go:17 +0x35
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 77 (37 by maintainers)
@dmonay @mcastilho @euforic Hey guys, I got some problems with the last Xcode and go updates. Crash when the app start.
Was able to fix that by building with this command:
Could you try if it work?