Skip to content

Napari segfaults immediately during load (and workaround/fix) #142

Description

@rbs-sci

I'm not entire sure of the reason - been experimenting with TomoTwin on several systems today and they've all worked OK - but on my home system, the napari environment immediately segfaults with no obvious error in the commandline whenever called. RELION-5 napari works OK, so it's not specifically napari that's the issue.

dmesg reports it's unhappy with libLLVM.so but not sure why; the environment installs go smoothly without obvious issues. The only thing I can hypothesize is that my home box has a 9950X, which has a (weak) AMD iGPU. The nVIDIA (Ampere gen) GPU is only for compute. Maybe that's the reason, as work systems are all nVIDIA only.

After looking at the environment file, I had a go with installing everything with whatever versions would match as resolved by mamba/pip, testing buy running napari at every new item to see whether it would segfault. The result was the following:

conda create -n napari-tomotwin python=3.10
conda activate napari-tomotwin
mamba install napari

Napari fails to load with PyQt error. Oh well, seems the dependency resolution isn't perfect...

mamba install PyQt

Napari loads.

mamba install mrcfile pandas numpy scipy scikit-learn matplotlib git hbdscan

Napari loads. A few versions of dependencies get switched around.

pip install napari-boxmanager napari-clusters-plotter

Napari loads.

Then the instructions to link TomoTwin to the napari-boxmanager environment were carried out, i.e.:

conda activate tomotwin
tomotwin_dir=$(realpath $(dirname $(which tomotwin_embed.py)))
napari_link_file=${tomotwin_dir}/napari_boxmanager
conda activate napari-tomotwin
echo -e "#\!/usr/bin/bash\nexport NAPARI_EXE=$(which napari)\nnapari_exe='$(which napari_boxmanager)'\n\${napari_exe} \"\${@}\""> ${napari_link_file}
ln -rs $(which napari) ${tomotwin_dir}
chmod +x ${napari_link_file}
conda activate tomotwin

...with the result being Napari will load (with boxmanager) from the TomoTwin environment and everything works as it did on other systems.

I'm putting this here just in case it might help someone else if they encounter the same problem (or future-me!)

Will provide environment file if it'll help/for reference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions