I moved one of my project from a svn version of oF from january [early .06], to the preRelease of oF0.06. Everything is woking. I’m just now getting an error message when i quit the application.
openFrameworksDebug(13935,0xa07d5720) malloc: *** error for object 0x873e04: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
openFrameworksDebug(13935,0xa07d5720) malloc: *** error for object 0x874604: Non-aligned pointer being freed
*** set a breakpoint in malloc_error_break to debug
ofxThread: thread already stopped
Is that linked to the ofxThread ? I do not get the message “ofxThread: thread stopped” before the “ofxThread: thread already stopped”.
int main( ){
ofAppGlutWindow window;
ofSetupOpenGL(&window, WIDTH,HEIGHT, OF_WINDOW); // <-------- setup the GL context
// this kicks off the running of my app
// can be OF_WINDOW or OF_FULLSCREEN
// pass in width and height too:
ofRunApp( new testApp());
}
I don’t know if this is link to the error message, but why do I get “ofxThread: thread already stopped” even beore getting “ofxThread: thread stopped” ?
After running some tests this morning, I in fact don’t think that this error is linked to the use of ofxThread. I don’t have the message “ofxThread: thread already stopped” anymore. [I was not setting correctly one of the params of my app].
I’m now just getting the error about the “Non-aligned pointer being freed”.
I found what is producing this error.
It’s when I’m deleting a pointer to an ofPoint.
I have reproduced this in a “emptyExample” project.
Here is the testApp.h where i create an instance of the class “myObject”
....
#include "ofMain.h"
#include "myObject.h"
class testApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed (int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
myObject newObj;
};
Crap! This is what happens when you don’t look at the code correctly [without thinking].
Even if it was written “new ofPoint[10 * 10]”, I was in my head seeing “new ofPoint(10, 10)”.
Sorry about that.
Now my question becomes [even if does not really matters :], why was it not throwing the error with the version oF from mid-january ?