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

Regression in QtOpenGL text drawing causing crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P0: Blocker
    • 4.8.0
    • 4.8.0
    • GUI: OpenGL
    • None
    • Windows, Symbian
    • 207fb45ce7bac66ab53a0770d2bfb50d8d1997d8

    Description

      QGLWindowSurface destructor destroys used contexts but QGLContext destructor doesn't clear its pointer which is stored in cached QGLTextureGlyphCache. In Qt4.8 QGLTextureGlyphCache implementation is QGLContextGroupResourceBase based but QGLContextGroupResourceBase::cleanupResources never executes QGLTextureGlyphCache::freeResource because group thinks that context is still shared, although it has been destroyed for good. In Qt4.7 QGLTextureGlyphCache wasn't QGLContextGroupResourceBase based. Example attached.

      Crash can be reproduced with glglyphcache_crash example. Run example, Show Window2 -> Delete Window1 -> Show Window1 -> crash

      Crash occurs in QGL2PaintEngineExPrivate::drawCachedGlyphs which calls cache->width() which in turn refers to destroyed context

      In addition to Windows and Symbian, crash happens on all platforms which use QGLWindowSurface implementation (Meego and some others but haven't tested on them)

      Attachments

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            jhautaka Jani Hautakangas
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: