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

Accessing QFontComboBox causes SIGSEGV if wrong/non existing font had been set with setCurrentFont()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P1: Critical
    • None
    • 6.2.2
    • GUI: Font handling
    • None
    • Linux Mint '5.4.0-91-generic #102-Ubuntu SMP Fri Nov 5 16:31:28 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux'
      Windows 10 English
      Windows 10 German
    • Linux/X11, Windows

    Description

      Problem: QFontComboBox causes a segmentation fault if a non-existent font had been set with setCurrentFont().

       

      Steps to reporoduce:

      1. Create object QFont tableFont
      2. Set the object to a non-existing font, e.g. by restoring settings with QSettings that does not provide a default value. 
      3. Create object QFontComboBox  comboFont
      4. Set said font object to  QFontComboBox by using comboFont.setCurrentFont(tableFont)
      5. Watch Qt producing the following error:
        QFont::fromString: Invalid description ',-1,-1,5,400,0,0,0,0,0,0,0,0,0,0,1'
      6. Access comboFont. , e.g. by setting {{comboFont.}}setFontFilters(QFontComboBox::ProportionalFonts)
      7. Segmentation fault occurs on both Windows and Linux. 

       

      See attached backtraces for the GUI thread. 

      Attachments

        1. Backtrace Linux.txt
          10 kB
          mborsuk
        2. Backtrace Windows.txt
          11 kB
          mborsuk
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            mborsuk mborsuk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes