openAVproductions / openAV-Luppp

Luppp is a live performance tool, created by OpenAV productions.
http://openavproductions.com/luppp
GNU General Public License v3.0
256 stars 43 forks source link

Getting stuck while recording #294

Closed manucontrovento closed 4 years ago

manucontrovento commented 4 years ago

Hi!

When trying several set options, while I starting recording my bass, LuPPP got "stuck" and all the system too, and I had to shut down the PC. Could it be a matter of low system performance? What I was using was: LuPPP, my AKAI controller, Qsynth to play instruments. In some cases I also had Carla running to host some delay plugins, to which I send and get the return back the tracks effected. Have you ever experienced issues of LuPPP getting stuck? When you save a session, it takes some time, while LuPPP still runs but the graphical environment is like "locked". Then when saving is finished, control comes back to LuPPP's interface. When stuck, it behaved like that: audio tracks kept going, but the system was not "active" anymore

When things like there happen, maybe it's useful to have a log, to be enabled when required, to trace what user is doing and how LuPPP is behaving, to understand what causes this "lock"

have a nice day Manu

harryhaaren commented 4 years ago

Hi, I think there are two different things reported here: 1) You experienced a system hang, while multiple apps (Luppp, QSynth, etc) were running. 2) Luppp's UI stops responding while saving its state to disk

Lets talk about them seperately, as they are two different things.

1) System hang; if you cannot just click "x" or close Luppp, then the OS or something else is at fault. Luppp is a process managed by the OS, and it should not be able to stop the whole system from responding. I've never had Luppp be the root-cause of a system lock up, and it should not be able to lock up a system - if it can then that's a OS/Kernel issue.

2) Due to the current implementation of how the recorded audio streams are written to the disk, the UI stops responding while files are being written. This could be fixed in multiple ways, however all require some design and development effort. A) Write a portion of the total audio buffer, and re-iterate the UI loop to update/redraw. Simplifies thread-handling, but requires partial-write support and "resume" after the partial write. UI may still jitter a bit if the block-size of the portions is too big. B) Utilize a helper/background thread to perform the writing of the audiobuffer to disk. Probably the better solution, as the UI will stay equally responsive always, but adds complexity is shuttling work to another thread. Requires using a RefCount to ensure that the AudioBuffer is not re-allocated or removed while still being written to disk.

So I think its very clear what causes this lock - and as a musician on stage this is not a very common case to save things regularly - hence it was not prioritized. I feel other features/fixes/functionality is probably more important than UI updates during save.

manucontrovento commented 4 years ago

HI! well, about case 2) , maybe I didn't explain properly: I don't see it as a problem, when the UI stops responding for a while, when saving to disk. In my issue I mentioned it just to make you understand what happened in case 1), i.e. at first it seemed to me like LuPPP was not responding for a while, just like when saving - but if I remember well, I was not saving, I was recording. thanks Manu

harryhaaren commented 4 years ago

Ah thanks for clearing that up - if the UI became unresponsive before a full system crash, then I'm confident the root cause of the UI freeze is the result of the system behaving badly. I'll close this here, but if it happens again (UI freeze) but without a system crash, please re-open and provide some more detail of what exactly you were doing to freeze the UI, and if it is reproducible if you take the same steps a 2nd time. Cheers!