Subject: MAX Digest - 26 Feb 1998 to 27 Feb 1998
Date: Sat, 28 Feb 1998 00:00:58 -0500
From: Automatic digest processor 
Reply-To: MAX - interactive music/multimedia standard environments
To: Recipients of MAX digests 

There are 5 messages totalling 183 lines in this issue.

Topics of the day:

  1. Temp File Crashes (2)
  2. Mouse positioned elegantly
  3. Max Toolbar
  4. More on Temp File Crashes


Date:    Fri, 27 Feb 1998 00:26:07 -0800
From:    David Zicarelli 
Subject: Temp File Crashes

The more than nine temp file bug has been in the program since
1991, and I've apparently made only unsuccessful attempts to
solve the problem. It sounds like from what people are saying
that System 8.1 may be a culprit, because unlike System 8.0,
it doesn't get rid of the stuff from the Temporary Items folder
(where the Max Temp files are stored) until you empty the
trash, although this doesn't exactly make any sense. This is
what systems prior to 7, or maybe 7.5 did too.

If I launch Max and "crash" it repeatedly by hitting the reset
switch on the computer, there isn't a problem using System 8.0
because each temp file is put in the trash in a separate folder.
In this case, Max makes a new file called Max Temp 1 each time.

So either you have to crash Max in a different way (which seems
unlikely) or System 8.1 is the issue. I don't have a copy of
System 8.1, but I'll get one and do some more testing.

And of course, I'll try to really fix the problem this time.

You may wonder what the temp file is about. It's actually
a stupid idea and I might get rid of it. Basically,
I thought that it would be better to keep all external
object resources in a single file rather than keep the
external object's resource files open. So all external
objects copy any resources they need into a temporary file.
I believe all the other programs in the world that work with
plug-ins don't do this. Whether any program has as many
plug-ins as Max does I don't know. There may be some advantage
to not having a hundred resource files open at the same time.

David Z.


Date:    Fri, 27 Feb 1998 20:13:26 +0100
From:    Garth Paine 
Subject: Mouse positioned elegantly

>Date:    Wed, 25 Feb 1998 23:15:29 +0000
>From:    "C. Todd Robbins" 
>Subject: Re: Elegant Solutions (thanks)
>Thanks for all the replys on how to make my mouse tell me where I am.
>The essential thing I needed was that
> ique-number
>trick. (Converting 2-D into 1-D, as Peter Castine says.)
>> You'll be able to do this sort of thing much more easily inside
>> a patcher window soon, by the way.
>> David Z.
>I can't wait.

These solutions to mouse position would also be of interest to me.  Any
chance of posting them on.



Sonic Residues detailed programme notes for concerts and installations now
on line at

Garth Paine
Composer, Sound Designer, Interactives
Museums, Dance, Film, Theatre
Phone 61 3 95259844 (W)
Fax 61 3 95275549

Immersive Virtual Environments


Date:    Fri, 27 Feb 1998 10:39:09 -0000
From:    Nick Rothwell 
Subject: Re: Temp File Crashes

> There may be some advantage
> to not having a hundred resource files open at the same time.

One possible advantage is that there's no risk of bollocksing the
individual object files if the system crashes in an uncomfortable

Regarding this Max Temp problem: I've never got past about Max Temp 2
since MAX is so stable, and I've only got there at all while
developing my own externals.

        Nick Rothwell, CASSIEL            contemporary dance projects            music synthesis and control

        NOTICE - this vessel has triple screws - keep clear of blades


Date:    Fri, 27 Feb 1998 07:13:37 -0500
From:    Roland Hemming <100414.2220@COMPUSERVE.COM>
Subject: Max Toolbar

>Take a look at the size of
>your "omenu" object... if it is around 5 MB in size, it's is a sure sign
>that you've had this problem. (!)

Does this mean we have a bug in omenu?

>From what you say it sounds like omenu is an unfortunate victim of MAX
when gets upset but let me know if you think omenu has a problem.



Date:    Fri, 27 Feb 1998 14:57:24 -0800
From:    David Zicarelli 
Subject: More on Temp File Crashes

Here's the part where I get to be embarrassed.

One question you might have is, "why does Max not delete the
temp file if it finds one with the same name already there?"

This is due to the fact that it might be "open" either because another
copy of Max is running or a crashed copy of Max left it open.
In either case, it can't be deleted. I do however, make an effort
to delete the file.

In any case, if the file can't be deleted, I generate a new file
name by trying a higher number after the words "Max Temp." But this
was done by incrementing the value of an ASCII character at the
location of the "1" in "Max Temp 1"

This works fine up to a value of 9, but the character whose
ASCII value is one higher than "9" is ":"--and this is illegal
to use in a filename (it is used to specify a file path).

So, this causes a big failure of the attempt to create a temp
file. That wouldn't be so bad, if the code that comes after that
were able to deal with this condition.

It basically notes whether a temp file exists when resources
(like assistance strings and dialog box layouts) are being
copied out of externals. If so, the destination for the
resource copy is set to the temp file. Otherwise, it's just
duplicated within the external object file! That's really useful.

Another thing that has to be written out to the temp file is
a set of icon resources to display the items in the patcher window
palette, since this is the only way to build a pop-up menu
when the icons run off the right side. So, when these disappear
this is a symptom of the same problem. The thing is, these
too were copied to a file, but again it turns out to be
some random resource file which, if it's the external object's
resource file, is closed after the icon is added. Crashes occur
when clicking in non-existent icons because the code never
expected that the icon resources wouldn't be there.

Anyway, I have made an attempt to remedy all of these problems.
Basically, you'll be able to make several million different temp
files before you need to empty the trash. But, if for some reason
one can't be created, lots of errors will be generated in the Max
window and no improper inflating of external object files will

I'll test it for a few days and then release a new revision.

David Z.


End of MAX Digest - 26 Feb 1998 to 27 Feb 1998