Craft icon indicating copy to clipboard operation
Craft copied to clipboard

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

Open t2dk49580 opened this issue 7 years ago • 14 comments

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

how can I do?

t2dk49580 avatar Sep 30 '18 06:09 t2dk49580

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

SuperFola avatar Sep 30 '18 12:09 SuperFola

[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

t2dk49580 avatar Oct 09 '18 08:10 t2dk49580

(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 ()

t2dk49580 avatar Oct 09 '18 08:10 t2dk49580

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 ;)

SuperFola avatar Oct 10 '18 16:10 SuperFola

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

t2dk49580 avatar Oct 11 '18 13:10 t2dk49580

(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

t2dk49580 avatar Oct 11 '18 13:10 t2dk49580

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

t2dk49580 avatar Oct 11 '18 13:10 t2dk49580

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

SuperFola avatar Oct 13 '18 15:10 SuperFola

what next I can do....

t2dk49580 avatar Oct 14 '18 00:10 t2dk49580

@t2dk49580 /deps/glfw should probably be updated to 3.2.1 and fixes from fogleman/Craft#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.

mpaoloni avatar Oct 14 '18 10:10 mpaoloni

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

t2dk49580 avatar Oct 14 '18 14:10 t2dk49580

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.

mpaoloni avatar Oct 14 '18 15:10 mpaoloni

It works! thanks!

t2dk49580 avatar Oct 19 '18 14:10 t2dk49580

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.

mpaoloni avatar Oct 20 '18 09:10 mpaoloni