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

Rendering SVG icon in QFileBox on Fedora22 crashes Qt

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 5.12.10, 5.15.1, 6.0.0
    • 5.5.1
    • SVG Support
    • None
    • Fedora 22 default install
    • 78cbbc1aa3a4802b2eeec8b5abfe196e05df1b16, 5366939f9 (dev), b116901f3 (6.9), 30ec80ae3 (tqtc/lts-6.8), 2aa8a765c (tqtc/lts-6.5)

    Description

      file box attempts to read svg icon /usr/share/icons/breeze/places/22/usr-home.svg. There are things in that SVG that set width to zero

      This patch was made (probably not right) to avoid the problem:

      diff -r qt-everywhere-opensource-src-5.5.1/qtsvg/src/svg/qsvghandler.cpp ../qt-everywhere-opensource-src-5.5.1/qtsvg/src/svg/qsvghandler.cpp
      3005,3006c3005,3006
      <     nrx *= (100/(bounds.width()/2));
      <     nry *= (100/(bounds.height()/2));
      ---
      >     if(bounds.width()) nrx *= (100/(bounds.width()/2));
      >     if(bounds.height()) nry *= (100/(bounds.height()/2));
      

      if this isn't there, QT gets FPE when dividing by zero

      Note that this SVG is rendered correctly by KDE and even emacs.

      Attachments

        1. user-home.svg
          9 kB
        2. qt-5.15.0-qtsvg-zero-diff.patch
          0.6 kB
        3. patch_qsvghandler
          0.6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rlohning Robert Löhning
            hoppy0801 Clay Hopperdietzel
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes