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

Crash/Assert rendering text with emoji when style is set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • 6.2.13
    • 5.14.0, 6.2.12
    • GUI: Text handling
    • None
    • Linux/X11
    • 9d0f9c038 (tqtc/lts-5.15), f7e487566 (tqtc/lts-6.2)

    Description

      import QtQuick 2.5
      
      Text {
          textFormat: Text.PlainText
          text: "�"
          font.family: "Noto Color Emoji"
          style: Text.Raised // deleting this "solves" the issue
      }
      

       

      (Jira renders that wrong, but the text is a smiley face UTF-8 emoji)

       

      Asserts with:

       
      #4 0x00007ffff5533b98 in qt_assert (assertion=0x7ffff21eff5b "format == Format_A8", 
       file=0x7ffff21efc20 "/home/david/projects/qt5/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp", line=1161)
       at /home/david/projects/qt5/qtbase/src/corelib/global/qglobal.cpp:3342
       #5 0x00007ffff217c75e in QFontEngineFT::loadGlyph (this=0x7fffdc12e470, set=0x0, glyph=882, subPixelPosition=..., 
       format=QFontEngine::Format_Mono, fetchMetricsOnly=false, disableOutlineDrawing=true)
       at /home/david/projects/qt5/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp:1161
       #6 0x00007ffff21800bf in QFontEngineFT::loadGlyphFor (this=0x7fffdc12e470, g=882, subPixelPosition=..., format=QFontEngine::Format_Mono, t=..., 
       fetchBoundingBox=false, disableOutlineDrawing=true)
       at /home/david/projects/qt5/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp:1871
       #7 0x00007ffff21801f8 in QFontEngineFT::alphaMapForGlyph (this=0x7fffdc12e470, g=882, subPixelPosition=..., t=...)
       at /home/david/projects/qt5/qtbase/src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp:1887
       #8 0x00007ffff6abf7c7 in QTextureGlyphCache::textureMapForGlyph (this=0x7fffdc004200, g=882, subPixelPosition=...)
       at /home/david/projects/qt5/qtbase/src/gui/painting/qtextureglyphcache.cpp:272
       #9 0x00007ffff6b6ee23 in QOpenGLTextureGlyphCache::fillTexture (this=0x7fffdc004200, c=..., glyph=882, subPixelPosition=...)
       at /home/david/projects/qt5/qtbase/src/gui/opengl/qopengltextureglyphcache.cpp:438
       #10 0x00007ffff6abf65f in QTextureGlyphCache::fillInPendingGlyphs (this=0x7fffdc004200)
       at /home/david/projects/qt5/qtbase/src/gui/painting/qtextureglyphcache.cpp:254
       #11 0x00007ffff7a4113e in QSGTextMaskMaterial::populate (this=0x7fffdc131180, p=..., glyphIndexes={...}, glyphPositions={...}, 
       geometry=0x7fffdc12f490, boundingRect=0x7fffe4b4e170, baseLine=0x7fffdc12f478, margins=...)
       at /home/david/projects/qt5/qtdeclarative/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp:803
       #12 0x00007ffff7a3bf91 in QSGDefaultGlyphNode::update (this=0x7fffdc12f380)
       at /home/david/projects/qt5/qtdeclarative/src/quick/scenegraph/qsgdefaultglyphnode.cpp:102
       #13 0x00007ffff7b630ab in QQuickTextNode::addGlyphs (this=0x7fffdc1329a0, position=..., glyphs=..., color=..., style=QQuickText::Raised, 
       styleColor=..., parentNode=0x0) at /home/david/projects/qt5/qtdeclarative/src/quick/items/qquicktextnode.cpp:117
       #14 0x00007ffff7b69980 in QQuickTextNodeEngine::addToSceneGraph (this=0x7fffe4b4e470, parentNode=0x7fffdc1329a0, style=QQuickText::Raised, 
       styleColor=...) at /home/david/projects/qt5/qtdeclarative/src/quick/items/qquicktextnodeengine.cpp:791
       #15 0x00007ffff7b63d15 in QQuickTextNode::addTextLayout (this=0x7fffdc1329a0, position=..., textLayout=0x555556004fc8, color=..., 
       style=QQuickText::Raised, styleColor=..., anchorColor=..., selectionColor=..., selectedTextColor=..., selectionStart=-1, selectionEnd=-1, 
       lineStart=0, lineCount=1) at /home/david/projects/qt5/qtdeclarative/src/quick/items/qquicktextnode.cpp:273
       #16 0x00007ffff7b5c2ac in QQuickText::updatePaintNode (this=0x555555cf2d80, oldNode=0x0, data=0x555555f5be20)
       at /home/david/projects/qt5/qtdeclarative/src/quick/items/qquicktext.cpp:2442
       #17 0x00007ffff7aee676 in QQuickWindowPrivate::updateDirtyNode (this=0x555555f5bc80, item=0x555555cf2d80)
       at /home/david/projects/qt5/qtdeclarative/src/quick/items/qquickwindow.cpp:3654
       #18 0x00007ffff7aed2d5 in QQuickWindowPrivate::updateDirtyNodes (this=0x555555f5bc80)
       at /home/david/projects/qt5/qtdeclarative/src/quick/items/qquickwindow.cpp:3399
       #19 0x00007ffff7addb4c in QQuickWindowPrivate::syncSceneGraph (this=0x555555f5bc80)
       at /home/david/projects/qt5/qtdeclarative/src/quick/items/qquickwindow.cpp:448
       #20 0x00007ffff7a66b23 in QSGRenderThread::sync (this=0x555555f64050, inExpose=true, inGrab=false)
       

       

      Or without the assert crashes with:

      0 0x00007f6bcecdfce5 in raise () at /usr/lib/libc.so.6
      #1 0x00007f6bcecc9857 in abort () at /usr/lib/libc.so.6
      #2 0x00007f6bced232b0 in __libc_message () at /usr/lib/libc.so.6
      #3 0x00007f6bced2a74a in () at /usr/lib/libc.so.6
      #4 0x00007f6bced2d6b4 in _int_malloc () at /usr/lib/libc.so.6
      #5 0x00007f6bced2efb9 in malloc () at /usr/lib/libc.so.6
      #6 0x00007f6bcdae904b in QImageData::create(QSize const&, QImage::Format) () at /usr/lib/libQt5Gui.so.5
      #7 0x00007f6bcdae918d in QImage::QImage(QSize const&, QImage::Format) () at /usr/lib/libQt5Gui.so.5
      #8 0x00007f6bcdae91ca in QImage::QImage(int, int, QImage::Format) () at /usr/lib/libQt5Gui.so.5
      #9 0x00007f6bcdaea13c in QImage::copy(QRect const&) const () at /usr/lib/libQt5Gui.so.5
      #10 0x00007f6bcdaea6a5 in QImage::detach() () at /usr/lib/libQt5Gui.so.5
      #11 0x00007f6bcdaebe7b in QImage::setColor(int, unsigned int) () at /usr/lib/libQt5Gui.so.5
      #12 0x00007f6bc6d5a968 in () at /usr/lib/libQt5XcbQpa.so.5
      #13 0x00007f6bcddb60de in QTextureGlyphCache::textureMapForGlyph(unsigned int, QFixed) const () at /usr/lib/libQt5Gui.so.5
      #14 0x00007f6bcde46bfe in QOpenGLTextureGlyphCache::fillTexture(QTextureGlyphCache::Coord const&, unsigned int, QFixed) () at /usr/lib/libQt5Gui.so.5
      #15 0x00007f6bcddb7dd5 in QTextureGlyphCache::fillInPendingGlyphs() () at /usr/lib/libQt5Gui.so.5
      #16 0x00007f6bcc1566d1 in () at /usr/lib/libQt5Quick.so.5
      #17 0x00007f6bcc1522eb in () at /usr/lib/libQt5Quick.so.5
      #18 0x00007f6bcc2271ce in QQuickTextNode::addGlyphs(QPointF const&, QGlyphRun const&, QColor const&, QQuickText::TextStyle, QColor const&, QSGNode*) (

       

       

       

      Attachments

        1. main.qml
          0.3 kB
        2. with-fontinfo.qml
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            davidedmundson David Edmundson
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes