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

QGLWidget::renderText() gets the program to crash of font size is changed in a specific way

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 4.8.0
    • Widgets: GraphicsView
    • None
    • Windows 7 64, XP 32

    Description

      In the function QGLWidget::renderText(), if the font size supplied to the function is 0, the function takes a default font size and draws the text in the OpenGL scene. The problem I'm presenting here is the case between font size 0 and font sizes more than zero. In OpenGL scenes, one sometimes needs to change the size of the objects in the scene using glScaled() (or any equivalent function) to give the illusion of objects going far away and coming closer. And since text is not effected by glScaled(), the developer has to do it manually by adding a scale coefficient beside the font's size. I have implemented this idea in my own simulation, and got segmentation faults when the font is small enough.

      In the file attached, I present the abstract problem in the grabber example provided in QtSDK 1.2. I just added a text to that simulation, and with the mousewheel, the text size changes. Surprisingly, the program crashes with a segmentation fault at some text size greater than zero, where this doesn't make sense, since zero font size is supported.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            thedestroyer Samer Afach
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes