Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Crash when a mouse wheel is mapped to an analog stick #35

Closed
kinodont opened this issue Oct 16, 2018 · 2 comments
Closed

Crash when a mouse wheel is mapped to an analog stick #35

kinodont opened this issue Oct 16, 2018 · 2 comments
Labels
bug Something isn't working

Comments

@kinodont
Copy link

kinodont commented Oct 16, 2018

Distribution: Arch Linux
Version: 2.24-1 (from AUR)

Once it is mapped, moving the stick produces this crash.

Thread 5 "QThread" received signal SIGFPE, Arithmetic exception.
0x00005555555e7ac6 in JoyGradientButton::wheelEventVertical (this=0x7fffd802d700) at /usr/src/debug/antimicro-2.24/src/joybuttontypes/joygradientbutton.cpp:324
(gdb) bt
#0  0x00005555555e7ac6 in JoyGradientButton::wheelEventVertical (this=0x7fffd802d700) at /usr/src/debug/antimicro-2.24/src/joybuttontypes/joygradientbutton.cpp:324
#1  0x00005555555e2c5a in JoyButton::activateSlots (this=0x7fffd802d700) at /usr/src/debug/antimicro-2.24/src/joybutton.cpp:923
#2  0x00005555555e30bb in JoyButton::createDeskEvent (this=0x7fffd802d700) at /usr/src/debug/antimicro-2.24/src/joybutton.cpp:838
#3  0x00005555555e4107 in JoyButton::joyEvent (this=this@entry=0x7fffd802d700, pressed=pressed@entry=true, ignoresets=<optimized out>, ignoresets@entry=false) at /usr/src/debug/antimicro-2.24/src/joybutton.cpp:428
#4  0x0000555555658166 in JoyControlStick::performButtonPress (ignoresets=<optimized out>, activebutton=@0x55555590a628: 0x7fffd802d700, eventbutton=0x7fffd802d700, this=0x55555590a5d0) at /usr/src/debug/antimicro-2.24/src/joycontrolstick.cpp:2569
#5  JoyControlStick::createDeskEvent (this=this@entry=0x55555590a5d0, ignoresets=ignoresets@entry=false) at /usr/src/debug/antimicro-2.24/src/joycontrolstick.cpp:369
#6  0x00005555556598a6 in JoyControlStick::joyEvent (this=this@entry=0x55555590a5d0, ignoresets=ignoresets@entry=false) at /usr/src/debug/antimicro-2.24/src/joycontrolstick.cpp:142
#7  0x00005555556599ca in JoyControlStick::activatePendingEvent (this=this@entry=0x55555590a5d0) at /usr/src/debug/antimicro-2.24/src/joycontrolstick.cpp:3287
#8  0x00005555556a28b1 in InputDevice::activatePossibleControlStickEvents (this=this@entry=0x5555558d87b0) at /usr/src/debug/antimicro-2.24/src/inputdevice.cpp:2219
#9  0x00005555555ee429 in InputDaemon::secondInputPass (this=0x5555558837d0, sdlEventQueue=0x7fffee682820) at /usr/src/debug/antimicro-2.24/src/inputdaemon.cpp:1148
#10 0x00005555555efaee in InputDaemon::run (this=0x5555558837d0) at /usr/src/debug/antimicro-2.24/src/inputdaemon.cpp:135
#11 0x00007ffff66e8352 in QObject::event(QEvent*) () from /usr/lib/libQt5Core.so.5
#12 0x00007ffff7a63e14 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#13 0x00007ffff7a6b6e1 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/libQt5Widgets.so.5
#14 0x00007ffff66bdc39 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/libQt5Core.so.5
#15 0x00007ffff66c0ccc in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib/libQt5Core.so.5
#16 0x00007ffff67119d4 in ?? () from /usr/lib/libQt5Core.so.5
#17 0x00007ffff4f803cf in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#18 0x00007ffff4f81f89 in ?? () from /usr/lib/libglib-2.0.so.0
#19 0x00007ffff4f81fce in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#20 0x00007ffff6710fc9 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#21 0x00007ffff66bc8cc in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/libQt5Core.so.5
#22 0x00007ffff6505eb9 in QThread::exec() () from /usr/lib/libQt5Core.so.5
#23 0x00007ffff650ff65 in ?? () from /usr/lib/libQt5Core.so.5
#24 0x00007ffff5f3ea9d in start_thread () from /usr/lib/libpthread.so.0
#25 0x00007ffff6055b23 in clone () from /usr/lib/libc.so.6
(gdb) p distance
$1 = 0.59656272753450279
(gdb) p static_cast<int>(distance)
$2 = 0
(gdb) p wheelSpeedY
$3 = 20

Division by zero.
The file contains six occurrences of this pattern (casting distance to int) in total.

This is a regression (not present in version 2.23).

juliagoda pushed a commit that referenced this issue Oct 16, 2018
@juliagoda
Copy link
Owner

Yes, true, my bad. How is it now?

@kinodont
Copy link
Author

I briefly tested it and could not reproduce the crash any more, so it looks fixed to me.
Thank you for committing the fix.

@juliagoda juliagoda added the bug Something isn't working label Oct 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants