Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: intermittent freezes, glPushAttrib

  1. #1
    Junior Member Regular Contributor
    Join Date
    Nov 2004
    Location
    San Diego, CA, USA
    Posts
    110

    intermittent freezes, glPushAttrib

    On certain machines running Windows, with Nvidia cards, our OpenGL code experienced intermittent freezes. That is, once in a while at irregular intervals, everything (including the mouse cursor) would freeze for maybe 3 to 8 seconds. We couldn't reproduce it on a PC with an ATI card, nor on a Mac with an Nvidia card.

    The problematic area of the code looked like this:

    Code :
    glPushAttrib( GL_LINE_BIT );
    glLineWidth( myWidth );
    DrawSomeLines();
    glPopAttrib();

    After changing it to the following, the problem went away:

    Code :
    glLineWidth( myWidth );
    DrawSomeLines();
    glLineWidth( 1.0f );

    And if I did this, the problem came back:

    Code :
    glPushAttrib( GL_LINE_BIT );
    glPopAttrib();
     
    glLineWidth( myWidth );
    DrawSomeLines();
    glLineWidth( 1.0f );

    Any of this ring any bells?

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2008
    Posts
    7

    Re: intermittent freezes, glPushAttrib

    I have expirienced the same probem, the machine was Laptop with nVidia Quadro card. The rendering flow was much more complecated than this one but once i removed push/pop-attrib all begin to works fine - yet i have no idea why it works like this with push/pop sequence.

  3. #3
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: intermittent freezes, glPushAttrib

    It can be that the driver allocated a block of ram to push/pop attribs, and a small memory leak cause the block to fill.
    Then the pause can be caused by the driver allocating a supplementary block ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •