If you're using OpenCV, you'd better get used to this max vanishing
with no trace thing. It's not Jitter that's doing it but OpenCV.
When OpenCV doesn't get proper arguments to a function, it kills
everything. This really sucks and the way I've handled it is by doing
a looksee in the OpenCV source with the debugger to make sure that my
args are correct. I haven't looked, but hopefully there are some
configuration params that can be set when initially compiling opencv
to prevent this heinous behavior. Otherwise, be very very careful.
Here's an example:
I was makeing an ecternal with a convolution kernel. If the kernel
width was even, it would kill max, if it was odd I was fine. Seems
like a minor and trivial thing, but it ain't minor when it kills max.
On 9/19/06, Mike Sayre wrote:
> Hi all,
> I've posted about this before, but have yet to find a solution. I've been trying to write some externals - some of them for MSP, and now I'm trying to work with some Jitter externals. I was using MingW, but after having a lot of problems with weird crashes, I've switched to Visual Studio. However, I am still having the same problems.
> I took a Jitter object that I knew to compile correctly AND work in Max exactly as intended. I gutted it and changed some names around, but left the bones of the instantiation routine unaltered. It compiles + links with no problems. When I start Max, I can use the File->Install command without a crash. However, when I attempt to instantiate the object, Max just vanishes without any error messages and nothing in the syslog. I am sitting here with two monitors comparing the code from the working object and the non-working object, and I can't find anything different about them other than names. This is obviously getting extremely frustrating. Can anyone tell me what's wrong with this?
> Mike Sayre
> Created using the haar-like Features algorithms of OpenCV, modified for Jitter
> last modified: 18-9-2006
> #include "jit.common.h"
> #include "max.jit.mop.h"
> typedef struct _max_jit_haarCascade
> t_object ob;
> void *obex;
> } t_max_jit_haarCascade;
> t_jit_err jit_haarCascade_init(void);
> void *max_jit_haarCascade_new(t_symbol *s, long argc, t_atom *argv);