Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-3085

QFontDatabase.addApplicationFont() returns -1 or crashes on macOS Sequoia with PySide6 6.8.3 and PySide6 6.9.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.9.0, 6.8.3
    • PySide
    • None
    • macOS

    Description

        1. Summary
          When calling `QFontDatabase.addApplicationFont()` in PySide6 6.8.3 on macOS Sequoia 15.3.2 (Python 3.12.0), the function either returns `-1` or crashes the application with signal 11 (SIGSEGV), even though the font file is valid.
        1. Steps to Reproduce
          1. Use a valid `.ttf` font (e.g., NotoSans-Italic.ttf)
          2. Call `QFontDatabase.addApplicationFont("/absolute/path/to/font.ttf")`
          3. Observe that:
              - Either it returns -1,
              - Or the app crashes with SIGSEGV
        1. Notes
      • Font file opens fine with system tools (e.g. `file`, Font Book)
      • Works correctly when loaded via `.qrc` resource system instead.
      • Tested on Apple Silicon(M3), Python 3.12.0, PySide6 6.8.3 and PySide6 6.9.0
      • Font engine crashes seem specific to recent Qt 6.8.x and 6.9.x
        1. Workaround
          Embedding the font using `.qrc` and accessing via `:/fonts/font.ttf` works without issues.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            chagatai Çağatay Genlik
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes