Re: Segfault using zita-j2a

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/25/2012 05:49 PM, Jannis Achstetter wrote:
> 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 :)
> 

it was a thinko anyway.
 if (_state < WAIT) return 0;
a few lines later would have caught that condition, too.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user


[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux