I’ve been working with openframeworks for a little while now and hadn’t encountered this problem until today. When I use loadImage in ofApp.cpp’s setup function I have no problem and the image loads properly (thus, all of the examples work fine) so I know that the file path is correct. However, when I try to use ofLoadImage in a separate class function I get an EXC_BAD_ACCESS error on line 631 of ofImage.cpp which reads:
ofLogError("ofImage") << "loadImage(): couldn't load image from \"" << fileName << "\"";
which trickles down to line 76 of ofLog.h:
message << value << padding;
and so on. I assumed that this meant there was a problem with the type of the variable I was passing into the ofLoadImage argument but even when I try and call it statically from inside the class function I still get the error. Bizarre. Any help is most appreciated, thanks!