debugging / loading a custom max object via scripting

Mar 13, 2007 at 3:38am

debugging / loading a custom max object via scripting

Oh Oracle!

I am developing a graphical Max object, and am having problems. The
major issue is that my object crashes Max on instantiation. However, if
there is already an instance of this object in a patch (i.e. you open a
patch with the object in it), it loads correctly. You can make copies
of the object in the normal option-drag manner, and they work correctly.

If anyone has had this kind of issue, and knows some troubleshooting
steps to solve it, advice would be appriciated.

Sub Issue:

To debug said object automatically from XCode, I must use Max Runtime as
my executable. Because my object only crashes Max on instantiation, not
from an object already loaded in patcher, I suppose I must create a new
instance of my object via Max Scripting. I can’t seem to figure out how
to make an instance of a user created external. I just have a
[loadbang] -> [message] -> [thispatcher] with the following in the
message box: script new user myobject 318 192 15 200 128 1 0 12…bunch
of other crap; This doesn’t seem to work, I get the message; “patcher:
doesn’t understand myobject”.

Help with this issue is also appreciated.

Thanks,

barry


barry threw
composition : sound : programming
http://www.barrythrew.com
bthrew(at)gmail(dot)com
857-544-3967

Today, Noise is triumphant and reigns sovereign over the sensibility of men.
- Luigi Russolo, The Art of Noises

#30780
Mar 13, 2007 at 3:47am

You want “script new user myobject blah blah blah”, i believe.

As for your development problem, I would look at the object’s menu
function or the way that you’re processing args to the object, since
it sounds like you may be passing bad/NULL/not enough/too much into
the new method from the menu method.

jb

Am 13.03.2007 um 04:38 schrieb Barry Threw:

> Oh Oracle!
>
> I am developing a graphical Max object, and am having problems.
> The major issue is that my object crashes Max on instantiation.
> However, if there is already an instance of this object in a patch
> (i.e. you open a patch with the object in it), it loads correctly.
> You can make copies of the object in the normal option-drag manner,
> and they work correctly.
>
> If anyone has had this kind of issue, and knows some
> troubleshooting steps to solve it, advice would be appriciated.
>
> Sub Issue:
>
> To debug said object automatically from XCode, I must use Max
> Runtime as my executable. Because my object only crashes Max on
> instantiation, not from an object already loaded in patcher, I
> suppose I must create a new instance of my object via Max
> Scripting. I can’t seem to figure out how to make an instance of a
> user created external. I just have a [loadbang] -> [message] ->
> [thispatcher] with the following in the message box: script new
> user myobject 318 192 15 200 128 1 0 12…bunch of other crap;
> This doesn’t seem to work, I get the message; “patcher: doesn’t
> understand myobject”.
>
> Help with this issue is also appreciated.
>
> Thanks,
>
> barry
>
> —
> barry threw
> composition : sound : programming
> http://www.barrythrew.com bthrew(at)gmail(dot)com
> 857-544-3967
>
> Today, Noise is triumphant and reigns sovereign over the
> sensibility of men.
> – Luigi Russolo, The Art of Noises
>

#98975
Mar 13, 2007 at 5:12am

Thanks, the scripting works. In fact, the object instantiates correctly
when called via Max scripting. The crash only occurs when the object is
instantiated from a object box.

I’ll look into the null argument possibility. It sounds very promising.
I’m not so good at this graphical Max object thing yet….

Thanks so much.

b

Jeremy Bernstein wrote:
> You want “script new user myobject blah blah blah”, i believe.
>
> As for your development problem, I would look at the object’s menu
> function or the way that you’re processing args to the object, since it
> sounds like you may be passing bad/NULL/not enough/too much into the new
> method from the menu method.
>
> jb
>
> Am 13.03.2007 um 04:38 schrieb Barry Threw:
>
>> Oh Oracle!
>>
>> I am developing a graphical Max object, and am having problems. The
>> major issue is that my object crashes Max on instantiation. However,
>> if there is already an instance of this object in a patch (i.e. you
>> open a patch with the object in it), it loads correctly. You can make
>> copies of the object in the normal option-drag manner, and they work
>> correctly.
>>
>> If anyone has had this kind of issue, and knows some troubleshooting
>> steps to solve it, advice would be appriciated.
>>
>> Sub Issue:
>>
>> To debug said object automatically from XCode, I must use Max Runtime
>> as my executable. Because my object only crashes Max on
>> instantiation, not from an object already loaded in patcher, I suppose
>> I must create a new instance of my object via Max Scripting. I can’t
>> seem to figure out how to make an instance of a user created
>> external. I just have a [loadbang] -> [message] -> [thispatcher] with
>> the following in the message box: script new user myobject 318 192 15
>> 200 128 1 0 12…bunch of other crap; This doesn’t seem to work, I
>> get the message; “patcher: doesn’t understand myobject”.
>>
>> Help with this issue is also appreciated.
>>
>> Thanks,
>>
>> barry
>>
>> –barry threw
>> composition : sound : programming
>> http://www.barrythrew.com bthrew(at)gmail(dot)com
>> 857-544-3967
>>
>> Today, Noise is triumphant and reigns sovereign over the sensibility
>> of men.
>> – Luigi Russolo, The Art of Noises
>>
>
>


barry threw
composition : sound : programming
http://www.barrythrew.com
bthrew(at)gmail(dot)com
857-544-3967

Today, Noise is triumphant and reigns sovereign over the sensibility of men.
- Luigi Russolo, The Art of Noises

#98976
Mar 13, 2007 at 8:04am

*ANSWER*

it’s very simple. you have to have *ALL* non JS graphical objects in the Cycling ’74/Max-Startup folder. It must reside in the max bar or it’ll cause an error when you type the name in.

Try moving toggle.mxe to the externals folder, starting max and typing toggle into an object box, you’ll get the same error.

#98977
Mar 13, 2007 at 8:34am

*DENIED*

Hate to break it to you, but my object is in the max-startup folder.

b

jamez wrote:
> *ANSWER*
>
> it’s very simple. you have to have *ALL* non JS graphical objects in the Cycling ’74/Max-Startup folder. It must reside in the max bar or it’ll cause an error when you type the name in.
>
> Try moving toggle.mxe to the externals folder, starting max and typing toggle into an object box, you’ll get the same error.
>


barry threw
composition : sound : programming
http://www.barrythrew.com
bthrew(at)gmail(dot)com
857-544-3967

Today, Noise is triumphant and reigns sovereign over the sensibility of men.
- Luigi Russolo, The Art of Noises

#98978
Mar 13, 2007 at 9:31am

+_+

LAME! (and i was so damn sure)

#98979

You must be logged in to reply to this topic.