Forums - fcvNCCPatchesOnRectu8 crashes randomly

4 posts / 0 new
Last post
fcvNCCPatchesOnRectu8 crashes randomly
irishbam
Join Date: 19 Apr 17
Posts: 5
Posted: Mon, 2021-09-13 21:12

Hi, fcvNCCPatchesOnRectu8 sometimes crash for me. I have checked the input requirements and also print the input parameters, and it seems the crash happens randomly.

Here's the code I used to log parameter values. 


LOG("%d, "
    "%x, %d, %d, "
    "%x, %d, %d, %d, "
    "%d, %d, "
    "%d, %d ",
    gettid(),
    patch.data, patch.cols, patch.rows,
    searchMat.data, searchMat.cols, searchMat.rows, srcStride,
    searchCenterX, searchCenterY,
    searchWidth, searchHeight);
fcvStatus result = fcvNCCPatchesOnRectu8(patch.data, patch.cols, patch.rows,  // patchWidth * patchHeight must be <= 256
   searchMat.data, searchMat.cols, searchMat.rows, srcStride,
   &searchCenterX, &searchCenterY,
   searchWidth, searchHeight,
   0,  // filterLowVariance
   &bestX, &bestY,
   &bestNCC,
   m_useSubPixelEstimation,  // findSubPixel
   &subX, &subY,
   1   // numSearches
);
 

and the log looks like this:

2021-09-08 14:25:04.141 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9303cc00, 8, 8, 23043d00, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.141 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93033640, 8, 8, 23043d00, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.142 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 930455c0, 8, 8, 23043d00, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.143 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93038ac0, 8, 8, 23043d00, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.143 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9302d000, 8, 8, 23043d00, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.144 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93047780, 8, 8, 23043d00, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.145 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93048d80, 8, 8, 23043d00, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.145 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93030040, 8, 8, 23043d00, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.337 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, e2fb2140, 16, 16, 3305e200, 33, 33, 40, 16, 16, 17, 17 
2021-09-08 14:25:04.383 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9303ae00, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.384 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93027940, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.384 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93028ec0, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.385 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93034100, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.386 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93020840, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.387 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9302c280, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.388 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93032b00, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.389 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9303e0c0, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.390 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9302f980, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.390 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93027b00, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.391 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 92fd8040, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.392 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9302f2c0, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.393 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93007740, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.394 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9302dfc0, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.394 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9301d340, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.395 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 93039300, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.396 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/ImageProcessing: 13589, 9304dc40, 8, 8, 2308a6c0, 27, 27, 32, 13, 13, 19, 19 
2021-09-08 14:25:04.396 32264-13589/com.imagemetrics.livedriversdksandboxandroid E/fastcv_lib_log: vendor/qcom/proprietary/fastcv-noship/src/cpu/[email protected]: (yL <= yCtr && yCtr >= yR) || (yL >= yCtr && yCtr <= yR) Assertion failed
2021-09-08 14:25:04.407 32264-32264/com.imagemetrics.livedriversdksandboxandroid A/libc: FORTIFY: pthread_mutex_lock called on a destroyed mutex (0x750c234498)
2021-09-08 14:25:04.407 32264-32264/com.imagemetrics.livedriversdksandboxandroid A/libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 32264 (ksandboxandroid), pid 32264 (ksandboxandroid)

 

The input parameters to the function is a 8x8 patch with a 27x27 src.
All parameter seems to be normal when it crashed.

This assertion [email protected]: (yL <= yCtr && yCtr >= yR) || (yL >= yCtr && yCtr <= yR) Assertion failed seems to be the cause.

Is there anything I did wrong or anything I can do to avoid this crash, thanks.

  • Up0
  • Down0
jeff4s Moderator
Join Date: 4 Nov 12
Posts: 106
Posted: Mon, 2021-09-13 23:03

Hi,

You can try the other API: fcvNCCPatchOnSquare8x8u8_v2

Cheers,

-Jeff

  • Up0
  • Down0
irishbam
Join Date: 19 Apr 17
Posts: 5
Posted: Tue, 2021-09-14 11:29

Hi, thanks Jeff for fast reply.

For fcvNCCPatchOnSquare8x8u8_v2, the search window `search_w` must be 11 or less, and unfortunayely we have 19 in this case.

Is there any information we can extract from this `fcvNCCPatchesOnRectu8` assertion 
[email protected]: (yL <= yCtr && yCtr >= yR) || (yL >= yCtr && yCtr <= yR)?
Like variabce too low or couldn't find a match or something?

Thanks,
  • Up0
  • Down0
irishbam
Join Date: 19 Apr 17
Posts: 5
Posted: Tue, 2021-09-14 13:22

Another observatiobn, tried passing the same parameters to both `fcvNCCPatchOnSquare8x8u8_v2` (prefixed w/ 0 in the log) and `fcvNCCPatchesOnRectu8` (prefixed w/ 1), and `fcvNCCPatchesOnRectu8` would fail while `fcvNCCPatchOnSquare8x8u8_v2` give result.

          LOG("0 %x, %d, %d, "
              "%x, %d, %d, %d, "
              "%d, %d, "
              "%d, %d "
              "%d, %d",
            patch.data, patch.cols, patch.rows,
            searchMat.data, searchMat.cols, searchMat.rows, srcStride,
            searchCenterX, searchCenterY,
            searchWidth, searchHeight,
            bestX, bestY);

 
2021-09-14 13:16:19.081 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 0 2c4752c0, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 16, 17
2021-09-14 13:16:19.081 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 1 2c4752c0, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 16, 17
2021-09-14 13:16:19.081 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 0 2c4b5f80, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 8, 15
2021-09-14 13:16:19.081 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 1 2c4b5f80, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 8, 15
2021-09-14 13:16:19.082 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 0 2c4c2340, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 11, 18
2021-09-14 13:16:19.082 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 1 2c4c2340, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 11, 18
2021-09-14 13:16:19.082 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 0 2c4c2580, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 14, 12
2021-09-14 13:16:19.082 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 1 2c4c2580, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 14, 12
2021-09-14 13:16:19.082 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 0 2c4bab40, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 17, 11
2021-09-14 13:16:19.082 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 1 2c4bab40, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 17, 11
2021-09-14 13:16:19.083 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 0 2c4c3b40, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 0, 0
2021-09-14 13:16:19.083 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 1 2c4c3b40, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 0, 0
2021-09-14 13:16:19.083 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 0 2c4b3dc0, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 18, 12
2021-09-14 13:16:19.083 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 1 2c4b3dc0, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 18, 12
2021-09-14 13:16:19.084 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 0 2c4741c0, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 0, 0
2021-09-14 13:16:19.084 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 1 2c4741c0, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 0, 0
2021-09-14 13:16:19.084 25529-28457/com.imagemetrics.livedriversdksandboxandroid D/ImageProcessing: 0 2c4bd2c0, 8, 8, bc531900, 27, 27, 32, 13, 13, 11, 11 15, 15
2021-09-14 13:16:19.084 25529-28457/com.imagemetrics.livedriversdksandboxandroid E/fastcv_lib_log: vendor/qcom/proprietary/fastcv-noship/src/cpu/[email protected]: (yL <= yCtr && yCtr >= yR) || (yL >= yCtr && yCtr <= yR) Assertion failed
 
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.