Redaction is failing in freeBSD 13 for potm file

Hi Team,
Redaction is failing for a potm file in freebsd with below exception.

java.lang.NullPointerException: Cannot invoke "com.groupdocs.redaction.internal.c.a.s.pt.ne(boolean)" because "<local3>" is nul

Code that is failing

try(Redactor redactor = new Redactor(App.class.getResourceAsStream("/abc16a5.potm"));
        OutputStream target = Files.newOutputStream(Paths.get("redacted.potm"))) {
            redactor.apply(new ExactPhraseRedaction("あ", new ReplacementOptions("*")));
            RasterizationOptions ro = new RasterizationOptions();
            ro.setEnabled(false);
            redactor.save(target, ro);
        }

Below is my system details
OS: FreeBSD 13
Java: “17.0.11” 2024-04-16 OpenJDK 64-Bit Server VM (build 17.0.11+9-1, mixed mode, sharing)
Redaction SDK: 25.12

PFA of the file that is causing the issue.
abc16a12.potm.zip (26.5 KB)

If you can not reproduce at least give some pointers for the reason that might cause this issue, as your code is closed source.

Hello,

The stack trace points to internal/obfuscated code (com.groupdocs.redaction.internal.c.a.s.pt.ne(boolean)). That code path belongs to the Aspose.Slides for Java engine used for PPT/POTM. The NullPointerException happens when saving the redacted POTM (with RasterizationOptions disabled), so the failure is inside the presentation save path, not in the redaction logic itself.

Likely causes on FreeBSD

  1. Font / fontconfig
    Aspose.Slides relies on the OS for font resolution and metrics when handling text (including CJK such as あ). On FreeBSD, if fontconfig is missing or fonts are not installed/accessible, the engine can get null from font APIs and then call a method on it (e.g. the pt.ne(boolean)-like call in the stack), which produces the NPE.
    See: Common errors involving fonts on Linux (same ideas apply to FreeBSD).
  2. Headless / graphics
    If any part of the save path uses AWT/Java2D for layout or rendering, running without proper headless/font setup can lead to uninitialized or null objects and NPEs.

Recommended steps

  1. Run in headless mode
  • JVM: -Djava.awt.headless=true
    So that font/layout code can run in server environments.
  1. Install fontconfig and fonts on FreeBSD
  • Install fontconfig and at least one font family (e.g. DejaVu or a CJK font if they use Japanese text like あ):
  • pkg install fontconfig dejavu (or equivalent)
  • Run fc-cache -fv after installing fonts.
  1. Use FontsLoader (if fonts cannot be installed system-wide)
    Before opening/redacting/saving the presentation, load a folder with required fonts (including one that supports あ):
    FontsLoader.loadExternalFonts(pathToFontsFolders);
    See Aspose.Slides docs for FontsLoader and the fonts / Linux article (TEMP directory and font folder access).
  2. Temporary directory
    If the process has no write access to the default java.io.tmpdir, set a writable one:
    -Djava.io.tmpdir=/path/to/writable/tmp
    and ensure the same path is accessible when using FontsLoader if needed.
  3. Reproduce and report
    If the issue persists, please share:
  • Full stack trace (including all “Caused by”),
  • Exact FreeBSD and Java version,
  • Whether the same code and file work on Windows/Linux with fonts installed,
  • The problematic file (if possible) for Aspose/GroupDocs support.

Note
We’ve also added (in next release) a defensive check in our code so that when redacting text that has only East Asian characters (e.g. あ), we no longer assume a non-null Latin font; we fall back to East Asian font or a default. This avoids NPE in our portion-format handling. If the failure is inside Aspose.Slides’ save path due to fontconfig/fonts on FreeBSD, the steps above are still required on the user’s environment.

Thank you