Forums > Dev

bug ? "unknown argument combination"

Apr 23 2013 | 10:39 am


If I have 5 arguments or more (code below), my object (built with sdk 5.1.7) won’t be instantiated in Max 6.1.2, and I get the following error :

Test: 139810: unknown argument combination

If I remove 1 argument it gets instantiated correctly. So has Max 6.1.2 introduced a limitation on the number of arguments ?

With Max 5 or Max 6.0.8 everything is fine.

I know I can use (t_symbol *s, short ac, t_atom *av), but is there any reason the code below won’t work in max 6.1 while it was working in earlier version?

#include "ext.h"
#include "ext_obex.h"


void *Test_class;

typedef struct _Test
	t_object x;

} t_Test;

void *Test_new (double a, double b, double c, double d, double e);


int main (void)
    t_class *c;
    c = class_new ("Test", (method) Test_new, (method) NULL, (long) sizeof (t_Test),

    class_register (CLASS_BOX, c);
    Test_class = c;


void *Test_new ( double a, double b, double c, double d, double e)
    return (t_Test *) object_alloc (Test_class);
Apr 23 2013 | 1:59 pm

It has alway been a dark place ;-) Using A_GIMME signature is highly recommended, and will work fine with 5.1.7 as well.

Apr 23 2013 | 5:00 pm

Hey, at least Max gives an error message now! Back in the old days your object would instantiate, but the parameters at instantiation time were garbage.

It’s interesting to see that this problem is still alive. But I went over to A_GIMME for this sort of thing, well, in about Max 3.5 days. As much as A_DEFFLOAT & Co. are convenient, A_GIMME gives you more control over default handling at the end of the day. And Joshua wrote some macros to ease the pain. They must be floating around one of the ext_XXX.h header files. (I wrote my own before JKC’s were around, and I keep on using them, mostly to annoy the C74 folk).


[Just kidding about that last bit!!!!] :-) :-)

Viewing 3 posts - 1 through 3 (of 3 total)

Forums > Dev