i have an iphone project which was perfectly running with xcode 3.2 and ios 4.1. inside these project i am using c++ and different libraries (e.g opensurf, opencv, tesseract).. when i updated to xcode 4.0 and ios 4.3 it was not working anymore.. it crashing inside the libraries.. e.g. in the opensurf library:
void FastHessian::interpolateStep(int r, int c, 开发者_JS百科ResponseLayer *t, ResponseLayer *m, ResponseLayer *b,
double* xi, double* xr, double* xc )
{
CvMat* dD, * H, * H_inv, X;
double x[3] = { 0 };
dD = deriv3D( r, c, t, m, b );
H = hessian3D( r, c, t, m, b );
H_inv = cvCreateMat( 3, 3, CV_64FC1 );
cvInvert( H, H_inv, CV_SVD ); // Program received signal: "SIGABRT"
cvInitMatHeader( &X, 3, 1, CV_64FC1, x, CV_AUTOSTEP );
cvGEMM( H_inv, dD, -1, NULL, 0, &X, 0 );
cvReleaseMat( &dD );
cvReleaseMat( &H );
cvReleaseMat( &H_inv );
*xi = x[2];
*xr = x[1];
*xc = x[0];
}
malloc: * error for object 0x20000: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug
any ideas? i think i am missing one or more settings in the build configuration?
Follow the instruction in the link to trace and solve malloc related issues by adding the breakpoint http://www.drooljunkie.com/2010/03/beginning-iphone-app-dev-issues-part-3-double-free-errors/ hope this helps
精彩评论