OpenGL freezes during long term use

Started by
6 comments, last by LSStudio 16 years, 12 months ago
Hello I have an OpenGL based application designed to run 24/7 with no user interaction. On the Windows platform the application 'freezes' after no more than two weeks. The freeze is characterized by the drawing no longer updating, the application becoming unresponsive and the CPU load dropping to near zero. Since there is no crash report and my own logs show normal error free operation until the freeze I am now at a loss as to how to track down the cause. I have tried both ATI and Nvidia hardware and Pentium 4 and CoreDuo hardware (all from Dell) with no luck. THe application opens a few Quicktime or AVI movies using DirectShow and textures them to quads with ARB shaders compositing the image together. Sometimes a live video input from DirectShow is also used. I have tried workarounds like detroying and recreating the windowed context once a day and even doing automated reboots without success. Any tips on how to track down the source, info on similar problems or even as hack that gets me closer to understanding the issue would be of great help. Thank you.
Advertisement
Automated reboots have no effect, but manual reboots fix things?
Could be a timer overflow bug or something, though I seriously doubt it.
Quote:Original post by Sneftel
Automated reboots have no effect, but manual reboots fix things?


The freeze will sometimes occur before the automated reboot happens so the screen sits frozen until the reboot. Since these are designed to run in public spaces that is undesirable. Such workarounds are not ideal especially since this is intended to replace machines which currently reboot nightly due to a memory leak someone else's code.

edited.
These problems are almost ALWAYS a memory leak (or some other reasource leak such as device contexts, windows, direct show buffers or whatever).

You often need a tool that helps find such things once your code base gets large. Years ago I used Numega BoundsChecker, but haven't used it in years. I think GlowCode is in this category of software. Others can recommend current options.

The timer possibility exists as well - but highly unlikely, if you are incrementing and number each time something occurs, and testing something via a comparison operator (ie timeElapsed = currentTime - previousTime), then when the timer or counter wraps around, the number will be negative - screws up lots of stuff.
If you can't fix the memory leak, you can buy some server remote-management hardware and use that to physically reboot the machine.
Quote:Original post by Ravuya
Could be a timer overflow bug or something, though I seriously doubt it.


Do you mean a timer in my code somewhere or in a driver? I am willing to check out any specific suggestions any of you have.

Thanks.

Memory usage seems fairly stable in the testing I have done. Wouldn't a memory leak drastically affect the OS as well? I can fire up other non-GL applications while mine is frozen and they seem to work properly.

I will keep an eye on any timers being used.

This topic is closed to new replies.

Advertisement