You are here

Quitting qsampler and linuxsampler causes process to hang

Hello there Mr Capela

So this is a strange problem, I'm not sure whether it's just me who has encountered it.
In qsampler, when I load a channel and add an instrument in it, then use it and quit qsampler everything shuts down as expected.

However, when I save a loaded channel + instrument as a lscp file, then open that lscp in qsampler, use it and then try to shut down qsampler, the processes for qsampler & linuxsampler just hang and I have to kill them.

I tried the same thing (loading a lcsp preset) with the java Fantasia front end and this shuts down the front end and linuxsampler as expected.

This morning I updated the linuxsampler svn's and reinstalled it but qsampler + linuxsampler still won't shut down cleanly.

Do you perhaps have any suggestions?

Forums: 
rncbc's picture

When quitting or closing qsampler main window, the following message question should be presented:

Qsampler: The backend's fate ...
You have the option to keep the sampler backend (LinuxSampler)
running in the background. The sampler would continue to work
according to your current sampler session and you could alter the
sampler session at any time by relaunching QSampler.

Do you want LinuxSampler to stop?
[ Yes ] [ No ]

Sometimes it hangs for little while before that message box is presented, sometimes a little after that.

Is that ever shown to you at all?

Hi there, apologies for the late reply.

I see the message asking whether to shut down linuxsampler after I shut down qsampler but this only works when a channel was added during that session in qsampler. It fails when loading a lscp preset in qsampler and then trying to close qsampler.

When I load a saved preset (lscp) and then try to shut down qsampler, the message to keep linuxsampler running (or not) doesn't appear and qsampler does nothing. Just sits there in an unresponsive state.

Loading that same lscp preset in the java frontend Fantasia, and then closing Fantasia, results in the expected behaviour. Fantasia prompts to shut down Linuxsampler and it all quits as expected.

rncbc's picture

just a hunch:

does your LSCP script create sampler channels bound to at least one JACK audio device and when you launch it no JACK server is up and running at the time?

try this in other way: make sure JACK is up and running _before_ you open in qsampler.

hth
cheers

Jack is running before I start qsampler, so I don't think it would be that.
And the weird thing is that qsampler shuts down fine, as long as I did NOT load a lscp preset. But after loading a lscp preset, it won't shut down any more.

rncbc's picture

may I ask how do you make to start JACK ? qjackctl, cadence, jackd command line or else ?
does it hang on every lscp script or just some?
are you tring to configure plugin sampler channels solely, in which case you actually have to save or load as a lscp script whatsoever as that's the job of the plugin host exclusively?

sorry for all new questions: i'm really running out of ideas.
byee

My setup works like this:
I don't use cadence and it is not installed.

I start jack with qjackctl. I also make use of alsa_in & alsa_out to map alsa audio to jack so I can have browser audio (Pale Moon browser). alsa_in & out are loaded via a startup script launched by qjackctl. This script also kills pulseaudio before jack is started. (Pulseaudio is configured not to respawn). I also load jmeters to monitor the incoming alsa audio with the same script and all the jack connections are made with jack-plumbing.

When I used qsampler today it looks like the problem is not only with lscp scripts, that may have been a red herring. An instance with a gig format instrument (just added the device in qsampler as a test) doesn't shut down either. When I force quit qsampler, the linuxsampler back end is still running and working. So it looks like something prevents qsampler from exiting and qsampler then never gets to instruct linuxsampler to stop.

When using Fantasia and the lcsp preset, and quitting it, Fantasia quits and Linuxsampler back end stops. That's all I can think of.... I guess I could just use Fantasia or figure out how to use the scripting engine but it just puzzles me what could be causing the issue, because presumably not many other people are affected by it. :)

Add new comment