midi.sendShortMsg result in segmentation fault - armhf - 2.2.4 - 2.3.1 - 2.40-alpha

Bug #1956144 reported by Mike
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Undecided
Daniel Schürmann

Bug Description

Version 2.2.4
Raspberry pi

dpkg-query -s mixxx
Package: mixxx
Status: install ok installed
Priority: optional
Section: sound
Installed-Size: 13128
Maintainer: Debian Multimedia Maintainers <email address hidden>
Architecture: armhf
Version: 2.2.4~dfsg-1

When starting mixxx:

mixxx -platform vnc:size=1920x1280 --developer

To reproduce:

Options -> Preferences
Controllers -> Midi Through Port-0

Tick box Enabled
Load preset: Midi for light

Click apply.

Result in direct segmentation fault.

If you restart mixxx, the controller is enabled, you see debug information and resulting again in a segmentation fault.

Attachment has gdb and terminal output information

Thank you !

Revision history for this message
Mike (mhe1234) wrote :
Revision history for this message
ronso0 (ronso0) wrote :

Mixxx 2.2 doesn't receive bug fixes or support anymore.

Can you build 2.3 (or main branch 2.4) for the Pi?

Revision history for this message
Mike (mhe1234) wrote (last edit ):

Yes,

2.3.1 -> 2.3.1-30-gecab893971 platform Linux ARM

Options -> preferences
Controllers -> Midi Through Port-0
Load Mapping -> Midi for light
Apply -> Crash

main release building right now

Revision history for this message
Mike (mhe1234) wrote :

2.4.0-alpha-pre platform Linux ARM

Options -> preferences
Controllers -> Midi Through Port-0
Load Mapping -> Midi for light
Apply -> Crash

All versions gave segmentation faults.

Revision history for this message
Mike (mhe1234) wrote (last edit ):

#0 0xb534b1b0 in XForceScreenSaver () at /lib/arm-linux-gnueabihf/libX11.so.6
#1 0xb534b230 in XResetScreenSaver () at /lib/arm-linux-gnueabihf/libX11.so.6
#2 0x004df488 in mixxx::ScreenSaverHelper::triggerUserActivity() () at /code/src/util/screensaver.cpp:177
#3 0x006dd174 in Controller::triggerActivity() (this=0xa68e4a60) at /code/src/controllers/controller.cpp:112
#4 0x00907540 in MidiController::receivedShortMessage(unsigned char, unsigned char, unsigned char, mixxx::Duration)
    (this=this@entry=0xa68e4a60, status=status@entry=144 '\220', control=<optimized out>, value=<optimized out>, timestamp=...) at /code/src/controllers/midi/midicontroller.cpp:234
#5 0x006feb3c in PortMidiController::poll() (this=0xa68e4a60) at /code/src/controllers/midi/portmidicontroller.cpp:155
#6 0x0021bcd8 in ControllerManager::pollDevices() (this=0x2a13ae4) at /code/src/controllers/controllermanager.cpp:362
#7 0xb2ee9044 in () at /lib/arm-linux-gnueabihf/libQt5Core.so.5
#8 0xb2eedc2c in QTimer::timeout(QTimer::QPrivateSignal) () at /lib/arm-linux-gnueabihf/libQt5Core.so.5
#9 0xb2edd468 in QObject::event(QEvent*) () at /lib/arm-linux-gnueabihf/libQt5Core.so.5
#10 0xb5b60534 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/arm-linux-gnueabihf/libQt5Widgets.so.5
#11 0xb2ea9c2c in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/arm-linux-gnueabihf/libQt5Core.so.5
#12 0xb2f0fb80 in QTimerInfoList::activateTimers() () at /lib/arm-linux-gnueabihf/libQt5Core.so.5
#13 0xb2f105b0 in () at /lib/arm-linux-gnueabihf/libQt5Core.so.5
#14 0xb1ea172c in g_main_context_dispatch () at /lib/arm-linux-gnueabihf/libglib-2.0.so.0

Revision history for this message
ronso0 (ronso0) wrote :

I can't comment on the actual root issue here (how user data can crash Mixxx) but it seems the script trying to stop nonexistant timers may be the trigger.

Please try to reproduce the crash with the overhauled script MIDI-Output for lightcontrol script version from the forums
https://mixxx.discourse.group/t/midi-output-for-lightcontrol/13224/37

Revision history for this message
Mike (mhe1234) wrote :

Tested on my 2.3.1-30-gecab893971 build. Forgot to save the previous deb (2.4 alpha).

The updated script changed the behavior. Instead of crashing when hitting apply. It now crash when starting the song.

Revision history for this message
Mike (mhe1234) wrote (last edit ):

Did some extra digging, if i comment all midi.sendShortMsg out, script is not crashing.

midi.sendShortMsg( 1, 0x32, 0x64);

it result in

Warning [Controller]: Error sending short message "Midi Through Port-0: outgoing: status 0x1"
Warning [Controller]: PortMidi error: PortMidi: `Invalid MIDI message Data'

if i change it in:
midi.sendShortMsg(0x8F + 1, 0x32, 0x64);

Debug [Controller]: Midi Through Port-0: t:95512 ms status 0x90 (ch 1, opcode 0x9), ctrl 0x32, val 0x64
No protocol specified

The No protocol specified is displayed, just before segmentation fault.

I dont think problem is in the Midi for light script.

// edit

if i use a command from other script:
midi.sendShortMsg(0x90,0x2A,0x00);

Just to be sure if the format is correct, it crashes.

Revision history for this message
Mike (mhe1234) wrote :

Allright, fiddling more around.

Instead of Selecting MIDI for light with Midi Through Port-0 result in segmentation fault Edit

The title should be changed to:

midi.sendShortMsg result in segmentation fault.

Mike (mhe1234)
summary: - Selecting MIDI for light with Midi Through Port-0 result in segmentation
- fault
+ midi.sendShortMsg result in segmentation fault
summary: - midi.sendShortMsg result in segmentation fault
+ midi.sendShortMsg result in segmentation fault - armhf - 2.2.4 - 2.3.1 -
+ 2.40-alpha
Revision history for this message
Jörg Wartenberg (joerg-ubuntu) wrote :

You could try to comment out the line Controller::triggerActivity() in /code/src/controllers/controller.cpp:112
This function just prevents that the screen saver occurs. Does it crash without this line too?

Revision history for this message
Mike (mhe1234) wrote :

Hi,

Recompiled the 2.3.1 version.

Same result as described before.

Thank you

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

That piece of information and your last back trace suggests this may be an issue with your video driver or within XWindows. Can you see if there are any updates for both on your system and re-test? Can you get a new back trace with Controller::triggerActivity() commented out? Thank you for your help!

Revision history for this message
Mike (mhe1234) wrote :

I am starting mixxx without xwindows:

mixxx -platform vnc:size=1920x1280 --developer --controllerDebug --logLevel debug

Will make new back trace.

Revision history for this message
Mike (mhe1234) wrote (last edit ):

I think inside midicontroller.cpp the two triggerActivity() should also be commented out..

// compiling now.

Revision history for this message
Mike (mhe1234) wrote :

Can confirm, that with removing the other two triggerActivity, it isnt segfaulting anymore.

Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :
Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
status: New → In Progress
milestone: none → 2.3.2
Changed in mixxx:
status: In Progress → Fix Committed
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/10632

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.