Activity log for bug #1537547

Date Who What changed Old value New value Message
2016-01-24 20:21:29 JosepMa bug added bug
2017-04-09 16:13:14 JosepMa summary sync_enabled not sticking with XML mapped control sync_enabled not sticking with javascript mapped control
2017-04-09 16:35:13 JosepMa description OS: Windows 10 64bit Mixxx: 2.0 32 and 64bits Controller: Hercules DJ Console 4-Mx (contributed mapping as relesed in 2.0). New in 1.12/2.0, the "SYNC" button enables master sync for the deck if it is pressed and NOT released immediately. (Visually, it remains "on" after releasing). This works from the UI, but not from my controller. I've been able to pinpoint the problem to an incorrect behaviour of the QTimer in this file: https://github.com/mixxxdj/mixxx/blob/1.12/src/control/controlbehavior.cpp Method ControlPushButtonBehavior::setValueFromMidiParameter When i press it from my controller, it enters the "pressed" block, the action is executed, and the timer is started (it returns an id for the timer, so i assume that means that it started). When i release the button, after several seconds, the "else" block is executed and enters inside the if that contains the "timer.isActive()". Said timer is expected to return false instead, because the time has elapsed, so i don't know what happens. I've read in QT's documentation that: " In multithreaded applications, you can use QTimer in any thread that has an event loop. To start an event loop from a non-GUI thread, use QThread::exec(). " Of course, we are in the midi thread, and is a non-GUI thread. OS: Windows 10 64bit Mixxx: 2.0 32 and 64bits Controller: Hercules DJ Console 4-Mx (contributed mapping as relesed in 2.0). New in 1.12/2.0, the "SYNC" button enables master sync for the deck if it is pressed and NOT released immediately. (Visually, it remains "on" after releasing). This works from the UI, and also if mapped to a controller with XML, but not from when doing so from javascript (either with setValue or with setParameter). I've been able to pinpoint the problem to an incorrect behaviour of the QTimer in this file: https://github.com/mixxxdj/mixxx/blob/1.12/src/control/controlbehavior.cpp Method void ControlPushButtonBehavior::setValueFromMidiParameter( MidiOpCode o, double dParam, ControlDoublePrivate* pControl) When i press it from my controller, it enters the "pressed" block (LONGPRESSLATCHING), the action is executed, and the timer is started (it returns an id for the timer, so i assume that means that it started). When i release the button, after several seconds, the "else" block is executed and enters inside the if that contains the "timer.isActive()". Said timer is expected to return false instead, because the time has elapsed, so i don't know what happens. I've read in QT's documentation that: " In multithreaded applications, you can use QTimer in any thread that has an event loop. To start an event loop from a non-GUI thread, use QThread::exec(). " Of course, we are in the midi thread, and is a non-GUI thread.
2017-04-09 21:23:30 Daniel Schürmann mixxx: status New Confirmed
2017-04-09 21:23:44 Daniel Schürmann mixxx: importance Undecided Medium
2017-05-26 05:34:10 Be mixxx: status Confirmed Fix Committed
2018-04-19 13:21:59 jus mixxx: milestone 2.1.0
2018-04-19 13:22:03 jus mixxx: status Fix Committed Fix Released
2022-10-08 20:29:26 Swiftb0y bug watch added https://github.com/mixxxdj/mixxx/issues/8455
2022-10-08 20:29:28 Swiftb0y lock status Unlocked Comment-only