Forums > MaxMSP

maximum symbol length?

April 5, 2006 | 6:55 pm

I know about the much discussed maximum list length of 256, but is there
an official hard-coded maximum symbol length?

Printing a symbol 1032 characters long crashes for me, where a 1031
character symbol does not crash.

Example patch:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 157 49 86 196617 (no crash);
#P comment 181 209 86 196617 (crashes);
#P comment 94 209 86 196617 1032 characters;
#P window linecount 8;
#P message 49 225 400 196617
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiii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iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii iiiiiiiiiiiiiiiiiiiiiiiiiiiiii
iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiabcdef;
#P window linecount 1;
#P newex 19 355 32 196617 print;
#P comment 70 49 86 196617 1031 characters;
#P connect 2 0 1 0;
#P connect 3 0 1 0;
#P window clipboard copycount 7;

My system: OS X alumnium powerbook, OS 10.4.6, Max 4.5.7.

-charlie


April 5, 2006 | 8:06 pm

On 5-Apr-2006, at 20:55, Charlie wrote:
> I know about the much discussed maximum list length of 256, but is
> there
> an official hard-coded maximum symbol length?

Someone asked about this just a few weeks ago. I don’t know that
there was an official answer. It would be useful if there were one.

– P.

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter

iCE: Sequencing, Recording & |home | chez nous|
Interface Building for |bei uns | i nostri|
Max/MSP Extremely cool http://www.castine.de

http://www.dspaudio.com/


April 5, 2006 | 8:08 pm

Happy to say, I can’t reproduce… both prints fine here.

MaxMSP 4.57
G5 1.67 mHz


April 5, 2006 | 8:10 pm

if I add a lot more characters, I get crashes too :(


April 5, 2006 | 9:30 pm

> Printing a symbol 1032 characters long crashes for me, where a 1031
> character symbol does not crash.

The forums add spaces to the long symbols, and the email from the list
seems to be hard-wrapped at 1000 characters… so you might have to
remove the spaces to the patch I sent to get a crash. Or, just add a
lot more characters.

This may be just a "print" related bug, rather than something more
fundamental to max…

-charlie


April 5, 2006 | 9:51 pm

i heard from well informed sources (ddz) that the maximum length for
a symbol is 1999 (or was it 2000?) chars…

/*j


April 6, 2006 | 10:19 am

On 5-Apr-2006, at 23:51, /*j wrote:
> i heard from well informed sources (ddz) that the maximum length
> for a symbol is 1999 (or was it 2000?) chars…

From what you wrote, probably the buffer is 2000 chars, one of which
is the null terminator byte. So effectively 1999 charlen.

It might be a Good Thing if there were a #define somewhere in the SDK
headers so that all objects used the same bufsize. That said, text
parsing is usually handled by binbufs, so should be transparent to
external objects.

Another Good Thing might be if Max wouldn’t croak on Excessively
Enthusiastic Typing. Truncating strings is one thing, crashing another.

And Charlie’s crash was at a mere 1032 chars. Strange. Maybe the
print object has a different sized buffer? Unusual choice.

– P

————– http://www.bek.no/~pcastine/Litter/ ————-
Peter Castine +–> Litter Power & Litter Bundle for Jitter

iCE: Sequencing, Recording & |home | chez nous|
Interface Building for |bei uns | i nostri|
Max/MSP Extremely cool http://www.castine.de

http://www.dspaudio.com/


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