ÜberJumper
14th Jan 07, 2:11 PM
One of the most common issues reported on the forums is an issue with patching Company of Heroes to the latest version. There are several causes for this, but first a bit of background.
The Reason for Patching.
Games and other applications are often improved by updating them. Updates can be for several reasons, usually to fix bugs, or to add new features.
To play online with other players, all players must have IDENTICAL data on their systems. This is obviously to ensure the game runs properly, but most importantly, it's to ensure that there's no de-sync during the game, and also that there's no cheating happening.
Patching Methods.
Patching applications can happen in several ways. One way is to simply replace the file that has been changed with a new version of the file. Another way is to write the changes directly into the file. The second method is known as a binary patch (http://www.ibak.co.nz/binary.htm).
The safest way to patch games is to replace an entire file if it's been changed, but for games, which usually have VERY large data files (the data files usually being a packaged version, think zip file, of an entire directory structure), this is not practical in reality. Thus, games will use a mix of a file replacement, AND a binary patching method when updating.
Relic games have used a third method in the past which was to use an archive file that contained the relatively small amount of changes. This file was then loaded AFTER the main archive files were loaded. This was used for Homeworld primarily.
Patching Relic Games.
Relic uses a patching system called RTPatch from a company called Packet Soft (http://www.pocketsoft.com/index.htm). This patching software is used by a wide variety of companies, not just Relic.
The basic process that occurs is that a patch file is first downloaded. The patch file must be appropriate for the version of the game that you are on. For example, if you wanting to patch your game from 1.0 to the latest version (which is say 1.4) you would look for the 1.0 to 1.4 patching vesion. Otherwise, you would look for all the incremental patches, 1.0 to 1.1, 1.1 to 1.2, 1.2 to 1.3, etc.
Most patches can be downloaded from major game download sites like www.3dgamers.com or by signing into the online portion of Relic's games. The online system will determine which is the appropriate version to download, prompt the user, then save the file automatically.
The game will close, and the patching program will start to run once downloaded.
As the patching program starts, it identifies where the Relic game you're patching is installed, usually by reading the registry entry for the game. It will then confirm that the version you're patching is the same (comparing registry version number to its internal number).
It will then start to move through the list of things it has to do. It will begin to add (things like the new readme file), replace (the game's main executable for example), or binary patch (the Art or sound files) all the files it needs to do.
When it encounters a file it needs to change, it compares the checksum of the file it's about to change, to what it thinks the file's size should be. If they are identical, it writes the file.
Once all the files are done, the patch is completed and you can continue to play.
Patching Errors
Errors can occur at the following points:
1. Checking for the game's install path in the registry and then attempting to find that path. If you do not have the game properly installed, or have manually moved the installed folder to somewhere else, you will get an error at this point.
2. Comparing the game's version in the registry to the version in the patching application. If your registry was not updated properly or you modified this by hand, then it could error at this point.
3. Comparing the MD5 Checksum (http://en.wikipedia.org/wiki/MD5) of the file that needs to be changed. This is the biggest source of patching errors during the patching of the game. IF the file that is being changed is different than what the patching application thinks it should be, the patching program will fail. There are several causes of this identified so far. They are outlined below.
Fixing Patching Errors
For error situations One and Two above, the simplest solution is to re-install the game or undo any changes that you did to cause the error.
For error situation Three, there are several confirmed causes of this issue. First though, users should do these steps prior to further troubleshooting.
1. Uninstall the game.
2. Delete the install directory (by default, this would be c:\program files\THQ\Company of Heroes\)
3. Do a Selective Startup (http://forums.relicnews.com/showthread.php?t=107785) with only the Microsoft Services running after a reboot. You especially want to close down antivirus applications.
4. Follow the Steps (http://forums.relicnews.com/showthread.php?p=2074015#post2074015) for getting an MD5 Checksum of your DVD
5. Install the game, and get (http://forums.relicnews.com/showthread.php?p=2074015#post2074015) an MD5 Checksum of the files AFTER they are installed.
With those steps performed, you can now identify the cause of your issue.
1. Bad DVD Data. If the MD5 Checksum of the archive files does not match the reference samples (http://forums.relicnews.com/showpost.php?p=2074073&postcount=3), then your DVD may have been improperly created. There's some thought that there could be a failure in the optical drive firmware that's causing corruption as the disc is read. IF you can install from the same DVD and patch the game on another computer, chances are the DVD is not bad, but it would be some piece of software, or hardware on your PC causing a problem.
2. File corruption once installed. There have been several examples of files being corrupted once they have been installed on user's PCs. If the files on your DVD match the reference samples (http://forums.relicnews.com/showpost.php?p=2074073&postcount=3), then after you install the 1.0 version of the product, compare the checksums of the installed files to the checksums from the reference samples (http://forums.relicnews.com/showpost.php?p=2074073&postcount=3). If they are different, then something is altering the files once they were installed. The only identified cause of this so far are issues with some Nforce motherboards, and certain RAID controllers.
3. Memory issues causing percieved file corruption. The mechanics for why this is happening is unknown, but memory timing seems to come into play. In several situations, having different brands and models of memory installed in your PC can somehow lead the patching process to identify the installed files with the wrong checksum. This may actually be occuring during the install of the file and the mismatched memory may be corrupting the file as it's written to disk. The solution for this appears to be to remove the mismatched memory leaving memory of only one type installed on your motherboard.
If All Else Fails
If this guide does not help you, or if you need additional assistance, please post a technical support thread and attach a dxdiag.txt ,the MD5 checksums of the archive files on the DVD, the MD5 checksums of the archive files on disk after the 1.0 install, and the contents of the patch.err file (which should be with the warnings.log file after a failed patch).
(Much thanks to Remy for his guidance towards the use of MD5 checksums to determine issues)
The Reason for Patching.
Games and other applications are often improved by updating them. Updates can be for several reasons, usually to fix bugs, or to add new features.
To play online with other players, all players must have IDENTICAL data on their systems. This is obviously to ensure the game runs properly, but most importantly, it's to ensure that there's no de-sync during the game, and also that there's no cheating happening.
Patching Methods.
Patching applications can happen in several ways. One way is to simply replace the file that has been changed with a new version of the file. Another way is to write the changes directly into the file. The second method is known as a binary patch (http://www.ibak.co.nz/binary.htm).
The safest way to patch games is to replace an entire file if it's been changed, but for games, which usually have VERY large data files (the data files usually being a packaged version, think zip file, of an entire directory structure), this is not practical in reality. Thus, games will use a mix of a file replacement, AND a binary patching method when updating.
Relic games have used a third method in the past which was to use an archive file that contained the relatively small amount of changes. This file was then loaded AFTER the main archive files were loaded. This was used for Homeworld primarily.
Patching Relic Games.
Relic uses a patching system called RTPatch from a company called Packet Soft (http://www.pocketsoft.com/index.htm). This patching software is used by a wide variety of companies, not just Relic.
The basic process that occurs is that a patch file is first downloaded. The patch file must be appropriate for the version of the game that you are on. For example, if you wanting to patch your game from 1.0 to the latest version (which is say 1.4) you would look for the 1.0 to 1.4 patching vesion. Otherwise, you would look for all the incremental patches, 1.0 to 1.1, 1.1 to 1.2, 1.2 to 1.3, etc.
Most patches can be downloaded from major game download sites like www.3dgamers.com or by signing into the online portion of Relic's games. The online system will determine which is the appropriate version to download, prompt the user, then save the file automatically.
The game will close, and the patching program will start to run once downloaded.
As the patching program starts, it identifies where the Relic game you're patching is installed, usually by reading the registry entry for the game. It will then confirm that the version you're patching is the same (comparing registry version number to its internal number).
It will then start to move through the list of things it has to do. It will begin to add (things like the new readme file), replace (the game's main executable for example), or binary patch (the Art or sound files) all the files it needs to do.
When it encounters a file it needs to change, it compares the checksum of the file it's about to change, to what it thinks the file's size should be. If they are identical, it writes the file.
Once all the files are done, the patch is completed and you can continue to play.
Patching Errors
Errors can occur at the following points:
1. Checking for the game's install path in the registry and then attempting to find that path. If you do not have the game properly installed, or have manually moved the installed folder to somewhere else, you will get an error at this point.
2. Comparing the game's version in the registry to the version in the patching application. If your registry was not updated properly or you modified this by hand, then it could error at this point.
3. Comparing the MD5 Checksum (http://en.wikipedia.org/wiki/MD5) of the file that needs to be changed. This is the biggest source of patching errors during the patching of the game. IF the file that is being changed is different than what the patching application thinks it should be, the patching program will fail. There are several causes of this identified so far. They are outlined below.
Fixing Patching Errors
For error situations One and Two above, the simplest solution is to re-install the game or undo any changes that you did to cause the error.
For error situation Three, there are several confirmed causes of this issue. First though, users should do these steps prior to further troubleshooting.
1. Uninstall the game.
2. Delete the install directory (by default, this would be c:\program files\THQ\Company of Heroes\)
3. Do a Selective Startup (http://forums.relicnews.com/showthread.php?t=107785) with only the Microsoft Services running after a reboot. You especially want to close down antivirus applications.
4. Follow the Steps (http://forums.relicnews.com/showthread.php?p=2074015#post2074015) for getting an MD5 Checksum of your DVD
5. Install the game, and get (http://forums.relicnews.com/showthread.php?p=2074015#post2074015) an MD5 Checksum of the files AFTER they are installed.
With those steps performed, you can now identify the cause of your issue.
1. Bad DVD Data. If the MD5 Checksum of the archive files does not match the reference samples (http://forums.relicnews.com/showpost.php?p=2074073&postcount=3), then your DVD may have been improperly created. There's some thought that there could be a failure in the optical drive firmware that's causing corruption as the disc is read. IF you can install from the same DVD and patch the game on another computer, chances are the DVD is not bad, but it would be some piece of software, or hardware on your PC causing a problem.
2. File corruption once installed. There have been several examples of files being corrupted once they have been installed on user's PCs. If the files on your DVD match the reference samples (http://forums.relicnews.com/showpost.php?p=2074073&postcount=3), then after you install the 1.0 version of the product, compare the checksums of the installed files to the checksums from the reference samples (http://forums.relicnews.com/showpost.php?p=2074073&postcount=3). If they are different, then something is altering the files once they were installed. The only identified cause of this so far are issues with some Nforce motherboards, and certain RAID controllers.
3. Memory issues causing percieved file corruption. The mechanics for why this is happening is unknown, but memory timing seems to come into play. In several situations, having different brands and models of memory installed in your PC can somehow lead the patching process to identify the installed files with the wrong checksum. This may actually be occuring during the install of the file and the mismatched memory may be corrupting the file as it's written to disk. The solution for this appears to be to remove the mismatched memory leaving memory of only one type installed on your motherboard.
If All Else Fails
If this guide does not help you, or if you need additional assistance, please post a technical support thread and attach a dxdiag.txt ,the MD5 checksums of the archive files on the DVD, the MD5 checksums of the archive files on disk after the 1.0 install, and the contents of the patch.err file (which should be with the warnings.log file after a failed patch).
(Much thanks to Remy for his guidance towards the use of MD5 checksums to determine issues)