File is Corrupt: Not well-formed (invalid token)

I tried opening I project I had spent some time working on and it came up with the error message error: not well-formed ?(invalid token) at line 321.

I don’t believe I did anything wierd to cause this; like strange characters. I tried opening the file in notebook and it has a bunch of line of what appear to be corrupt characters.

Can someone help me? Maybe these can somehow be translated back?

Here is an example of some normal text followed by something else. It occurs in a couple places.




<controlpoint t=“97.804250118149” val=ýÞ/LÑA½Ê_8Žô̈Öò€#¥µrljOC¨ë] nWÅW©;©Ë°ÞeZ2,¿‚Å#“÷ÑöóFHzJÖvïYpøv±mÙÞ9¶G¡eðH¢òÀÝ€ÛRzQTUÄZ0)jT¼y€ òYb4=R›WÓÊ¡Æû·%êt8K^ÐYöjI¯Ki³!¯G‘)Àò§BڝÒêŽS±a5×

First thing is to ensure that you are using the current 2.0.5 version of Audacity. Look in “Help > About Audacity” to confirm the version number. The current version of Audacity is available here: http://audacityteam.org/download/

This type of error is pretty rare in Audacity 2.0.5, so if it keeps happening we’ll need to try and find out what is causing it.

<envelope numpoints="4">

This indicates the start of a track Envelope,
There should be a matching:

</envelope>

below the line with garbage.

If the corruption is only between … tags, then you may be able to salvage the project by deleting those sections, for example, if you had this:

54				</waveblock>
55			</sequence>
56			<envelope numpoints="2">
57				<controlpoint t="1.689952686675" val="0.444444447756"/>
58				<controlpoint t="1.705294064563" val="1.000ljhas8ashfkasyfiuashfklhaskflaskf,kashflashfklha
59			</envelope>
60		</waveclip>

you would delete lines 56 to 59 inclusive so that you have:

54				</waveblock>
55			</sequence>
56		</waveclip>

If the corruption is more than that then the project may be lost.

It may be worth running a diagnostic check on the disk where the file was stored in case it is starting to fail / wear out.

Further to Steve’s reply (I was typing at the same time).

If you meant you are using Notepad, turn word wrap off.

If that is the only error, you could also just change the value of that envelope point rather than lose the other points. If so, change the line starting with <controlpoint t=“97.804250118149” to:

<controlpoint t="97.804250118149" val="0.000000100000"/>

Use File > Save As… and save as Unicode or UTF-8. Do not save as ANSI.

If you still get errors at another line, please attach the AUP file. Please see here for how to attach files: https://forum.audacityteam.org/t/how-to-attach-files-to-forum-posts/24026/1 . Tell us exactly what version of Windows (see the pink panel at the top of the page).

Please see here if you need help testing your disk: http://www.howtogeek.com/134735/how-to-see-if-your-hard-drive-is-dying/ .



Gale

Wow, very strange but I attempted to play around with the coding the other night, did not fix it by any means but was able to eliminate the areas that were corrupt. This I saved as a different file.

The strange thing occurred today. I was going into the new file to try to salvage the other tracks, I opened the old file in notepad to try and see what was existing and the strange character were gone, in there place was the correct coding!? I’m going to assume this was an issue with my hard drive and after restarting the file was interpreted correctly somehow. FYI, I do have 2.0.5.

Regardless, thanks for your help Gale and Steve! At the least I can say I learned a lot from this episode, and if this happens again I think I know how to code the tracks back into the aup file. If I have any other problems I will let you guys know.

If the file is intermittently being read incorrectly, it could indicate memory corruption.

You could try Windows Start > Run and type “mdsched.exe” (without quotes). This is available on Windows Vista and later as a built-in memory tester.

The best memory tests are repetitive, run overnight. See http://www.memtest86.com/ .

If you write again please say what version of Windows. It is far more difficult to help without knowing that. :wink:


Gale