Fixing corrupt Garmin TCX files


The new firmware for Garmin Edge 705 does not always write data files correctly, as a result of which you may at times come across corrupted TCX files. Thankfully, the nature of these files makes fixing of the same pretty easy, in case you know how to code in XML. However, even though your fixing will make the file readable again, some data will always be lost. Be prepared for that. In case you do not know XML, you will not be able to fix these files yourself. Find a friend to help you with that.

For those of you who know XML, here is how you go about fixing a corrupt TCX file:

  1. At first, simply open the corrupt file in an XML Editor. You can open it in a text editor, like the Notepad. However, if you wish to view the bad nodes comfortably without extensive hunting, an XML Editor is your best bet. Look for the First Object XML Editor, which is quite nice, apart from being free of cost. The editor also highlights the bad nodes in yellow, making it a breeze to spot those.
  2. Expand the nodes in the file you have opened till you find a node that is highlighted in yellow. This is the root of the problem. Usually, nodes with missing closing tags will cause corruption in the TCX files. Do not delete these nodes. You cannot fix the corruption that way.
  3. Scroll further down the tree till you see a Trackpoint highlighted in yellow color, with the start of a new track after it.
  4. Delete everything that is present from the end of the last closed Trackpoint to just before the beginning of the next track. Insert a closing Track tag. If it is the last track in a lap, you will probably have to close the lap as well. Repeat the process in case you find more errors.
  5. Save the file and refresh it. The expanded trees will automatically collapse.
  6. The file should now be fixed and should display nicely in the editor.

This is how you go about fixing a Garmin TCX file. A few errors may be a little harder to find, since those may be located deeper within the inner branches of a tree. However, the basic principle of fixing the errors remains the same in each case.

DriverScanner
How outdated are your PC drivers?
Old drivers harm system performance and make your PC vulnerable to errors and crashes.

Posted in File Formats


(comments are closed).