Forums > MaxMSP

Bad presentation mode crash in 5.0.3

June 28, 2008 | 4:50 pm

I had a patch in presentation mode, one object was selected. In the Inspector I unchecked the box "Include in Presentation". Max crashed, the patch was damaged. As I tried to open it Max said:
Test Preset: bad magic number
Test Preset: read failed error 0

I opened the damaged file in BBEdit, code looked ok, pasted it into a new Max patch. Saved/replaced the old file. Did not went well, as I reopened it Max complained about a bad header. Deleted the old file, new patcher, pasted the code and saved as a new file. I am back in the game. Unfortunately I could not reproduce the crash yet.

What is a magic number?


June 28, 2008 | 5:36 pm

> I had a patch in presentation mode, one object was selected. In the Inspector I unchecked the box "Include in Presentation". Max crashed

Do you remember what kind of object you were inspecting? There have been problems in the past with removing objects from a presentation. Perhaps we can track this one down if we know where to look.

Bad magic number is just a user-unfriendly way of saying the file is corrupted. We should try to make the error message more helpful.

David Z.


June 28, 2008 | 8:55 pm

Could you briefly explain what is a corrupt file?
since the max patches are text file …


June 28, 2008 | 9:06 pm

My guess is that the file is supposed to be text but it can’t be verified as valid UTF-8. This probably means it has garbage in it somewhere (another way of saying it is corrupt). If it fails the UTF-8 test, then we try to see if it is an old Max binary file, and, not finding the correct header for that type of file, we say it has a bad magic number.

Another possibility is that the file is fine, but the user has given it the wrong extension, which leads Max to believe it is not a Max 5 JSON format text file. When Max tries to validate it as an old format file, it fails.

I have personally never seen a seriously corrupt JSON file, so I don’t know which of these alternatives is the more likely scenario.

David Z.


June 28, 2008 | 9:40 pm

Quote: David Zicarelli wrote on Sat, 28 June 2008 19:36
—————————————————-
> Do you remember what kind of object you were inspecting? There have been problems in the past with removing objects from a presentation. Perhaps we can track this one down if we know where to look.
—————————————————-

I don’t remember the object because I just wanted to see if it instantly vanishes from the presentation. But there were only 3 textbuttons, an umenu and a palette as background. One of these objects was it.


June 29, 2008 | 5:34 am

—– $B85$N%a%C%;!< %8(B -----
$B:9=P?M(B: David Zicarelli
$BAw?.F|;~(B: 2008$BG/(B6$B7n(B29$BF|(B 2:36
$B7oL>(B: [maxmsp] Re: Bad presentation mode crash in 5.0.3

> I had a patch in presentation mode, one object was selected. In the Inspector I unchecked the box "Include in Presentation". Max crashed

Do you remember what kind of object you were inspecting? There have been problems in the past with removing objects from a presentation. Perhaps we can track this one down if we know where to look.

Bad magic number is just a user-unfriendly way of saying the file is corrupted. We should try to make the error message more helpful.

David Z.


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