fogleman/Craft

when run ./craft craft.michaelfogleman.com show "segment fault"

t2dk49580 opened this issue · 14 comments

when run ./craft craft.michaelfogleman.com show "segment fault"

how can I do?

launch it in GDB :

$ gdb craft
gdb> r craft.michaelfogleman.com
... wait for segfault
gdb> bt

bt will display the backtrace and you'll be able to locate the problem to try to fix it

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe7d78700 (LWP 3010)]
[New Thread 0x7fffe7577700 (LWP 3011)]
[New Thread 0x7fffe6d76700 (LWP 3012)]
[New Thread 0x7fffe6575700 (LWP 3013)]

Thread 1 "craft" received signal SIGSEGV, Segmentation fault.
__strcmp_sse2_unaligned ()
at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:31
31 ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S no such file or directory

(gdb) bt
#0 __strcmp_sse2_unaligned ()
at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:31
#1 0x000055555567e592 in openJoystickDevice ()
#2 0x000055555567ec27 in _glfwInitJoysticks ()
#3 0x0000555555679385 in _glfwPlatformInit ()
#4 0x0000555555674419 in glfwInit ()
#5 0x0000555555592dfb in main ()

Uh, fine, have you a joystick connected ?
I might as well advise you to recompile the whole project with the -g option, to have a more complete backtrace ;)

I have no joystick
ok, I can try to recompile with -g option

(gdb) bt
#0 __strcmp_sse2_unaligned () at ../sysdeps/x86_64/multiarch/strcmp-sse2-unaligned.S:203
#1 0x000055555567e622 in openJoystickDevice (path=path@entry=0x7fffffffd740 "/dev/input/js0")
at /home/sai/code/git/Craft/deps/glfw/src/linux_joystick.c:60
#2 0x000055555567ecb7 in _glfwInitJoysticks () at /home/sai/code/git/Craft/deps/glfw/src/linux_joystick.c:240
#3 0x0000555555679415 in _glfwPlatformInit () at /home/sai/code/git/Craft/deps/glfw/src/x11_init.c:766
#4 0x00005555556744b9 in glfwInit () at /home/sai/code/git/Craft/deps/glfw/src/init.c:125
#5 0x0000555555592dfb in main (argc=2, argv=0x7fffffffdf68) at /home/sai/code/git/Craft/src/main.c:2593

os: virtualbox ubuntu18.04
/dev/input/js0 is exist
cat /dev/input/js0 have some binary data

Hum, i don't know, that's super strange ! GLFW can't initialize its joystick but it's there O_o

what next I can do....

@t2dk49580
/deps/glfw should probably be updated to 3.2.1 and fixes from #201 applied.

I cloned the repo this morning, updated GLFW and SQLite and applied some fixes: https://github.com/mpaoloni/Craft

Try it and see if it works for you.

You can see the changes in the commits section.

I cloned your repo, it works, but main direction was wrrong, left and right always goto top and bottom...

Not sure what you mean exactly. Works for me. I'm on Ubuntu 18.04.1 LTS, kernel 4.15.

Do you have your IME actived? Or maybe another HID device besides keyboard and mouse?

I updated GLFW to upstream branch, which is close to the next release 3.3. You can find the new repo here: https://github.com/mpaoloni/Craft-glfw-pre3.3

Try it and tell me if it changes anything.

It works! thanks!

Glad I could help. Once GLFW 3.3 is out I'll update the other repo and delete https://github.com/mpaoloni/Craft-glfw-pre3.3.