ofxThreadedImageLoader on Raspberry Pi

I am trying to run ofxThreadedImageLoader on the Pi, though the images are not loading properly (flickering between black frames). I tested the code on the mac and runs fine, but not on the pi. Here is the code: