Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LMMS freezes when you try to render audio twice #3397

Closed
PaulBatchelor opened this issue Mar 2, 2017 · 18 comments · Fixed by #4005
Closed

LMMS freezes when you try to render audio twice #3397

PaulBatchelor opened this issue Mar 2, 2017 · 18 comments · Fixed by #4005

Comments

@PaulBatchelor
Copy link
Contributor

PaulBatchelor commented Mar 2, 2017

Sorry folks, I found another bug which I can reproduce. LMMS really doesn't like this laptop of mine!

When I bounce an audio file, then go to bounce it again, it freezes. The GDB backtrace would seem to suggest that it's some sort of threading race condition.

gdb.txt

On a related but unrelated note, is there someone I can talk to off github whose knowledgeable about the part s of the codebase in charge of offline rendering? My email is thisispaulbatchelor at gmail dot com.

@musikBear
Copy link

When I bounce an audio file, then go to bounce it again, it freezes

Can you explain 'Bounce' -What does you do exactly?

@PaulBatchelor
Copy link
Contributor Author

Sorry, render audio.

@mikobuntu
Copy link
Contributor

I have been having a similar render issue for quite some time too on master branch ( crash on render ). I haven't delved into debugging the cause yet. From memory I think it may be GUI related ( not sure, but will work on this tonight ) I have been building against QT5 on Linux , so to rule that out I will build with the defaults in another folder too. * note to myself ...test with all possible audio backends and config settings *

@PaulBatchelor
Copy link
Contributor Author

@zonkmachine has been running into export crashes with #3403, which I believe are related to this issue.

I think the issue with this, (and any exporter related issues) is the renderer class itself, which I believe is causing a race condition with the audio mixer.

@softrabbit
Copy link
Member

The discussion in #2457 might contain some hints.

@PhysSong PhysSong changed the title LMMS freezes when you try to bounce audio twice LMMS freezes when you try to render audio twice Nov 19, 2017
@PhysSong
Copy link
Member

@PaulBatchelor Can you still reproduce this issue with latest stable-1.2?

@PhysSong
Copy link
Member

If you still able to do so, could you please post backtrace with all threads(using thread apply all bt) and the problematic project file?

@PaulBatchelor
Copy link
Contributor Author

I am still able to reproduce this bug. I have attached both the project file and the backtrace below:
LMMS_3397.zip

@musikBear
Copy link

I cant reproduce with your file on win32 rc4 (std settings wave)
@PaulBatchelor
I miss flg. info:

  • what do you export to
  • do you use two different names, or do owerwrite with same name?

In fact, could you list your exact reprocurable method?

@PaulBatchelor
Copy link
Contributor Author

I'm running on Slackware Linux 14.1 64-bit, and I am using JACK version 0.124.1.

Here are the steps I do to get the bug:

  1. start LMMS
  2. open song one_note.mmpz
  3. select export from menu
  4. save as "one_note.wav"
  5. leave all default settings (on my machine: 24-bit 44.1Khz, sinc Medium, no oversampling). hit start.
  6. select export from menu again
  7. save as "one_note.wav". yes to overwrite.
  8. leave all default settings. hit start.

At this point, LMMS freezes. I have also tried variations where I save to different filenames. Same results.

@PhysSong
Copy link
Member

@PaulBatchelor Does LMMS still hangs if you use other audio backend?

@PaulBatchelor
Copy link
Contributor Author

@PhysSong seems to work fine using ALSA.

@musikBear
Copy link

Linux issue, i step out

@PhysSong
Copy link
Member

@PaulBatchelor Are you able to get backtrace using gdb with thread apply all bt? Providing other threads' state would be more useful.

seems to work fine using ALSA.

Anyway, does the first export breaks playback as well as the second export? Those results can be useful when investigating this issue.

@zonkmachine
Copy link
Member

@PhysSong There's a backtrace zipped in this comment above: #3397 (comment)

@PhysSong
Copy link
Member

Ah, thanks!

@PhysSong
Copy link
Member

m_framesToDoInCurBuf = getNextBuffer( m_outBuf );
if( !m_framesToDoInCurBuf )
{
m_stopped = true;
}

After rendering finishes, AudioJack's m_stopped is set to false. However, Mixer's FIFO buffer is empty at the same time. So JACK backend stops.

I think this condition should be removed and replaced properly.

@PhysSong
Copy link
Member

FYI, #3207 might be fixed with the same way...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants