Skip to content

Commit 523471b

Browse files
Add a FAQ note on SegFaults caused by outdated font caches (#1232)
1 parent 3499791 commit 523471b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

doc/faq.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,24 @@ We recommend transferring the model checkpoints to the system-level cache direct
9191
> mv vit_b_decoder.pt /home/anwai/.cache/micro_sam/models/vit_b_lm_decoder
9292
```
9393

94+
95+
### 9. napari crashes with a segmentation fault (`Fatal Python error: Segmentation fault`) when I open one of the `micro_sam` annotators (Linux).
96+
This is caused by a corrupted system font cache, not by `micro_sam` itself. The annotator widgets use a collapsible "Settings" section (from `superqt`) that draws small arrow glyphs (`` / ``) with Qt. If your `fontconfig` cache is stale, Qt may resolve the default font to an unusable font file (e.g. a `.woff` web font), and Qt's bundled FreeType/HarfBuzz then segfaults while rendering those glyphs. You can confirm this is the cause if the crash traceback ends in `superqt/collapsible/_collapsible.py` in `_convert_string_to_icon`.
97+
98+
To fix it, rebuild your user font cache:
99+
```bash
100+
fc-cache -f
101+
```
102+
If the crash persists, clear the cache directory and rebuild it:
103+
```bash
104+
rm -rf ~/.cache/fontconfig && fc-cache -f
105+
```
106+
You can verify the fix by checking that the default font no longer resolves to a `.woff` (or otherwise broken) file:
107+
```bash
108+
fc-match "Sans Serif" # should return a real font such as NotoSans-Regular.ttf, not a .woff
109+
```
110+
111+
94112
## Usage questions
95113

96114
<!---

0 commit comments

Comments
 (0)