wbsoft/frescobaldi — Issue #3: 1.9.2: midi kills the application on Linux.
Author: cognot
Created: 2011-11-14 10:04:42+00:00
State: open

Hi,

Linux 64 bits, Qt 4.7.1, portmidi 2.1.7 freshly compiled.

Every time I attempt to play the midi output, I get:

File "/dsk/fronsac1/local/users/cognot/workspace/frescobaldi-2.0/frescobaldi_app/qmidi/player.py", line 61, in run
self.timer_start_playing()
File "/dsk/fronsac1/local/users/cognot/workspace/frescobaldi-2.0/frescobaldi_app/midifile/player.py", line 314, in timer_start_playing
self._output.reset()
File "/dsk/fronsac1/local/users/cognot/workspace/frescobaldi-2.0/frescobaldi_app/midifile/output.py", line 54, in reset
self.reset_controllers()
File "/dsk/fronsac1/local/users/cognot/workspace/frescobaldi-2.0/frescobaldi_app/midifile/output.py", line 79, in reset_controllers
send(event.ControllerEvent(c, event.MIDI_CTL_RESET_CONTROLLERS, 0))
File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
self.gen.next()
File "/dsk/fronsac1/local/users/cognot/workspace/frescobaldi-2.0/frescobaldi_app/midifile/output.py", line 113, in sender
self.send_events(l)
File "/dsk/fronsac1/local/users/cognot/workspace/frescobaldi-2.0/frescobaldi_app/midifile/output.py", line 135, in send_events
self.output.write(l)
File "/dsk/fronsac1/local/users/cognot/workspace/frescobaldi-2.0/frescobaldi_app/portmidi/__init__.py", line 206, in write
self._output.Write(data)
File "/dsk/fronsac1/local/users/cognot/workspace/frescobaldi-2.0/frescobaldi_app/portmidi/ctypes_pypm.py", line 112, in Write
_check_error(err)
File "/dsk/fronsac1/local/users/cognot/workspace/frescobaldi-2.0/frescobaldi_app/portmidi/ctypes_pypm.py", line 189, in _check_error
"PortMIDI-ctypes error [{0}]: {1}".format(err_no, err_msg))
MidiException: PortMIDI-ctypes error [-9994]: PortMidi: `Invalid MIDI message Data'

Trouble is after that, I get a couple of errors due to (a wild guess) the midi player thread accessing things in the Qt Gui thread:

QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::setParent: Cannot set parent, new parent is in a different thread
QPixmap: It is not safe to use pixmaps outside the GUI thread
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.
QObject::installEventFilter(): Cannot filter events for objects in a different thread.

Later followed by an X error which I assume is a consequence of this, and which kills the application.

I have no such problem on Windows.

Regards,
Richard.