sciter-sdk / go-sciter

Golang bindings of Sciter: the Embeddable HTML/CSS/script engine for modern UI development
https://sciter.com
2.57k stars 268 forks source link

Got an error after running simple.go #329

Open aaronchen2k opened 2 years ago

aaronchen2k commented 2 years ago

Got an error after running simple.go.

` GOROOT=/usr/local/go #gosetup GOPATH=/Users/aaron/go #gosetup /usr/local/go/bin/go build -o /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/GoLand/_1go_build_simplego /Users/aaron/rd/project/zentao/go-sciter/examples/simple/simple.go #gosetup github.com/sciter-sdk/go-sciter request.c:5:74: warning: non-void function does not return a value [-Wreturn-type] request.c:6:78: warning: non-void function does not return a value [-Wreturn-type] request.c:7:128: warning: non-void function does not return a value [-Wreturn-type] request.c:8:142: warning: non-void function does not return a value [-Wreturn-type] request.c:9:126: warning: non-void function does not return a value [-Wreturn-type] request.c:10:141: warning: non-void function does not return a value [-Wreturn-type] request.c:11:160: warning: non-void function does not return a value [-Wreturn-type] request.c:12:133: warning: non-void function does not return a value [-Wreturn-type] request.c:13:172: warning: non-void function does not return a value [-Wreturn-type] request.c:14:174: warning: non-void function does not return a value [-Wreturn-type] request.c:15:130: warning: non-void function does not return a value [-Wreturn-type] request.c:16:131: warning: non-void function does not return a value [-Wreturn-type] request.c:17:169: warning: non-void function does not return a value [-Wreturn-type] request.c:18:171: warning: non-void function does not return a value [-Wreturn-type] request.c:19:133: warning: non-void function does not return a value [-Wreturn-type] request.c:20:171: warning: non-void function does not return a value [-Wreturn-type] request.c:21:173: warning: non-void function does not return a value [-Wreturn-type] request.c:22:179: warning: non-void function does not return a value [-Wreturn-type] request.c:23:146: warning: non-void function does not return a value [-Wreturn-type] request.c:24:111: warning: non-void function does not return a value [-Wreturn-type] request.c:25:170: warning: non-void function does not return a value [-Wreturn-type] request.c:26:165: warning: non-void function does not return a value [-Wreturn-type] request.c:27:145: warning: non-void function does not return a value [-Wreturn-type] request.c:28:130: warning: non-void function does not return a value [-Wreturn-type] request.c:29:132: warning: non-void function does not return a value [-Wreturn-type] request.c:30:124: warning: non-void function does not return a value [-Wreturn-type] request.c:31:140: warning: non-void function does not return a value [-Wreturn-type] request.c:32:137: warning: non-void function does not return a value [-Wreturn-type] /private/var/folders/ry/yjxnkwt12kl6d1d13q5cz6wc0000gn/T/GoLand/1go_build_simple_go fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]

runtime stack: runtime.throw({0x40c84b5, 0x409f193}) /usr/local/go/src/runtime/panic.go:1198 +0x71 runtime.sigpanic() /usr/local/go/src/runtime/signal_unix.go:719 +0x396

goroutine 1 [syscall, locked to thread]: runtime.cgocall(0x409e390, 0xc000062e48) /usr/local/go/src/runtime/cgocall.go:156 +0x5c fp=0xc000062e20 sp=0xc000062de8 pc=0x4007b1c github.com/sciter-sdk/go-sciter._Cfunc_SciterCreateWindow(0x296, 0x4150960, 0x0, 0x0, 0x0) _cgo_gotypes.go:981 +0x4d fp=0xc000062e48 sp=0xc000062e20 pc=0x4096b6d github.com/sciter-sdk/go-sciter.CreateWindow.func1(0x40113a7, 0x10, 0x40bdb40, 0xc000054701) /Users/aaron/go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.1-0.20210404081253-a04e052a2813/sciter_darwin.go:26 +0x86 fp=0xc000062ea8 sp=0xc000062e48 pc=0x4099746 github.com/sciter-sdk/go-sciter.CreateWindow(0x403b9ce, 0xc0000001a0, 0x403f2e5, 0xc0000001a0, 0x300000002) /Users/aaron/go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.1-0.20210404081253-a04e052a2813/sciter_darwin.go:26 +0x2b fp=0xc000062ed8 sp=0xc000062ea8 pc=0x409964b github.com/sciter-sdk/go-sciter/window.New(0x296, 0x400a559) /Users/aaron/go/pkg/mod/github.com/sciter-sdk/go-sciter@v0.5.1-0.20210404081253-a04e052a2813/window/window_darwin.go:57 +0x51 fp=0xc000062f30 sp=0xc000062ed8 pc=0x409b731 main.main() /Users/aaron/rd/project/zentao/go-sciter/examples/simple/simple.go:12 +0x25 fp=0xc000062f80 sp=0xc000062f30 pc=0x409baa5 runtime.main() /usr/local/go/src/runtime/proc.go:255 +0x227 fp=0xc000062fe0 sp=0xc000062f80 pc=0x4037c27 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1581 +0x1 fp=0xc000062fe8 sp=0xc000062fe0 pc=0x40618e1

Process finished with the exit code 2 `

xxscloud5722 commented 2 years ago

It seems to only support 4.4.6.x, download here https://github.com/c-smile/sciter-js-sdk/commit/c27c5679d79ee94db8730ce06a7cda2bf5d3daba lib