libopencv_imgproc.3.4.dylib crashes on MacOS 10.13.6 with MacPro 2010

asked 2020-01-12 01:22:28 -0600

When calling OpenCV findChessBoardCorners as part of a camera calibration JUnit test there is a crash on just one of my machines - a 12 core MacPro mid 2010.

What can be done to fix this?

My other two macs (Laptop, MacMini) with the same OS run fine. The openCV Version is from Macports 2.6.2

sudo port list opencv
opencv                         @3.4.8          graphics/opencv

This is the crash log:

 Stack: [0x0000700007072000,0x0000700007172000],  sp=0x000070000716dac0,  free space=1006k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [libopencv_imgproc.3.4.dylib+0x2088c6]  _ZN2cv7makePtrINS_12FilterEngineENS_3PtrINS_10BaseFilterEEENS2_INS_13BaseRowFilterEEENS2_INS_16BaseColumnFilterEEEiiiiEENS2_IT_EERKT0_RKT1_RKT2_RKT3_RKT4_RKT5_RKT6_+0x4e
C  [libopencv_imgproc.3.4.dylib+0x1b07c]  _ZN2cv12cpu_baseline15createBoxFilterEiiNS_5Size_IiEENS_6Point_IiEEbi+0x151
C  [libopencv_imgproc.3.4.dylib+0x1b6e3]  _ZN2cv15createBoxFilterEiiNS_5Size_IiEENS_6Point_IiEEbi+0xb0
C  [libopencv_imgproc.3.4.dylib+0x1b9b5]  _ZN2cv9boxFilterERKNS_11_InputArrayERKNS_12_OutputArrayEiNS_5Size_IiEENS_6Point_IiEEbi+0x287
C  [libopencv_imgproc.3.4.dylib+0x1e09bc]  _ZN2cv17adaptiveThresholdERKNS_11_InputArrayERKNS_12_OutputArrayEdiiid+0x470
C  [libopencv_calib3d.3.4.dylib+0x7ad6]  _ZN2cv21findChessboardCornersERKNS_11_InputArrayENS_5Size_IiEERKNS_12_OutputArrayEi+0x1626
C  [libopencv_java343.dylib+0x7de02]  Java_org_opencv_calib3d_Calib3d_findChessboardCorners_11+0x6a
j  org.opencv.calib3d.Calib3d.findChessboardCorners_1(JDDJ)Z+0
j  org.opencv.calib3d.Calib3d.findChessboardCorners(Lorg/opencv/core/Mat;Lorg/opencv/core/Size;Lorg/opencv/core/MatOfPoint2f;)Z+18
j  org.rcdukes.camera.CameraMatrix.findCorners(Lorg/opencv/core/Mat;IILorg/opencv/core/MatOfPoint2f;)Z+14
edit retag flag offensive close merge delete

Comments

When a program crashes on just one computer, usually the code has a bug that just triggers on given circumstances. So, you need to look again at the code that calls the function.

mvuori gravatar imagemvuori ( 2020-01-12 02:25:23 -0600 )edit

The openCV Version is from Macports

that's most likely the issue (opencv does not maintain this). try to uninstall and build from src

berak gravatar imageberak ( 2020-01-14 03:13:06 -0600 )edit

Thank you for the answers. I'd appreciate to start with the assumption that OpenCV indeed has bugs. My experience is that it crashes quite often on different platforms and circumstances so it does not help to assume that the circumstances are an issue. The code we are talking about is tested over an over with travis and other testcode on multiple platforms and runs mostly fine. If it does not on one platform and crashes badly then this shows how unrobust OpenCV is.

The macports build are just fine - it's good that a community is caring for the builds instead of all the individual errors that might show up when trying to build stuff from source. And indeed OpenCV unfortunately calls for this procedure much to often. There is much room for improvement here and I am hopeing the best.

seppl2010 gravatar imageseppl2010 ( 2020-01-14 07:15:08 -0600 )edit