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

Assert in qpaintengine_x11 when using native graphicssystem

    XMLWordPrintable

Details

    • f66df7b112b8626c5f1cbd19875d97e8c5de1f84

    Description

      The example application will assert if "native" graphics system is used. With "raster" graphics system it's running fine. The issue can be reproduced only with 4.8.x. With 4.7.4 and 5.0.2 it isn't crashing.

      Note:
      X11 must support render extension and fontconfig must be available.

      Backtrace:

      #0  0x00007ffff5fbc425 in raise () from /lib/x86_64-linux-gnu/libc.so.6
      #1  0x00007ffff5fbfb8b in abort () from /lib/x86_64-linux-gnu/libc.so.6
      #2  0x00007ffff68ec227 in qt_message_output (msgType=QtFatalMsg, 
          buf=0x6b2e38 "ASSERT: \"glyph->format == QFontEngineFT::Format_Mono\" in file painting/qpaintengine_x11.cpp, line 2298") at global/qglobal.cpp:2301
      #3  0x00007ffff68ec3bd in qt_message(QtMsgType, const char *, typedef __va_list_tag __va_list_tag *) (msgType=QtFatalMsg, 
          msg=0x7ffff6ab03a8 "ASSERT: \"%s\" in file %s, line %d", ap=0x7fffffff8c28) at global/qglobal.cpp:2347
      #4  0x00007ffff68ecb4d in qFatal (msg=0x7ffff6ab03a8 "ASSERT: \"%s\" in file %s, line %d") at global/qglobal.cpp:2530
      #5  0x00007ffff68ebdec in qt_assert (assertion=0x7ffff78b8908 "glyph->format == QFontEngineFT::Format_Mono", 
          file=0x7ffff78b87c0 "painting/qpaintengine_x11.cpp", line=2298) at global/qglobal.cpp:1996
      #6  0x00007ffff72e9a09 in path_for_glyphs (glyphs=..., positions=..., ft=0x6c84a0) at painting/qpaintengine_x11.cpp:2298
      #7  0x00007ffff72ea65f in QX11PaintEngine::drawFreetype (this=0x6537b0, p=..., ti=...) at painting/qpaintengine_x11.cpp:2438
      #8  0x00007ffff72e94f8 in QX11PaintEngine::drawTextItem (this=0x6537b0, p=..., textItem=...) at painting/qpaintengine_x11.cpp:2236
      #9  0x00007ffff720726a in QPainter::drawTextItem (this=0x7fffffffe0c0, p=..., _ti=...) at painting/qpainter.cpp:6689
      #10 0x00007ffff72051f8 in QPainter::drawText (this=0x7fffffffe0c0, p=..., str=..., tf=0, justificationPadding=0) at painting/qpainter.cpp:6154
      #11 0x00007ffff7203fb3 in QPainter::drawText (this=0x7fffffffe0c0, p=..., str=...) at painting/qpainter.cpp:5946
      #12 0x00000000004012cd in QPainter::drawText (this=0x7fffffffe0c0, x=0, y=0, s=...) at /usr/local/Trolltech/Qt-4.8.4/include/QtGui/qpainter.h:945
      #13 0x00000000004010b0 in main (argc=1, argv=0x604c90) at ../RenderExample/main.cpp:21
      
      main.cpp
      #include <QBitmap>
      #include <QPainter>
      #include <QApplication>
      #include <iostream>
      #include <vector>
      
      int main(int argc, char** argv)
      {
        // Force -graphicssystem native
        std::vector<char*> args;
        for (int i = 0; i != argc; ++i) args.push_back(argv[i]);
        args.push_back(const_cast<char*>("-graphicssystem"));
        args.push_back(const_cast<char*>("native"));
      
        argc = args.size();
        argv = &args[0];
        QApplication app(argc, argv);
      
        QBitmap bm(10,10);
        QPainter painter(&bm);
        painter.drawText(0, 0, "P");
      
        std::cout << "Hello World\n";
        return 0;
      }
      

      Attachments

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

        Activity

          People

            vgt Eirik Aavitsland
            kileppal Kimmo Leppälä
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes