Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-94692

Crash when rendering certain SVGs when compiling with GCC 11.1 / mingw-w64 9.0.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P1: Critical
    • None
    • 6.1.1, 5.15
    • GUI: Painting, SVG Support
    • None
    • Windows

    Description

      When compiled with GCC 11.1 / mingw-w64 9.0.0 the latest releases of Qt 5 and Qt 6 seem to crash when rendering certain SVGs. The problem is only reproducible when targeting x86_64-w64-mingw32, not when targeting i686-w64-mingw32 or x86_64-pc-linux-gnu.

      Here's a minimal program to reproduce the issue and the backtrace: https://gist.github.com/Martchus/e526dc09c81bc48770af9ebb8844460b

      I've been adding the raw compiler invocation as a comment in the Gist so you see the flags I've been using. If you actually want to invoke it yourself you'll likely need to replace some paths (or just create a small CMake/qmake project).

      The comments within the Gist contain some further details like the exact Qt versions I've been using. However, the changes within Qt itself compared to my last Qt build with GCC 10.2.0 and mingw-w64 8.0.0 don't seem related. I assume that most likely a change in GCC causes this. The problematic code might still lie within Qt itself, though. I have checked the functions from the backtrace but I couldn't find any obvious mistakes which would cause e.g. undefined behavior.

      Note that only going back to the last Qt build (conducted using GCC 10.2.0 and mingw-w64 8.0.0) fixes the problem so I'm sure none of the other libraries are broken (even though it crashes in FreeType2 code it only crashes in code taken from FreeType2, not in actual FreeType2 code - see my further comments below for details).

      Attachments

        1. main.cpp
          15 kB
          martchus

        Issue Links

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

          Activity

            People

              vgt Eirik Aavitsland
              martchus martchus
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes