Results 1 to 12 of 12

Thread: QGLWidget bug

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget bug

    Quote Originally Posted by Wizard View Post
    I have installed openSUSE in VMWare with Qt 4.3.1. First time I think that there was no bugs... But if you will drag, resize, click, move mouse (use application) you will have segmentation fault error...
    I've tried resizing, clicking and moving the window, but it didn't crash.

    Quote Originally Posted by Wizard View Post
    QImage::detach() /home/wizard/qt-x11-opensource-src-4.3.1/src/gui/image/qimage.cpp:1320 0xb788f144
    6 QPainter::begin() /home/wizard/qt-x11-opensource-src-4.3.1/src/gui/painting/qpainter.cpp:1301 0xb78daeff
    Hmm... these two methods are always present in the backtrace. What happens if you change the code this way:
    Qt Code:
    1. painter.fillRect(0, 0, 50, 50, QColor(qrand()));
    2. painter.end(); // <-------
    3.  
    4. emit ImageReady(MyImage);
    To copy to clipboard, switch view to plain text mode 
    ?

  2. #2
    Join Date
    Aug 2007
    Location
    Russia
    Posts
    19
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget bug

    What happens if you change the code this way:
    Qt Code:
    1. painter.fillRect(0, 0, 50, 50, QColor(qrand()));
    2. painter.end(); // <-------
    3.  
    4. emit ImageReady(MyImage);
    To copy to clipboard, switch view to plain text mode 
    ?
    The same bug. First, QPainter::end() was called automatically. Second, bug is near OpenGL, because after changing inheritance to QWidget all works...

  3. #3
    Join Date
    Oct 2006
    Posts
    279
    Thanks
    6
    Thanked 40 Times in 39 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QGLWidget bug

    This looks like a bug to me.
    It seems qt_gl_clean_cache() isn't reentrant since it accessess the
    static QGLTextureCache *qt_tex_cache(qgl.cpp) without trying to protect it with a mutex. They don't even use the QGLOBALSTATIC macro. You should submit a bug report.

  4. The following user says thank you to spud for this useful post:

    Wizard (31st August 2007)

  5. #4
    Join Date
    Aug 2007
    Location
    Russia
    Posts
    19
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGLWidget bug

    May be they don't use it for performance reasons? I send bug report to Trolltech...
    Thanks for advice )
    Last edited by Wizard; 31st August 2007 at 10:08. Reason: spelling error

  6. #5
    Join Date
    Aug 2007
    Location
    Russia
    Posts
    19
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Lightbulb Re: QGLWidget bug

    I've designed some workaround for this bug ) Just half an hour was enough...
    Attached Files Attached Files

Similar Threads

  1. Transparent window with QGLWidget
    By ultr in forum Qt Programming
    Replies: 4
    Last Post: 28th April 2008, 07:01
  2. why linking problem with QGLWidget???
    By Shuchi Agrawal in forum Newbie
    Replies: 17
    Last Post: 16th March 2007, 10:45
  3. Transparent QWidget on QGLWidget
    By showhand in forum Qt Programming
    Replies: 2
    Last Post: 27th November 2006, 01:00
  4. QGLWidget on another QGLWiget
    By showhand in forum Qt Programming
    Replies: 1
    Last Post: 23rd October 2006, 09:59
  5. QGLWidget with multiple monitors
    By Rayven in forum Qt Programming
    Replies: 3
    Last Post: 4th August 2006, 10:28

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.