ARMv6 rPi 2 - Raspbian - of 0.9.2 - image disappears after ~30 minutes

I set up and installed OF per the recommendations here. I’m drawing a png with transparency to the screen in my app. It renders as expected, but after about 30 minutes or so, the image disappears.

This happens in windowed and fullscreen modes. It’s not the screensaver or screen blanking kicking in as far as I can tell, as I’ve disabled the monitor going to sleep.

There’s nothing special about the code (you can see it below).

Any ideas what may be causing this, how to avoid it, or where to look for errors?

void ofApp::setup(){
    ofSetFrameRate(30);
    beachball.load("images/beachball.png");
    rot = 0.;
}

void ofApp::draw(){
    ofBackground(0);
    ofEnableAlphaBlending();
    ofPushMatrix();
        ofTranslate(ofGetWindowWidth()/2,ofGetWindowHeight()/2,0);
        beachball.setAnchorPercent(0.5f, 0.5f);
        ofRotate(rot);
        beachball.draw(0,0, 1000, 1000);
    ofPopMatrix();
    ofDisableAlphaBlending();
}

it really sounds like some kind of energy saving kicking in. even if you’ve disabled the monitor going to sleep, there’s a lower level energy saving in linux that sometimes doesn’t get disabled. you can usually disable it with:

xset s off
xset -dpms

you can add that to your .profile so it gets run when the raspberry starts.

That along with other tricks to setup a linux machine for installations is explained in this chapter of the ofBook: http://openframeworks.cc/ofBook/chapters/installation_up_4evr_linux.html if was written for desktop linux but a lot of things also apply for the raspberry

Thanks for the tips. Unfortunately, none of them worked for my program when loading the image, but the graphicsExample has now been up for about an hour with no issues. :confounded:

Any other thoughts?

can you post the full code? something that might be happening is that rot or something else is being increased so much that in overflows or something like that

Gah, you got it. I wasn’t resetting the rot variable. Now I know exactly how long it will take to overflow it.

Fixed it to reset after 360 degrees, and it ran all night long without issue.

Thanks for your help, pardon my brain for the noise.