LMMS freezes at 100% on any exports that I try. I have tried to export three different projects, one which was new, and two older projects which I know had at one point successfully exported. Each one freezes at 100% and one closes entirely. Running LMMS from a terminal gives me the following error when the freeze/crash happens:
QMetaMethod::invoke: Unable to handle unregistered datatype 'MidiTime'
The project that crashes gives an additional segfault.
Project should export successfully.
LMMS freezes and sometimes segfaults at 100% exported, throwing the error
QMetaMethod::invoke: Unable to handle unregistered datatype 'MidiTime'
Version 1.2.2
Arch Linux
JACK Audio
I've tried with the demo "CapDan-ReggaeTry".
I've got the same behavior where LMMS doesn't crash, but freezes.
Launched from a terminal, it says the same:
QMetaMethod::invoke: Unable to handle unregistered datatype 'MidiTime'
LMMS 1.2.2, JACK, options:

Note that even if LMMS freezes, the WAV file seems to be correctly exported (ie: I can read it with VLC).
How long are you waiting to determine that LMMS is frozen? I know on my system, LMMS sometimes sits several seconds at 100% before the export completes.
You mention that you've succesfully exported projects before; what's changed since then? What was the latest configuration that worked?
@Spekular I've just run a test for 5 full minutes and it still is frozen.
_Edit: 50 minutes and it sill is frozen. I had to Ctrl-C it._
It happens to me too. opensuse TW
@ViperZer0 & @Daniele71
Are you both on Arch??
We need more information from you @Daniele71 !
I would like you both to try and change the backend to SDL, and retry to export, that way we can point the finger at JACK Audio
Change of backend:
https://lmms.io/wiki/index.php?title=LMMS_Settings#Audio_Settings
If you still freeze we can point at Arch
@ViperZer0 & @Daniele71
Are you both on Arch??
We need more information from you @Daniele71 !
I would like you both to try and change the backend to SDL, and retry to export, that way we can point the finger at _JACK Audio_
Change of backend:
https://lmms.io/wiki/index.php?title=LMMS_Settings#Audio_Settings
If you _still_ freeze we can point at Arch
Opensuse Tumbleweed here. It works with SDL backend !
Same for me. Tested the export with the SDL backend, then tested with the ALSA backend, that works fine.
Super! Thank you both @trebmuh & @Daniele71 for your feedback!
This issue is something related to JACK, or a version of JACK.
@trebmuh & @Daniele71
Afaik SDL output is not inferior to JACK, so you should use SDL for now :)
You're welcome. If that can help, I'm using a debian 1.9.14~dfsg-1 backport version of JACK2.
The same problem is in master (I downloaded&compiled it at 15.09.2020).
Only after export and before freezing message is not:
_QMetaMethod::invoke: Unable to handle unregistered datatype 'MidiTime'_
but (something about this):
_PERFLOG | Project Render | 35.46user, 1.40system 17.39elapsed_
I use Debian Buster : _libjack-jack2-dev 1.9.12~dfsg-2_
P.S.
Terminal output:
_QMetaMethod::invoke: Unable to handle unregistered datatype 'MidiTime'_
is always after rendering - not only in Jack audio device, and after this only with Jack aufio device LMMS freezing. .
Can someone provide a backtrace of the hang? See https://github.com/LMMS/lmms/wiki/Debugging-LMMS.
With stable release (1.2.2) compiled with QT4 i found, that Hung in
void waitUntilRead()
{
m_writer_sem.acquire( m_size ); /* can not get this line done : but it is QT library call */
m_writer_sem.release( m_size );
}
//fifo_buffer.h :: line 69
I made some fprintf(stderr, ...) to trace problem with session (last project DnB) exporting mp3 with default setting.
[----] With sdl device:
---- Mixer::stopProcessing():: 0
---- m_fifoWriter
---- m_fifoWriter->finish()
---- fifoWriter::run() -> write( NULL )
m_fifo->available() == True
--FB-- fifoBuffer::waitUntilRead()::m_size == 2 :: have = 2
--FB-- m_writer_sem.acquire( m_size )
--FB-- m_writer_sem.release( m_size )
---- fifoWriter::run() -> waitUntilRead()
---- m_fifoWriter->wait()
---- m_audioDev->stopProcessing()
---- Mixer::stopProcessing():: 1
---- m_fifoWriter == NULL
QMetaMethod::invoke: Unable to handle unregistered datatype 'MidiTime'
--RM-- ~RenderManager()
--M-- restoreAudioDevice()
---- Mixer::stopProcessing():: 2
---- m_fifoWriter == NULL
--M-- stopProcessing()
--RM-- mixer()->restoreAudioDevice()
---- Mixer::stopProcessing():: 3
---- m_fifoWriter
---- m_fifoWriter->finish()
---- fifoWriter::run() -> write( NULL )
m_fifo->available() == True
--FB-- fifoBuffer::waitUntilRead()::m_size == 2 :: have = 1
--FB-- m_writer_sem.acquire( m_size )
--FB-- m_writer_sem.release( m_size )
---- fifoWriter::run() -> waitUntilRead()
---- m_fifoWriter->wait()
---- m_audioDev->stopProcessing()
--RM-- mixer()->changeQuality( m_oldQualitySettings )
---- Mixer::stopProcessing():: 4
---- m_fifoWriter
---- m_fifoWriter->finish()
---- fifoWriter::run() -> write( NULL )
m_fifo->available() == True
--FB-- fifoBuffer::waitUntilRead()::m_size == 2 :: have = 2
--FB-- m_writer_sem.acquire( m_size )
--FB-- m_writer_sem.release( m_size )
---- fifoWriter::run() -> waitUntilRead()
---- m_fifoWriter->wait()
---- m_audioDev->stopProcessing()
[----] With jackd device:
---- Mixer::stopProcessing():: 0
---- m_fifoWriter
---- m_fifoWriter->finish()
---- fifoWriter::run() -> write( NULL )
m_fifo->available() == False
--FB-- fifoBuffer::waitUntilRead()::m_size == 2 :: have = 0
--FB-- m_writer_sem.acquire( m_size )
--FB-- m_writer_sem.release( m_size )
---- fifoWriter::run() -> waitUntilRead()
---- m_fifoWriter->wait()
---- m_audioDev->stopProcessing()
---- Mixer::stopProcessing():: 1
---- m_fifoWriter == NULL
QMetaMethod::invoke: Unable to handle unregistered datatype 'MidiTime'
--RM-- ~RenderManager()
--M-- restoreAudioDevice()
---- Mixer::stopProcessing():: 2
---- m_fifoWriter == NULL
--M-- stopProcessing()
--RM-- mixer()->restoreAudioDevice()
---- Mixer::stopProcessing():: 3
---- m_fifoWriter
---- m_fifoWriter->finish()
---- fifoWriter::run() -> write( NULL )
m_fifo->available() == True
--FB-- fifoBuffer::waitUntilRead()::m_size == 2 :: have = 1
[Actual files are: fifo_buffer.h , Mixer.cpp , RenderManager.cpp ]
I found more bugs in rendering:
the same is in portaudio device:
[using direct sound card name:]
[lmms_portaudio.txt](https://github.com/LMMS/lmms/files/5244438/lmms_portaudio.txt)
[using oss "virtual" device:]
[lmms_portaudio_oss.txt](https://github.com/LMMS/lmms/files/5244454/lmms_portaudio_oss.txt)
But with soundio device there is SegFault on export start (exception with compiled version, but infinite loop with AppImage 1.2.2):
lmms_soundio_dummy.txt
lmms_soundio_pulse.txt
P.S.
All bugs are both in stable and master versions (in lmms-1.2.2-linux-x86_64.AppImage I can not set direct sound card with portaudio - no sound).
I clear this:
lmms_jackd_freeze_gdb.txt
But I think it is not more actual ...
This bug is related to https://github.com/LMMS/lmms/issues/2638
[Thank You, PhysSong !]
_This can be formulated:_
Some (playable) devices have problems in Mixer::stopProcessing():
soundio : Segmentation Fault
jackd and (sometimes) portaudio :
no sound after Mixer::stopProcessing() , Mixer::startProcessing() ;
and hung in next Mixer::stopProcessing() .
P.S.
_In my experiment I replaced_
void Mixer::restoreAudioDevice()
_and_
void Mixer::changeQuality( const struct qualitySettings & _qs )
_with_
void Mixer::restoreAudioDeviceWithQuality( const struct qualitySettings & _qs )
_In original code_
Mixer::stopProcessing() //<- befor rendering (export)
and
Mixer::startProcessing() ; Mixer::stopProcessing() ; Mixer::startProcessing() ;
after rendering (export)
Sorry for my mistake ...
soundio crash with segmentation Fault in Mixer::startProcessing() ;
but problem is in Mixer::stopProcessing()
Line in AudioSoundIo.cpp:
void AudioSoundIo::stopProcessing()
{
m_stopped = true;
if (m_outstream)
{
soundio_outstream_destroy(m_outstream);
// line 228 :: after this we can not simply soundio_outstream_start(m_outstream)) - Segmantation Fault!
m_outstream = NULL; // Segmantation Fault in every conditions
}
if (m_outBuf)
{
delete[] m_outBuf;
m_outBuf = NULL;
}
}
It seems that this bug can be fixed by adding only one line:
void AudioJack::startProcessing()
{
if( m_active || m_client == NULL )
{
m_stopped = false; // Only this should be added
return;
}
...
}
Patch file:
But I have one pending PR ...
It doesn't matter how many pull requests you had open. Made new PR if it fixes issue.
It seems that I instead have added change to my pending PR ...
Is it problem?
Not that much at this moment. We can split them before merging if we should.
I think it would be better to work with them both (_not_ splitting): second change is too small - only 1 line.
PR patch against stable LMMS 1.2.2 :
lmms_1_2_2_stable.patch.gz
Fixed in #5681.
Awesome.
Thank you all.