Can't open an AMXD corrupted file - I need your help to restore it !
Hello there ! I have some serious trouble ... My PC crashed while I was working on an important max for live patch, and I think max was autosaving at this moment because now I can't open the file in Max MSP, nether in live.
When I tried to open the file as a text Max send me this error text in the console : Test.amxd: read failed Test.amxd: can't open, error 0
I can't open the file with the windows notepad, cause the file make it crash. I managed to open the file in Notepad++, and to erase weird caracters named NULL in the text. Now I can open the file in the MSP text editor, but I can't open the patch properly ... I suppose the file is missing some "}" to end the text, but honestly I don't know how to repair this properly.
Could someone please help me to repair the file ? Here it is a download link to the file, the code is too long to be put here. I think you can open it with editor with no problem now.
Thank you so much for your help,
do you have no crash recovery file ?
Did you upoad original corrupt file, or edited ?
original would make more sense.
I had a look at what you uploaded, header of amxd is missing,
code seems strange - many tabs inserted, and patcher ends
before it should.
that is why I ask if this is original untouched corrupt file.
You are right, I did not gave the original link !
Here is the untouched file, as it was after the crash. Weird thing is that it make lag and crash the few the few editors which can open it :
https://drive.google.com/file/d/1LjFH6SsCknoEMKF307oncOMNzZl__SaZ/view?usp=sharing
Weird is that the header seems to be composed by corrupted characters.
Thank you for your help
I will take a look at it tomorrow,
have no max at hand at the moment
But please don‘t expect much.
you have many patchers inside, and
order of added objects while patching
is not allways reflected in the code.
which would make it easier to cut the
file at least till uncorrupted portion ends
and at least rescue that.
Did you look if you can find anything in crash recovery folder ?
P.S. header is not plain text readable
that is why it looks weird to you.
you need hex editor to look at the header
I understand, it's very kind of you to accompany me. I will try to salvage some patch pieces as you suggest.
I understand better for the header, I will look for hex editor. Don't worry if you can't find the time to take a look, now that I understand a little better how it works I'll try to get some pieces. Nothing in Max's crash logs folder though...
I can not fix it, sorry.
if one removes header and 20 MB of nothing,
left is broken json file of 12.6 MB size.
idea was to cut the file as maxpat.
No problem, thank you for your help. I've noticed the weird thing going on with the header, but can't explain it.
I will keep in mind to save within a different folder everyday !
header part contains info about amxd type, and I guess same as mxf file
(for which I am sure) some primitive checksum.
I am not using Live and so had no interest to go after that in amxd files.
For mxf - collectives it was very handy to create them without need to go through build process.
if you remove header, take care to keep 1st bracket.
then rename .amxd into maxpat.
If opened in max and resaved, all but plain patch content will get removed.

header removed

frozen amxd files have different header, becaue they are
collectives
