CLI correlational tractography aborts at "create tract figures" — QWidget without QApplication (May 12 2026 build)

21 views
Skip to first unread message

Mark Pinsk

unread,
May 14, 2026, 12:27:14 AM (11 days ago) May 14
to DSI Studio

Hi Frank,

Running correlational tractography from the CLI (--action=cnt) crashes with SIGABRT at the create tract figures step. The analysis itself completes — .dec.tt.gz, .inc.*, .fdr_dist.values.txt, and .t_statistics.fz are all written to disk — but the HTML report comes out without embedded figures (just the ~4 KB skeleton), and the process exits 134.

This appears to be a regression of the issue Sean reported in August 2025: https://groups.google.com/g/dsi-studio/c/oRUSxvwADBA

The Qt error printed at the moment of the abort is:

QWidget: Cannot create a QWidget without QApplication

…which suggests the CLI build is instantiating a QWidget for figure rendering without a QApplication having been constructed first (a QCoreApplication or QGuiApplication isn't sufficient for widget-based code).

Environment

  • DSI Studio version: Hou "侯" build, May 12 2026 (from dsistudio/dsistudio:latest on Docker Hub, pulled 2026-05-13)
  • Container: Apptainer 1.x on a Linux HPC cluster (RHEL-family), headless compute node
  • Qt platform tested: both offscreen and xcb (via xvfb-run -a) — same abort in both cases, at the same step
  • All required Qt plugins present in the container at /opt/qt6/6.5.0/gcc_64/plugins/platforms/
Reproducing

APPTAINERENV_QT_QPA_PLATFORM_PLUGIN_PATH=/opt/qt6/6.5.0/gcc_64/plugins/platforms \
APPTAINERENV_QT_QPA_PLATFORM=xcb \
xvfb-run -a singularity exec --cleanenv \
    --bind <data_dir> \
    dsistudio_latest.sif \
    dsi_studio --action=cnt \
        --source=BAS+72H.dz.dif.dz \
        --demo=variables_72H.csv \
        --index_name=qa \
        --variable_list=1 \
        --voi=longitudinal \
        --effect_size=0.1 \
        --length_threshold=15 \
        --fdr_threshold=0.05 \
        --permutation=200 \
        --tip_iteration=16 \
        --region_pruning=1 \
        --exclude_cb=1 \
        --normalize_iso=1 \
        --no_tractogram=0 \
        --thread_count=8 \
        --output=/tmp/cnt_smoketest

Relevant output (tail)
...
│  │  │  [thread XXX]💾save 10793 tracts to /tmp/cnt_smoketest.dec.tt.gz
...
│  │  ├──┬──📟create tract figures
QWidget: Cannot create a QWidget without QApplication
Aborted (core dumped)

The same abort occurs with --no_tractogram=1, suggesting the figure-rendering code path runs regardless of that flag's intent.

Happy to test a candidate fix on this cluster if useful.

Thanks!
Mark

Mark Pinsk

unread,
May 14, 2026, 12:32:27 AM (11 days ago) May 14
to DSI Studio
Small correction: --no_tractogram=1 does work as intended and bypass the bug.

Frank Yeh

unread,
May 14, 2026, 8:51:19 AM (11 days ago) May 14
to mpi...@gmail.com, DSI Studio
Thanks for the information. I will revise the code to enforce  --no_tractogram=1 when there is no GUI

--
You received this message because you are subscribed to the Google Groups "DSI Studio" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dsi-studio+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dsi-studio/0fc6d765-9893-4cd2-9399-5fb8b4085e23n%40googlegroups.com.

Mark Pinsk

unread,
May 14, 2026, 8:55:31 AM (11 days ago) May 14
to DSI Studio
Is there a way to render those figures headlessly (e.g., constructing a QApplication with the offscreen platform around the figure step, or routing the tract snapshot through an off-screen QOpenGLWidget / QOffscreenSurface)?

Frank Yeh

unread,
May 14, 2026, 8:57:48 AM (11 days ago) May 14
to mpi...@gmail.com, DSI Studio
Unfortunately, it is not easily doable.
There is no quick workaround.
Frank

Mark Pinsk

unread,
May 14, 2026, 9:11:55 AM (11 days ago) May 14
to DSI Studio
Understood.

I guess I can run my bash scripts in headless mode, and generate the figures manually on my laptop.  Is there a quick way to generate the 4 view glass brain figures that are missing from the reports?

Mark Pinsk

unread,
May 14, 2026, 12:03:03 PM (11 days ago) May 14
to DSI Studio
Oh I got it.  It looks like I can use command history to capture my GUI actions to generate the glass brain figures for all my analyses.

Frank Yeh

unread,
May 14, 2026, 12:18:12 PM (11 days ago) May 14
to mpi...@princeton.edu, DSI Studio
Yes, I would do that using command history.

Reply all
Reply to author
Forward
0 new messages