Skip to content

Report PDF/JPG silently not written when running headless/non-GUI (non-OpenGL surface path) #65

Description

@MauricePasternak

Running CAT preprocessing headless (Linux, MATLAB R2022b, matlab -batch) completes fine,
but no report/catreport_.pdf or catreportj_.jpg is written. GUI runs are fine.

The non-OpenGL surface path returns before the report is printed:

  1. cat_surf_renderv.m (lines ~266/277) tests if ~isempty(opt.h) && opt.h > 1.
    Since R2014b graphics handles are objects, so opt.h > 1 is always false. The function
    returns the raw image matrix instead of the struct with .cdata.
  2. cat_main_reportfig.m then hits if ~isfield(hSD{1}{1},'cdata'), return; end (~line 1634)
    and exits before the print(...) block (~line 1828). No PDF/JPG, no warning.

This only triggers when get(fg,'Renderer') is not 'opengl' (headless/no-GL servers),
i.e. the software-renderer branch in cat_main_reportfig (~1550-1621).

Seen in CAT26 r3347 and cat12 r2577.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions