X thread initialization required when Connect()ing to pvserver; pthread_mutex_lock crash inside XrmQGetSearchList
Using 7db25af8, I get a crash in pthread_mutex_lock
inside XrmQGetSearchList
. The underlying problem appears to be that X never initialized internal threading resources.
The crash reproduces with the attached 'crash.py': /path/to/pvserver & sleep 3 env -i DISPLAY="${DISPLAY}" HOME=${HOME} /path/to/pvpython crash.py
and the attached patch (that just calls XInitThreads
) fixes things for me.
The crash does not occur if I remove the paraview.simple.Connect()
.
The machine is Ubuntu: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial