简体   繁体   English

iPhone C ++ Xcode 4.0 iOS 4.3

[英]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. 我有一个与xcode 3.2和ios 4.1完美运行的iphone项目。 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: 在这些项目中,我正在使用c ++和其他库(例如opensurf,opencv,tesseract)..当我更新到xcode 4.0和ios 4.3时,它不再起作用..它在库中崩溃..例如在opensurf库中:

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 malloc:*错误对象地址0x20000:被释放的指针没有被分配*向malloc_error_break调试设置断点

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 /希望这会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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