peterbraden/node-opencv — pull request #159 by LinusU (2014-09-07 15:37:49+00:00)
Title: added failing test for parallel processing

(related discussion: #156)

One of four things will happen when this test is run, seemingly at random.

1. The whole process terminates with a segmentation fault.
2. The whole process terminates with a `OpenCV Error: Bad flag`
3. The test fails because it failed to detect any faces, or detected too many faces.
4. The test passes (never seen this happened with the `limit = 16`)

Sample output:

```text
$ npm test

> opencv@0.5.0 test /Users/linus/node-opencv
> vows test/unit.js

·································[1] 24967 segmentation fault npm test
```
```text
$ npm test

> opencv@0.5.0 test /Users/linus/node-opencv
> vows test/unit.js

·································OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in cvGetMat, file /tmp/opencv-rp0FJY/opencv-2.4.9/modules/core/src/array.cpp, line 2482
libc++abi.dylib: terminating with uncaught exception of type cv::Exception: /tmp/opencv-rp0FJY/opencv-2.4.9/modules/core/src/array.cpp:2482: error: (-206) Unrecognized or unsupported array type in function cvGetMat

[1] 24977 abort npm test
```
```text
$ npm test

> opencv@0.5.0 test /Users/linus/node-opencv
> vows test/unit.js

·································✗

CascadeClassifier
✗ constructor
» An unexpected error was caught: expected expression to evaluate to true, but was false // unit.js:312
at /Users/linus/node-opencv/test/unit.js:312:22
at /Users/linus/node-opencv/test/unit.js:288:13
✗ Errored » 33 honored ∙ 1 errored (0.974s)

✗ Errored » callback not fired
in ImageDataStream pipe
in Smoke Tests OpenCV
in test/unit.jsnpm ERR! Test failed. See above for more details.
npm ERR! not ok code 0
```
```text
npm test

> opencv@0.5.0 test /Users/linus/node-opencv
> vows test/unit.js

··································
✓ OK » 34 honored (0.527s)
%
```