xlab / libvpx-go

Package vpx provides Go bindings for libvpx-1.6.0, the WebM Project VP8/VP9 codec implementation.
http://www.webmproject.org/code/
MIT License
190 stars 16 forks source link

Debian Sid fatal error unexpected signal during runtime execution #3

Closed omac777 closed 7 years ago

omac777 commented 7 years ago

For Debian Sid, I installed the following: apt-get install libglfw3-dev apt-get install libvpx-dev apt-get install libogg-dev apt-get install libvorbis-dev apt-get install libopus-dev apt-get install portaudio19-dev

Otherwise you will get the following error output: go get github.com/xlab/libvpx-go/cmd/webm-player

pkg-config --cflags vpx vpx vpx vpx vpx

Package vpx was not found in the pkg-config search path. Perhaps you should add the directory containing vpx.pc' to the PKG_CONFIG_PATH environment variable No package 'vpx' found Package vpx was not found in the pkg-config search path. Perhaps you should add the directory containingvpx.pc' to the PKG_CONFIG_PATH environment variable No package 'vpx' found Package vpx was not found in the pkg-config search path. Perhaps you should add the directory containing vpx.pc' to the PKG_CONFIG_PATH environment variable No package 'vpx' found Package vpx was not found in the pkg-config search path. Perhaps you should add the directory containingvpx.pc' to the PKG_CONFIG_PATH environment variable No package 'vpx' found Package vpx was not found in the pkg-config search path. Perhaps you should add the directory containing `vpx.pc' to the PKG_CONFIG_PATH environment variable No package 'vpx' found pkg-config: exit status 1

pkg-config --cflags opus opus opus opus

Package opus was not found in the pkg-config search path. Perhaps you should add the directory containingopus.pc' to the PKG_CONFIG_PATH environment variable No package 'opus' found Package opus was not found in the pkg-config search path. Perhaps you should add the directory containingopus.pc' to the PKG_CONFIG_PATH environment variable No package 'opus' found Package opus was not found in the pkg-config search path. Perhaps you should add the directory containingopus.pc' to the PKG_CONFIG_PATH environment variable No package 'opus' found Package opus was not found in the pkg-config search path. Perhaps you should add the directory containingopus.pc' to the PKG_CONFIG_PATH environment variable No package 'opus' found pkg-config: exit status 1

pkg-config --cflags portaudio-2.0 portaudio-2.0 portaudio-2.0 portaudio-2.0

Package portaudio-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containingportaudio-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'portaudio-2.0' found Package portaudio-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containingportaudio-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'portaudio-2.0' found Package portaudio-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containingportaudio-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'portaudio-2.0' found Package portaudio-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containingportaudio-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'portaudio-2.0' found pkg-config: exit status 1

pkg-config --cflags ogg vorbis ogg vorbis ogg vorbis ogg vorbis

Package ogg was not found in the pkg-config search path. Perhaps you should add the directory containingogg.pc' to the PKG_CONFIG_PATH environment variable No package 'ogg' found Package vorbis was not found in the pkg-config search path. Perhaps you should add the directory containingvorbis.pc' to the PKG_CONFIG_PATH environment variable No package 'vorbis' found Package ogg was not found in the pkg-config search path. Perhaps you should add the directory containingogg.pc' to the PKG_CONFIG_PATH environment variable No package 'ogg' found Package vorbis was not found in the pkg-config search path. Perhaps you should add the directory containingvorbis.pc' to the PKG_CONFIG_PATH environment variable No package 'vorbis' found Package ogg was not found in the pkg-config search path. Perhaps you should add the directory containingogg.pc' to the PKG_CONFIG_PATH environment variable No package 'ogg' found Package vorbis was not found in the pkg-config search path. Perhaps you should add the directory containingvorbis.pc' to the PKG_CONFIG_PATH environment variable No package 'vorbis' found Package ogg was not found in the pkg-config search path. Perhaps you should add the directory containingogg.pc' to the PKG_CONFIG_PATH environment variable No package 'ogg' found Package vorbis was not found in the pkg-config search path. Perhaps you should add the directory containingvorbis.pc' to the PKG_CONFIG_PATH environment variable No package 'vorbis' found pkg-config: exit status 1

github.com/golang-ui/nuklear/nk

In file included from Code/src/github.com/golang-ui/nuklear/nk/cgo_helpers.go:11:0: ./nuklear_glfw_gl3.h:16:24: fatal error: GLFW/glfw3.h: No such file or directory

include <GLFW/glfw3.h>

                    ^

compilation terminated.

Here is what it looks like when you "go get" it successfully: go get -u github.com/xlab/libvpx-go/cmd/webm-player

github.com/golang-ui/nuklear/nk

In file included from Code/src/github.com/golang-ui/nuklear/nk/impl_glfw.go:16:0: Code/src/github.com/golang-ui/nuklear/nk/nuklear_glfw_gl3.h: In function ‘nk_glfw3_render’: Code/src/github.com/golang-ui/nuklear/nk/nuklear_glfw_gl3.h:242:18: warning: assignment makes pointer from integer without a cast [-Wint-conversion] vertices = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); ^ Code/src/github.com/golang-ui/nuklear/nk/nuklear_glfw_gl3.h:243:18: warning: assignment makes pointer from integer without a cast [-Wint-conversion] elements = glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY); ^

BUT it gets a fatal error when I run it against a real webm video:

webm-player Commodore\ 64\ SFX\ Sound\ Expander\ -\ In\ Depth\ Look-w2DpLW374Sg.webm 2016/10/12 09:21:46 glfw: created window 800x500 2016/10/12 09:21:46 webm: found video track: 1280x720 dur: 9m54s V_VP9 fatal error: unexpected signal during runtime execution [signal SIGSEGV: segmentation violation code=0x1 addr=0x5c05f002 pc=0x5bad38]

runtime stack: runtime.throw(0x6a3088, 0x2a) /home/loongson/go1.7.1/src/runtime/panic.go:566 +0x95 runtime.sigpanic() /home/loongson/go1.7.1/src/runtime/sigpanic_unix.go:12 +0x2cc

goroutine 1 [syscall, locked to thread]: runtime.cgocall(0x5ddeb0, 0xc420051b00, 0xc400000000) /home/loongson/go1.7.1/src/runtime/cgocall.go:131 +0x110 fp=0xc420051ab0 sp=0xc420051a70 github.com/golang-ui/nuklear/nk._Cfunc_nk_glfw3_render(0x8000000000001, 0x437f000000020000) ??:0 +0x45 fp=0xc420051b00 sp=0xc420051ab0 github.com/golang-ui/nuklear/nk.NkGLFW3Render(0x8000000000001, 0x437f000000020000) /home/loongson/Code/src/github.com/golang-ui/nuklear/nk/nk.go:3483 +0x39 fp=0xc420051b20 sp=0xc420051b00 main.(_View).nkStep(0xc4200ae0a0) /home/loongson/Code/src/github.com/xlab/libvpx-go/cmd/webm-player/view.go:140 +0x1be fp=0xc420051bc0 sp=0xc420051b20 main.(_View).GUILoop(0xc4200ae0a0, 0xc420074780, 0xc4200747e0) /home/loongson/Code/src/github.com/xlab/libvpx-go/cmd/webm-player/view.go:94 +0x177 fp=0xc420051c80 sp=0xc420051bc0 main.main() /home/loongson/Code/src/github.com/xlab/libvpx-go/cmd/webm-player/main.go:134 +0x8e2 fp=0xc420051f48 sp=0xc420051c80 runtime.main() /home/loongson/go1.7.1/src/runtime/proc.go:183 +0x1f4 fp=0xc420051fa0 sp=0xc420051f48 runtime.goexit() /home/loongson/go1.7.1/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc420051fa8 sp=0xc420051fa0

goroutine 17 [syscall, locked to thread]: runtime.goexit() /home/loongson/go1.7.1/src/runtime/asm_amd64.s:2086 +0x1

goroutine 5 [syscall]: os/signal.signal_recv(0x0) /home/loongson/go1.7.1/src/runtime/sigqueue.go:116 +0x157 os/signal.loop() /home/loongson/go1.7.1/src/os/signal/signal_unix.go:22 +0x22 created by os/signal.init.1 /home/loongson/go1.7.1/src/os/signal/signal_unix.go:28 +0x41

goroutine 6 [select, locked to thread]: runtime.gopark(0x6b67d0, 0x0, 0x68fa9c, 0x6, 0x18, 0x2) /home/loongson/go1.7.1/src/runtime/proc.go:259 +0x13a runtime.selectgoImpl(0xc42002e730, 0x0, 0x18) /home/loongson/go1.7.1/src/runtime/select.go:423 +0x11d9 runtime.selectgo(0xc42002e730) /home/loongson/go1.7.1/src/runtime/select.go:238 +0x1c runtime.ensureSigM.func1() /home/loongson/go1.7.1/src/runtime/signal1_unix.go:304 +0x2f3 runtime.goexit() /home/loongson/go1.7.1/src/runtime/asm_amd64.s:2086 +0x1

goroutine 7 [select]: github.com/xlab/closer.(*closer).wait(0xc420018080) /home/loongson/Code/src/github.com/xlab/closer/closer.go:102 +0x2a2 created by github.com/xlab/closer.newCloser /home/loongson/Code/src/github.com/xlab/closer/closer.go:94 +0x262

goroutine 8 [chan send]: github.com/ebml-go/webm.(_Reader).sendBlock(0xc4200f5380, 0xc420242800, 0x74a, 0x74a, 0x0) /home/loongson/Code/src/github.com/ebml-go/webm/reader.go:133 +0x16d github.com/ebml-go/webm.(_Reader).sendCluster(0xc4200f5380, 0xc420104020, 0x0) /home/loongson/Code/src/github.com/ebml-go/webm/reader.go:175 +0x15f github.com/ebml-go/webm.(*Reader).parseClusters(0xc4200f5380, 0xc42000c540) /home/loongson/Code/src/github.com/ebml-go/webm/reader.go:193 +0x477 created by github.com/ebml-go/webm.newReader /home/loongson/Code/src/github.com/ebml-go/webm/reader.go:237 +0x19b

goroutine 9 [chan send]: main.NewStream.func1(0xc4200b0000, 0xc4200b0240, 0xc420074600, 0x0, 0xc4200745a0) /home/loongson/Code/src/github.com/xlab/libvpx-go/cmd/webm-player/stream.go:62 +0x224 created by main.NewStream /home/loongson/Code/src/github.com/xlab/libvpx-go/cmd/webm-player/stream.go:75 +0x607

goroutine 10 [syscall, locked to thread]: github.com/xlab/libvpx-go/vpx._Cfunc_vpx_codec_decode(0x1d4b6d0, 0xc4200ac000, 0xe34, 0x0, 0x0, 0x0) ??:0 +0x4d github.com/xlab/libvpx-go/vpx.CodecDecode(0x1d4b6d0, 0xc4200ac000, 0xe34, 0xe34, 0x0, 0x0, 0x0) /home/loongson/Code/src/github.com/xlab/libvpx-go/vpx/vpx.go:277 +0x102 main.(*VDecoder).Process(0xc4200f53a0, 0xc420074660) /home/loongson/Code/src/github.com/xlab/libvpx-go/cmd/webm-player/vdecoder.go:64 +0x1b8 created by main.main /home/loongson/Code/src/github.com/xlab/libvpx-go/cmd/webm-player/main.go:111 +0xa83

goroutine 11 [sleep]: time.Sleep(0x114aa42) /home/loongson/go1.7.1/src/runtime/time.go:59 +0xe1 main.initVideo(0xc4200ae0a0, 0xc4200a0210, 0xc4200a02c0, 0xc420074660) /home/loongson/Code/src/github.com/xlab/libvpx-go/cmd/webm-player/main.go:168 +0x214 created by main.main /home/loongson/Code/src/github.com/xlab/libvpx-go/cmd/webm-player/main.go:112 +0xae6

xlab commented 7 years ago

@omac777 Much thanks for the report and installation instruction. I'll add those into README.

As for crash, I think this is highly related to this bug: https://github.com/golang-ui/nuklear/issues/1 I haven't yet tested GLFW+Nuklear with Linux distros, seems that GLFW fails to initialise the context properly. I'll try to play around this and fix on this weekend. Stay tuned.

xlab commented 7 years ago

@omac777 Could you try this again please? I've updated the GUI library https://github.com/golang-ui/nuklear/issues/1#issuecomment-257089763

Works even for windows.

xlab commented 7 years ago

I guess it's resolved.