Open ihuanglei opened 6 years ago
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86_64-apple-darwin17.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
go version go1.10 darwin/amd64
is only safe to invoke on the main thread.
Here we go. Don't call GUI from goroutine. Also see a discussion in #133.
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread.' libc++abi.dylib: terminating with uncaught exception of type NSException
goroutine 1 [syscall]: runtime.cgocall(0x424b100, 0xc420057f30, 0x0) ..../Softwares/go/src/runtime/cgocall.go:128 +0x64 fp=0xc420057f00 sp=0xc420057ec8 pc=0x4003f04 github.com/sciter-sdk/go-sciter/window._Cfunc_Run(0x0) _cgo_gotypes.go:55 +0x49 fp=0xc420057f30 sp=0xc420057f00 pc=0x4244a99 github.com/sciter-sdk/go-sciter/window.(*Window).Run(0xc420088b90) ..../Workspaces/go/src/github.com/sciter-sdk/go-sciter/window/window_darwin.go:64 +0x22 fp=0xc420057f48 sp=0xc420057f30 pc=0x4244ea2 main.main() ..../Workspaces/go/src/github.com/test/test/test.go:86 +0x114 fp=0xc420057f88 sp=0xc420057f48 pc=0x42452f4 runtime.main() ..../Softwares/go/src/runtime/proc.go:198 +0x212 fp=0xc420057fe0 sp=0xc420057f88 pc=0x402d1a2 runtime.goexit() ..../Softwares/go/src/runtime/asm_amd64.s:2361 +0x1 fp=0xc420057fe8 sp=0xc420057fe0 pc=0x4056c41
goroutine 19 [sleep]: time.Sleep(0xb2d05e00) ..../Softwares/go/src/runtime/time.go:102 +0x166 main.check() ..../Workspaces/go/src/github.com/test/test/test.go:213 +0xb1 created by main.main ..../Workspaces/go/src/github.com/test/test/test.go:75 +0x39
goroutine 20 [select, locked to thread]: net/http.(Transport).getConn(0x447fd00, 0xc42008b1a0, 0x0, 0xc42009a080, 0x5, 0xc42009c4e0, 0xf, 0x0, 0x0, 0x0) ..../Softwares/go/src/net/http/transport.go:962 +0x558 net/http.(Transport).RoundTrip(0x447fd00, 0xc420158200, 0x447fd00, 0x0, 0x0) ..../Softwares/go/src/net/http/transport.go:409 +0x632 net/http.send(0xc420158200, 0x4324200, 0x447fd00, 0x0, 0x0, 0x0, 0xc4200a6058, 0xf8, 0xc420160890, 0x1) ..../Softwares/go/src/net/http/client.go:252 +0x185 net/http.(Client).send(0x4484aa0, 0xc420158200, 0x0, 0x0, 0x0, 0xc4200a6058, 0x0, 0x1, 0x4013098) ..../Softwares/go/src/net/http/client.go:176 +0xfa net/http.(Client).Do(0x4484aa0, 0xc420158200, 0xc42009a080, 0x38, 0x0) ..../Softwares/go/src/net/http/client.go:615 +0x28d net/http.(Client).Get(0x4484aa0, 0xc42009a080, 0x38, 0x2, 0xc42009a080, 0x38) ..../Softwares/go/src/net/http/client.go:396 +0x9d net/http.Get(0xc42009a080, 0x38, 0x2e, 0xc42009c4c0, 0xa) ..../Softwares/go/src/net/http/client.go:370 +0x41 main.getQRImage(0x0, 0x0, 0x0, 0x0) ..../Workspaces/go/src/github.com/test/test/test.go:195 +0xd1 main.initFunc.func1(0x44a2540, 0x0, 0x0, 0x0) ..../Workspaces/go/src/github.com/test/test/test.go:106 +0x26 github.com/sciter-sdk/go-sciter.(eventMapper).toEventHandler.func7(0xc420102460, 0x7ffeefbff2e0, 0x0) ..../Workspaces/go/src/github.com/sciter-sdk/go-sciter/wrapper.go:123 +0xb8 github.com/sciter-sdk/go-sciter.goElementEventProc(0x0, 0x0, 0x400, 0x7ffeefbff2e0, 0x28) ..../Workspaces/go/src/github.com/sciter-sdk/go-sciter/sciter.go:1371 +0x4d2 github.com/sciter-sdk/go-sciter._cgoexpwrap_d220e8b8fe27_goElementEventProc(0x0, 0x0, 0x400, 0x7ffeefbff2e0, 0xa00) _cgo_gotypes.go:1903 +0x49 github.com/sciter-sdk/go-sciter._Cfunc_SciterCall(0x4615890, 0xc42009c4a0, 0x1, 0xc42009c490, 0xc42009c480, 0xc42009c400) _cgo_gotypes.go:323 +0x4a github.com/sciter-sdk/go-sciter.(Sciter).Call.func1(0x4615890, 0xc42009c4a0, 0x1, 0xc42009c490, 0xc42009c480, 0x8) ..../Workspaces/go/src/github.com/sciter-sdk/go-sciter/sciter.go:349 +0x80 github.com/sciter-sdk/go-sciter.(Sciter).Call(0xc420102360, 0x42ecfef, 0x8, 0xc420031790, 0x1, 0x1, 0x0, 0x0, 0x0) ..../Workspaces/go/src/github.com/sciter-sdk/go-sciter/sciter.go:349 +0x140 main.initCallback.func2(0xc420088b90) ..../Workspaces/go/src/github.com/test/test/test.go:128 +0x113 created by main.initCallback ..../Workspaces/go/src/github.com/test/test/test.go:125 +0x87
goroutine 21 [select]: net.(Resolver).LookupIPAddr(0x4483da0, 0x4326c40, 0xc42014e180, 0xc42009c4e0, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0) ..../Softwares/go/src/net/lookup.go:206 +0x4ca net.(Resolver).internetAddrList(0x4483da0, 0x4326c40, 0xc42014e180, 0x42e9d87, 0x3, 0xc42009c4e0, 0xf, 0x0, 0x0, 0x0, ...) ..../Softwares/go/src/net/ipsock.go:293 +0x5c4 net.(Resolver).resolveAddrList(0x4483da0, 0x4326c40, 0xc42014e180, 0x42ea0c5, 0x4, 0x42e9d87, 0x3, 0xc42009c4e0, 0xf, 0x0, ...) ..../Softwares/go/src/net/dial.go:193 +0x50c net.(Dialer).DialContext(0xc420116060, 0x4326c00, 0xc42009c040, 0x42e9d87, 0x3, 0xc42009c4e0, 0xf, 0x0, 0x0, 0x0, ...) ..../Softwares/go/src/net/dial.go:375 +0x22b net.(Dialer).DialContext-fm(0x4326c00, 0xc42009c040, 0x42e9d87, 0x3, 0xc42009c4e0, 0xf, 0x4005d76, 0x41af9d9, 0xc42009c040, 0x4294ca0) ..../Softwares/go/src/net/http/transport.go:46 +0x73 net/http.(Transport).dial(0x447fd00, 0x4326c00, 0xc42009c040, 0x42e9d87, 0x3, 0xc42009c4e0, 0xf, 0x0, 0x20, 0xc420102420, ...) ..../Softwares/go/src/net/http/transport.go:898 +0x20d net/http.(Transport).dialConn(0x447fd00, 0x4326c00, 0xc42009c040, 0x0, 0xc42009a080, 0x5, 0xc42009c4e0, 0xf, 0x0, 0x0, ...) ..../Softwares/go/src/net/http/transport.go:1143 +0x317 net/http.(Transport).getConn.func4(0x447fd00, 0x4326c00, 0xc42009c040, 0xc42008b1d0, 0xc42007e180) ..../Softwares/go/src/net/http/transport.go:957 +0x78 created by net/http.(*Transport).getConn ..../Softwares/go/src/net/http/transport.go:956 +0x363
goroutine 35 [select]: net.cgoLookupIP(0x4326c40, 0xc42014e180, 0xc42009c4e0, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) ..../Softwares/go/src/net/cgo_unix.go:212 +0x19f net.(Resolver).lookupIP(0x4483da0, 0x4326c40, 0xc42014e180, 0xc42009c4e0, 0xb, 0x4003f28, 0xc420154480, 0xc420140000, 0x100000004485700, 0xc420031678) ..../Softwares/go/src/net/lookup_unix.go:95 +0x12d net.(Resolver).(net.lookupIP)-fm(0x4326c40, 0xc42014e180, 0xc42009c4e0, 0xb, 0x402a449, 0x8, 0xc420140000, 0xc4200316b8, 0xc4200316a0) ..../Softwares/go/src/net/lookup.go:192 +0x56 net.glob..func10(0x4326c40, 0xc42014e180, 0xc420188040, 0xc42009c4e0, 0xb, 0x423ed30, 0x4615890, 0xc42009c4a0, 0x1, 0xc42009c490) ..../Softwares/go/src/net/hook.go:19 +0x52 net.(Resolver).LookupIPAddr.func1(0x0, 0x0, 0x0, 0x0) ..../Softwares/go/src/net/lookup.go:200 +0xd8 internal/singleflight.(Group).doCall(0x4483d90, 0xc42018c050, 0xc42009c4e0, 0xb, 0xc420182090) ..../Softwares/go/src/internal/singleflight/singleflight.go:95 +0x2e created by internal/singleflight.(*Group).DoChan ..../Softwares/go/src/internal/singleflight/singleflight.go:88 +0x2d0
goroutine 36 [syscall]: net._C2func_getaddrinfo(0xc420148070, 0x0, 0xc420182150, 0xc420142018, 0x0, 0x0, 0x0) _cgo_gotypes.go:92 +0x55 net.cgoLookupIPCNAME.func1(0xc420148070, 0x0, 0xc420182150, 0xc420142018, 0xc, 0xc, 0xc420140000) ..../Softwares/go/src/net/cgo_unix.go:149 +0x13b net.cgoLookupIPCNAME(0xc42009c4e0, 0xb, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0) ..../Softwares/go/src/net/cgo_unix.go:149 +0x174 net.cgoIPLookup(0xc42014e300, 0xc42009c4e0, 0xb) ..../Softwares/go/src/net/cgo_unix.go:201 +0x4d created by net.cgoLookupIP ..../Softwares/go/src/net/cgo_unix.go:211 +0xaf