Skip to content

Mermaid diagram to pdf lead to Segmentation fault #11066

@lrrichter

Description

@lrrichter

Bug description

Rendering of a Mermaid diagram to pdf leads to a segmentation fault in line 192.
Because of the ANSI color code problem (https://github.com/quarto-dev/quarto-cli/pull/10910/files) I had to use the version directly from the git repo (commit 46cdcc3).

Steps to reproduce

````qmd
---
title: "Mermaid Test"
subtitle: "mermaid"
author: "Lothar R"
date: "2024/10/14"
execute:
  echo: true
  error: true
format:
#   html:
#     code-fold: true 
  beamer: 
    aspectratio: 169
    navigation: horizontal
    # theme: tum
    # echo: true
    # highlight-style: gruvbox-dark
    # code-overflow: wrap
    code-line-numbers: true
---



## MWE

```{mermaid}
%%| fig-width: 5.5
%%| echo: false
flowchart TB
    A[(Data Types)]
    A --> B(Boolean Type)
    A --> C(None Type)

```
````

Expected behavior

Render the diagram to pdf

Actual behavior

Rendering to pdf stopped with segmentation fault. Rendering to html works.
quarto render mermaid.qmd --verbose
/usr/local/bin/quarto: Zeile 192: 52556 Segmentation fault: 11 "${QUARTO_DENO}" ${QUARTO_ACTION} ${QUARTO_DENO_OPTIONS} ${QUARTO_DENO_EXTRA_OPTIONS} "${QUARTO_IMPORT_MAP_ARG}" "${QUARTO_TARGET}" "$@"

Your environment

  • OS macOS Sonoma 14.6.1
  • zsh 5.9 and as well
  • VSCode Version: 1.94.2 (Universal)
    Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
    Datum: 2024-10-09T16:08:44.566Z
    Electron: 30.5.1
    ElectronBuildId: 10262041
    Chromium: 124.0.6367.243
    Node.js: 20.16.0
    V8: 12.4.254.20-electron.0
    Betriebssystem: Darwin x64 23.6.0
  • Quarto extension: v1.116.0

Quarto check output

quarto check
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 99.9.9
      commit: 46cdcc35dd3515f8509bd2b8080575b18eb7d350
      Path: /Users/richter/work/tmp/quarto-cli/package/dist/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /Library/TeX/texbin
      Version: 2024

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.9.20 (Conda)
      Path: /Users/richter/opt/anaconda3/bin/python
      Jupyter: 5.7.2
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-reproIssues that are blocked until reporter provides an adequate reproductionstaleIssues open for 30+ days without providing a "working" reproducible example

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions