(pygame parachute) Segmentation Fault with JackClient in Kubuntu

OS: Kubuntu 16.10 (yakkety yak)
Psychopy version: 1.83.04
Standard Standalone? y (I think so, downloaded via neurodebian)

What are you trying to achieve?:**
Run any of the demos successfully.

Psychopy gives:
“Fatal Python error: (pygame parachute) Segmentation Fault” in the output window (with a lot of Jack (audio controller) related messages prior to this. can post if needed).

What did you try to make it work?:
I have tried to run each of the standard builder Demos. All give the same error message.
I have attempted to vary the sound driver in the preferences menu (‘alsa’, ‘jack’, ‘portaudio’)

What specifically went wrong when you tried that?:
############ Running: /home/dimelab/Documents/BART/bart_lastrun.py #############
pyo version 0.7.9 (uses single precision)
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackPosixSemaphore::Connect name = jack_sem.1000_default_alsoft
Jack: JackPosixSemaphore::Connect sem_getvalue 0
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = alsoft refnum = 6
Jack: jack_client_close
Jack: JackClient::Close ref = 6
Jack: JackClient::Deactivate
Jack: JackSocketClientChannel::Stop
Jack: JackPosixThread::Kill
Jack: JackClientSocket::Close
Jack: JackClientSocket::Close
Jack: JackPosixSemaphore::Disconnect name = jack_sem.1000_default_alsoft
Jack: JackLibClient::~JackLibClient
Jack: JackShmReadWritePtr1::~JackShmReadWritePtr1 5
Jack: Succeeded in unlocking 422 byte memory area
Jack: JackLibGlobals Destroy 89b19de0
Jack: ~JackLibGlobals
Jack: JackPosixSemaphore::Disconnect name = jack_sem.1000_default_system
Jack: JackPosixSemaphore::Disconnect name = jack_sem.1000_default_freewheel
Jack: JackPosixSemaphore::Disconnect name = jack_sem.1000_default_dbusapi
Jack: JackPosixSemaphore::Disconnect name = jack_sem.1000_default_PulseAudio JACK Sink
Jack: JackPosixSemaphore::Disconnect name = jack_sem.1000_default_PulseAudio JACK Source
Jack: JackPosixSemaphore::Disconnect name = jack_sem.1000_default_qjackctl
Jack: no message buffer overruns
Jack: JackPosixThread::Stop
Jack: JackPosixThread::ThreadHandler : exit
Jack: JackShmReadWritePtr::~JackShmReadWritePtr 1
Jack: Succeeded in unlocking 1186 byte memory area
Jack: JackShmReadWritePtr::~JackShmReadWritePtr 0
Jack: Succeeded in unlocking 82274202 byte memory area
Jack: jack_client_close res = 0
Jack: jack_client_open alsoft
Jack: JackLibGlobals Init 0
Jack: JackLibGlobals
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: JackGenericClientChannel::ServerCheck = default
Jack: JackClientSocket::Connect : addr.sun_path /dev/shm/jack_default_1000_0
Jack: JackClientSocket::Close
Jack: JackLibClient::JackLibClient table = 89b28ee0
Jack: JackLibClient::Open name = alsoft
Jack: JackSocketClientChannel::Open name = alsoft
Jack: JackClientSocket::Connect : addr.sun_path /dev/shm/jack_default_1000_0
Jack: JackServerSocket::Bind : addr.sun_path /dev/shm/jack_alsoft_1000_0
Jack: JackSocketClientChannel::Start
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: JackSocketClientChannel::Init
Jack: JackServerSocket::Close /dev/shm/jack_alsoft_1000_0
Jack: JackClient::ClientNotify ref = 0 name = system notify = 0
Jack: JackClient::AddClient name = system, ref = 0
Jack: JackPosixSemaphore::Connect name = jack_sem.1000_default_system
Jack: JackPosixSemaphore::Connect sem_getvalue 0
Jack: JackClient::ClientNotify ref = 1 name = freewheel notify = 0
Jack: JackClient::AddClient name = freewheel, ref = 1
Jack: JackPosixSemaphore::Connect name = jack_sem.1000_default_freewheel
Jack: JackPosixSemaphore::Connect sem_getvalue 0
Jack: JackClient::ClientNotify ref = 2 name = dbusapi notify = 0
Jack: JackClient::AddClient name = dbusapi, ref = 2
Jack: JackPosixSemaphore::Connect name = jack_sem.1000_default_dbusapi
Jack: JackPosixSemaphore::Connect sem_getvalue 0
Jack: JackClient::ClientNotify ref = 3 name = PulseAudio JACK Sink notify = 0
Jack: JackClient::AddClient name = PulseAudio JACK Sink, ref = 3
Jack: JackPosixSemaphore::Connect name = jack_sem.1000_default_PulseAudio JACK Sink
Jack: JackPosixSemaphore::Connect sem_getvalue 0
Jack: JackClient::ClientNotify ref = 4 name = PulseAudio JACK Source notify = 0
Jack: JackClient::AddClient name = PulseAudio JACK Source, ref = 4
Jack: JackPosixSemaphore::Connect name = jack_sem.1000_default_PulseAudio JACK Source
Jack: JackPosixSemaphore::Connect sem_getvalue 0
Jack: JackClient::ClientNotify ref = 5 name = qjackctl notify = 0
Jack: JackClient::AddClient name = qjackctl, ref = 5
Jack: JackPosixSemaphore::Connect name = jack_sem.1000_default_qjackctl
Jack: JackPosixSemaphore::Connect sem_getvalue 0
Jack: JackShmReadWritePtr::Init 1 4294967295
Jack: Succeeded in locking 1186 byte memory area
Jack: JackShmReadWritePtr::Init 0 4294967295
Jack: Succeeded in locking 82274202 byte memory area
Jack: JackShmReadWritePtr1::Init 5 4294967295
Jack: Succeeded in locking 422 byte memory area
Jack: JackClient::SetupDriverSync driver sem in flush mode
Jack: JackPosixSemaphore::Connect name = jack_sem.1000_default_alsoft
Jack: JackPosixSemaphore::Connect sem_getvalue 0
Jack: Clock source : system clock via clock_gettime
Jack: JackLibClient::Open name = alsoft refnum = 6
Jack: JackClient::PortRegister ref = 6 name = alsoft:channel_1 type = 32 bit float mono audio port_index = 11
Jack: JackClient::PortRegister ref = 6 name = alsoft:channel_2 type = 32 bit float mono audio port_index = 12
Jack: JackClient::Activate
Jack: JackPosixThread::StartImp : create non RT thread
Jack: JackPosixThread::ThreadHandler : start
Jack: JackClient::kBufferSizeCallback buffer_size = 64
Jack: JackClient::Init : period = 1451 computation = 500 constraint = 1451
Jack: JackPosixThread::AcquireRealTimeImp priority = 83
Jack: JackClient::ClientNotify ref = 6 name = alsoft notify = 2
Jack: JackClient::kActivateClient name = alsoft ref = 6
Jack: JackClient::Connect src = alsoft:channel_1 dst = system:playback_1
Jack: JackClient::ClientNotify ref = 6 name = alsoft notify = 18
Jack: JackClient::ClientNotify ref = 6 name = alsoft notify = 18
Jack: JackClient::ClientNotify ref = 6 name = alsoft notify = 18
Jack: JackClient::ClientNotify ref = 6 name = alsoft notify = 18
Jack: JackClient::Connect src = alsoft:channel_2 dst = system:playback_2
Jack: JackClient::ClientNotify ref = 6 name = alsoft notify = 18
Jack: JackClient::ClientNotify ref = 6 name = alsoft notify = 18
Jack: JackActivationCount::Signal value = 0 ref = 6
Jack: JackActivationCount::Signal value = 0 ref = 6
Fatal Python error: (pygame parachute) Segmentation Fault

Any ideas on what to try next would be much appreciated!
I’ve been running psychopy successfully on Windows7 machines for about 3 years now and love the program. Just trying to get it working in linux so that I have better timing control over sound.

Hello,
I believe part of the error is a sound card issue (the card I was using wasn’t fully linux compatible). I have now replaced the card. I have sound throughout the system and with JACK running. I’ve removed pulseaudio as an option.

When I run psychopy (any of the demos), I get the following error message now:
pyo version 0.7.9 (uses single precision)
Fatal Python error: (pygame parachute) Segmentation Fault

I’m not sure from that what the problem could be. It only crops up if you use sounds?
I’m writing an alternative sound backend (using sounddevice instead of pyo ) that I’ll hopefully release very soon and should have better performance as well as less annoyance!

Also, are you using any sound in your experiment? If not, you could just put a different sound backend first in the list in your settings (like ‘pygame’ or ‘pysoundcard’), and avoid loading pyo unnecessarily.

Hello,
Apologies for the long delay. It is happening with pyo. I never thought to try pygame and will try pygame tomorrow as the sound backend.

Daniel - unfortunately the entire reason for the switch from windows to linux was for sound latency reasons. In Windows I get great sound latency on about 75% of trials but then huge variability on the remaining 25% of trials. Eprime’s website has a fair amount of information on this issue that started with Windows Vista.

My best guess at this time is that pyo is using pulseaudio jack sync module and there is something wrong in there. I’ll update more once I’ve figured out what is going on. In the “old” discussion, sound issues came up a lot.

Hello,
I think I have solved my sound issue.

  1. The sound card I initially used was not Linux friendly. Replaced with a new soundcard.

  2. In Jack options, audio needs to be set to “duplex” (allowing for input and output) OR pyo file needs to be edited to tell pyo not to look for input channels on the soundcard.

I’m still getting some error messages about failing to load pulseaudio but experiments appear to be running correctly. Now on to getting my parallel port working properly in Linux.

Andrew

2 Likes