Re: [LAU] Segfault using zita-j2a

From: Jannis Achstetter <jannis_achstetter@email-addr-hidden>
Date: Thu Oct 25 2012 - 18:49:23 EEST

Am 25.10.2012 17:23, schrieb Robin Gareus:
> On 10/25/2012 04:54 PM, Jannis Achstetter wrote:
>> [...]
> Classic race condition. The jack_client is activated before the
> resampler is initialized.
>
> zita-j2a.cc:200 creates the jack-client and calls jack_activate.
> process_callbacks can arrive starting now.
>
> but not until zita-j2a.cc:211 calls J->start() the data-structures
> required to do the processing are initialized.
>
> Easiest solution is probably to check if start() has been called in the
> process callback:
>
> --- a/jackclient.cc
> +++ b/jackclient.cc
> @@ -301,6 +301,8 @@ int Jackclient::jack_process (int nframes)
> jack_nframes_t ft;
> double tj, err, d1, d2;
>
> + if (_state == INIT) return 0;
> +
> // Buffer size change or other evil.
> if (_state == TERM)

Sounds reasonable but still crashes with the same error. I'll try to
debug this further :)

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Thu Oct 25 20:15:02 2012

This archive was generated by hypermail 2.1.8 : Thu Oct 25 2012 - 20:15:03 EEST