# Revision history [back]

### ORB crashes on specific image.... how do I handle this correctly?

My code:

#0rb test
print img,type(img),img.shape,type(img[0][0])

OrbParams={"nfeatures":500,"scaleFactor":1.5,"nlevels":8,"edgeThreshold":31,"firstLevel":0,"WTA_K":2,
"scoreType":0,"patchSize":31}
ShinyMysteriousOrb=cv2.ORB(**OrbParams)

print ShinyMysteriousOrb.detectAndCompute(img,None)


Now this works fine for most images, but there is a specific one which triggers inconsistent behaviour.... Infrequently it works, mostly it crashes with either of the following errors:

• python: malloc.c:3637: _int_malloc: Assertion (unsigned long)(size) >= (unsigned long)(nb)' failed. Aborted (core dumped)
• Segmentation fault (core dumped)
• * Error in /usr/bin/python': corrupted double-linked list: 0x0000000004814ed0 *

On that last one there are three *'s on either side... but opencv answers interprets two of these as bold. Also note that with the third error the console hangs and won't release control back to me i have to control z it.

Console vomit:

jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
*** Error in /usr/bin/python': corrupted double-linked list: 0x0000000004814ed0 ***
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
[108, 168, 189, ...,  72, 135, 106],
[112,  48, 253, ..., 160,  70,  97],
...,
[167, 182, 237, ..., 237,  94, 245],
[237,  96, 221, ..., 241, 203, 161],
[247,  52, 233, ..., 253, 214, 247]], dtype=uint8))
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
python: malloc.c:3637: _int_malloc: Assertion (unsigned long)(size) >= (unsigned long)(nb)' failed.
Aborted (core dumped)
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
python: malloc.c:3637: _int_malloc: Assertion (unsigned long)(size) >= (unsigned long)(nb)' failed.
Aborted (core dumped)
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
Segmentation fault (core dumped)

 2 retagged berak 32993 ●7 ●81 ●312

### ORB crashes on specific image.... how do I handle this correctly?

My code:

#0rb test
print img,type(img),img.shape,type(img[0][0])

OrbParams={"nfeatures":500,"scaleFactor":1.5,"nlevels":8,"edgeThreshold":31,"firstLevel":0,"WTA_K":2,
"scoreType":0,"patchSize":31}
ShinyMysteriousOrb=cv2.ORB(**OrbParams)

print ShinyMysteriousOrb.detectAndCompute(img,None)


Now this works fine for most images, but there is a specific one which triggers inconsistent behaviour.... Infrequently it works, mostly it crashes with either of the following errors:

• python: malloc.c:3637: _int_malloc: Assertion (unsigned long)(size) >= (unsigned long)(nb)' failed. Aborted (core dumped)
• Segmentation fault (core dumped)
• * Error in /usr/bin/python': corrupted double-linked list: 0x0000000004814ed0 *

On that last one there are three *'s on either side... but opencv answers interprets two of these as bold. Also note that with the third error the console hangs and won't release control back to me i have to control z it.

Console vomit:

jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
*** Error in /usr/bin/python': corrupted double-linked list: 0x0000000004814ed0 ***
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
[108, 168, 189, ...,  72, 135, 106],
[112,  48, 253, ..., 160,  70,  97],
...,
[167, 182, 237, ..., 237,  94, 245],
[237,  96, 221, ..., 241, 203, 161],
[247,  52, 233, ..., 253, 214, 247]], dtype=uint8))
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
python: malloc.c:3637: _int_malloc: Assertion (unsigned long)(size) >= (unsigned long)(nb)' failed.
Aborted (core dumped)
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
python: malloc.c:3637: _int_malloc: Assertion (unsigned long)(size) >= (unsigned long)(nb)' failed.
Aborted (core dumped)
jonathan@jonathan-laptop:
[[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
...,
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]
[0 0 0 ..., 0 0 0]] <type 'numpy.ndarray'> (240, 320) <type 'numpy.uint8'>
Segmentation fault (core dumped)