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

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

Open
t2dk49580 opened this issue Sep 30, 2018 · 14 comments
Open

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

t2dk49580 opened this issue Sep 30, 2018 · 14 comments

Comments

@t2dk49580
Copy link

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

how can I do?

@SuperFola
Copy link

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

@t2dk49580
Copy link
Author

[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
Copy link
Author

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

@SuperFola
Copy link

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

@t2dk49580
Copy link
Author

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

@t2dk49580
Copy link
Author

(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
Copy link
Author

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

@SuperFola
Copy link

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

@t2dk49580
Copy link
Author

what next I can do....

@mpaoloni
Copy link

@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.

@t2dk49580
Copy link
Author

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

@mpaoloni
Copy link

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.

@t2dk49580
Copy link
Author

It works! thanks!

@mpaoloni
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants