简体   繁体   中英

iphone c++ xcode 4.0 ios 4.3

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 (eg opensurf, opencv, tesseract).. when i updated to xcode 4.0 and ios 4.3 it was not working anymore.. it crashing inside the libraries.. eg in the opensurf library:

void FastHessian::interpolateStep(int r, int c, 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?

按照链接中的说明通过添加断点来跟踪和解决与malloc相关的问题http://www.drooljunkie.com/2010/03/beginning-iphone-app-dev-issues-part-3-double-free-errors /希望这会有所帮助

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM