Closed EldoranDev closed 5 years ago
Hi thank you for submitting this bug. The example in the readme is a bit behind the _examples folder, I shall look at that, in the mean time you might be able to solve this bug by running one from the _examples folder
Running demo.go from _example results in the same error.
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x17 pc=0x411326]
looks like its related to some channel stuff:
goroutine 5 [syscall]:
os/signal.signal_recv(0x0)
/usr/local/go/src/runtime/sigqueue.go:139 +0x9c
os/signal.loop()
/usr/local/go/src/os/signal/signal_unix.go:23 +0x22
created by os/signal.init.0
/usr/local/go/src/os/signal/signal_unix.go:29 +0x41
goroutine 17 [select]:
github.com/awesome-gocui/termbox-go.Init.func1()
/go/src/github.com/awesome-gocui/termbox-go/api.go:95 +0x332
created by github.com/awesome-gocui/termbox-go.Init
/go/src/github.com/awesome-gocui/termbox-go/api.go:92 +0x739
@EldoranDev Sorry, I'm late. Can you let me know Go's version ?
I used the following image:
golang:latest / golang:1.12.8
So it should be go version 1.12.8
@EldoranDev Thank you :) How did you run _example/demo.go ? like this?
cd _example
GO111MODULE=on go run demo.go
FROM golang:latest as build
ADD . /go/src/cui-test
WORKDIR /go/src/cui-test
RUN go get -d ./...
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix "static" -o main .
FROM scratch as prod
COPY --from=build /go/src/cui-test/main /bin/main
CMD ["/bin/main"]
It did not reproduce on the Mac. I think it may be a problem with the OS. I'll continue to investigate.
procedure
$ cd _example
$ make Dockerfile
$ docker build -t gocui-sample .
$ docker run --rm -it gocui-sample
Dockerfile
FROM golang:1.12.8 as build
ADD ./hello.go /go/src/cui-test/
WORKDIR /go/src/cui-test
RUN go get -d ./...
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix "static" -o main .
FROM scratch as prod
COPY --from=build /go/src/cui-test/main /bin/main
CMD ["/bin/main"]
@EldoranDev does the same panic happen with other samples?
Okay, I do not know why. But I can not reproduce this as well.
So sorry for wasting your time, seems like a can't reproduce
issue to me.
No problem, thanks for the update!
Describe the bug When running the example in Docker it crashes with the error
To Reproduce Steps to reproduce the behavior:
Expected behavior Running example
Environment (please complete the following information):
Additional context File compiled with