Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't run nk-example #1

Closed
F0rth opened this issue Sep 27, 2016 · 11 comments
Closed

can't run nk-example #1

F0rth opened this issue Sep 27, 2016 · 11 comments
Labels

Comments

@F0rth
Copy link

F0rth commented Sep 27, 2016

Hi,

nk-example crash on my workstation, which infos can I provide to help debugging this issue ?

`[forth@mjolnir nk-example]$ go build -v
github.com/golang-ui/glfw
github.com/golang-ui/nuklear/nk

github.com/golang-ui/nuklear/nk

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

`[forth@mjolnir nk-example]$ ./nk-example
2016/09/27 11:47:04 glfw: created window 400x500
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x5d8cc002 pc=0x4f7098]

runtime stack:
runtime.throw(0x57e87b, 0x2a)
/usr/lib/go/src/runtime/panic.go:566 +0x95
runtime.sigpanic()
/usr/lib/go/src/runtime/sigpanic_unix.go:12 +0x2cc

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x51a210, 0xc42004dae8, 0xc400000000)
/usr/lib/go/src/runtime/cgocall.go:131 +0x110 fp=0xc42004da98 sp=0xc42004da58
github.com/golang-ui/nuklear/nk._Cfunc_nk_glfw3_render(0x8000000000001, 0x3f80000000020000)
??:0 +0x45 fp=0xc42004dae8 sp=0xc42004da98
github.com/golang-ui/nuklear/nk.NkGLFW3Render(0x8000000000001, 0x3f80000000020000)
/home/forth/go/src/github.com/golang-ui/nuklear/nk/nk.go:3482 +0x39 fp=0xc42004db08 sp=0xc42004dae8
main.gfxMain(0x22a8090, 0x834bb0, 0xc42000c3c0)
/home/forth/go/src/github.com/golang-ui/nuklear/cmd/nk-example/main.go:145 +0x2ba fp=0xc42004dd18 sp=0xc42004db08
main.main()
/home/forth/go/src/github.com/golang-ui/nuklear/cmd/nk-example/main.go:87 +0x652 fp=0xc42004df48 sp=0xc42004dd18
runtime.main()
/usr/lib/go/src/runtime/proc.go:183 +0x1f4 fp=0xc42004dfa0 sp=0xc42004df48
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2086 +0x1 fp=0xc42004dfa8 sp=0xc42004dfa0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2086 +0x1

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

goroutine 6 [select, locked to thread]:
runtime.gopark(0x589010, 0x0, 0x57579a, 0x6, 0x18, 0x2)
/usr/lib/go/src/runtime/proc.go:259 +0x13a
runtime.selectgoImpl(0xc42002a730, 0x0, 0x18)
/usr/lib/go/src/runtime/select.go:423 +0x11d9
runtime.selectgo(0xc42002a730)
/usr/lib/go/src/runtime/select.go:238 +0x1c
runtime.ensureSigM.func1()
/usr/lib/go/src/runtime/signal1_unix.go:304 +0x2f3
runtime.goexit()
/usr/lib/go/src/runtime/asm_amd64.s:2086 +0x1

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

@xlab
Copy link
Member

xlab commented Sep 27, 2016

@F0rth
Thanks for the report, I honestly haven't tested it on Linux yet. Here nk_glfw3_render crashes for some reason. You can debug with GDB (go build -work, then gdb) if you want.

I want to research that case, could you provide you linux workstation config? uname, distro and GCC version especially.

@xlab
Copy link
Member

xlab commented Sep 28, 2016

@F0rth I switched to http://github.com/go-gl/glfw, this may help.

@F0rth
Copy link
Author

F0rth commented Sep 28, 2016

so I put a breakpoint at 28 and nk-example crashed after the 74th line:
`
74 select {
(gdb) n

Thread 1 "nk-example" received signal SIGSEGV, Segmentation fault.
nk_draw_list_fill_poly_convex (list=list@entry=0x8375c8 <glfw+10984>,
points=0xa3f470, points_count=4, color=..., aliasing=)
at /home/forth/go/src/github.com/golang-ui/nuklear/nk/nuklear.h:6964
6964 ids[1] = (nk_draw_index)(vtx_inner_idx + ((i-1) << 1));
(gdb)

my config:
distro: Archlinux

uname: Linux mjolnir 4.7.5-1-ARCH #1 SMP PREEMPT Sat Sep 24 13:04:22 CEST 2016 x86_64 GNU/Linux

go:
go version go1.7.1 linux/amd64

gcc:
Utilisation des specs internes.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/lto-wrapper
Cible : x86_64-pc-linux-gnu
Configuré avec: /build/gcc-multilib/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --enable-libmpx --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release
Modèle de thread: posix
gcc version 6.2.1 20160830 (GCC)
`

@haiitch
Copy link

haiitch commented Oct 8, 2016

It compiles here (latest Ubuntu Xenial) but it crashes immediately after creating the application window.

@xlab
Copy link
Member

xlab commented Oct 8, 2016

@Vruz thanks for the report, I'll try to debug this case on the next weekend, tomorrow gonna move to dotGo, so no time for playing with Linux.. :(

@haiitch
Copy link

haiitch commented Oct 10, 2016

No worries. I'd be willing to look into this problem and offload some of
the work from you debugging it if you give me some rough pointers or
starting directions where the problem could possibly occur. But no rush,
I'll check back next week!

On 8 October 2016 at 17:38, Maxim Kupriianov notifications@github.com
wrote:

@Vruz https://github.com/vruz thanks for the report, I'll try to debug
this case on the next weekend, tomorrow gonna move to dotGo, so no time for
playing with Linux..


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABboiYddnsdsMMbVSlL8kKJd7FN9qLIks5qx_9JgaJpZM4KHduA
.

@xlab
Copy link
Member

xlab commented Oct 28, 2016

Related #2, probably the nuklear_glfw_gl3.h backend for Nuklear should be replaced. Will research that this Saturday.

@xlab xlab added the bug label Oct 28, 2016
@xlab
Copy link
Member

xlab commented Oct 29, 2016

@F0rth @Vruz guys sorry for delay. I've managed to run this thing on Windows, the problem with windows was that some old versions don't support OpenGL 3. So I migrated to OpenGL 2.1 backend and changed imports.

Please update the lib and check if this helps, because this should definitely do the trick.

@haiitch
Copy link

haiitch commented Oct 29, 2016

No worries, thank you for following up.

Re: Windows. I'm on Linux right now, but I'll test it and see what happens.

On 29 October 2016 at 09:45, Maxim Kupriianov notifications@github.com
wrote:

@F0rth https://github.com/F0rth @Vruz https://github.com/vruz guys
sorry for delay. I've managed to run this thing on Windows, the problem
with windows was that some old versions don't support OpenGL 3. So I
migrated to OpenGL 2.1 backend and changed imports.

Please update the lib and check if this helps, because this should
definitely do the trick.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABbonbsYWjJLspD9HOYQuT_hmPWrhGmks5q40AAgaJpZM4KHduA
.

@F0rth
Copy link
Author

F0rth commented Oct 30, 2016

it's working ! (on archlinux).

@xlab
Copy link
Member

xlab commented Oct 30, 2016

Gj everyone, thanks for the reports.

@xlab xlab closed this as completed Oct 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants