OpenAL initialization fails due to no Jack server and leads to segfault

Bug #1734782 reported by E.W.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Raspbian
New
Undecided
Unassigned

Bug Description

On a brand new installation of Raspbian Stretch on a Pi 2, I tried running some OpenAL based programs I wrote and it always failed and crashed on init. I know these programs worked on Jessie and generally work on other platforms (including x86 Linux).

Before the crash, this message gets printed to the console:

Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock

Doing a Google search, I found this discussed on the OpenAL soft bug tracker here:
https://github.com/kcat/openal-soft/issues/53

In a nutshell, it looks like OpenAL tries to open multiple devices until it finds a working one. Jack isn't very kind if it fails to open.

There was a workaround in that discussion: create a ~/.alsoftrc with the following lines:
[general]
drivers = -jack,

This bypasses the attempt to load Jack by OpenAL Soft.

This fixed my crashing problem.

But other Raspbian users won't know to do this, so I'm thinking something should be done.

Three ideas:
1) Install Jack by default
2) Change the shipping OpenAL Soft to disable/skip Jack since you don't ship with it installed
3) Write the package system so a default .alsoftrc with the above gets written on ship, but if Jack is installed, it disables that entry.

One more odd thing... I removed the .alsoftrc after all this, hoping to investigate the crash more, but the crash went away. The printed error lines above still happen, but the crash went away. I don't understand it. But I spent a full day and many reboots the first time dealing with the crashes. So I'm not imagining it. I did install some libopenal-dev and related packages after I did the .alsoftrc workaround. I don't think it should have affected this, but if it did, it would suggest there is a missing package that needs to be installed by default on a new installation.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.