Warning - Microsoft updated the VC2005 CRT
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Warning - Microsoft updated the VC2005 CRT
I got bitten by this today and it had me swearing for ages. All of a sudden certain builds I was working on ceased to function on other machines with the typical "The application failed to start because it was configured incorrectly" error, that you can expect when you haven't installed the CRT on the machine in question. I was puzzled because binaries from v1.6.3, released less than a week ago, worked fine on this machine. Everything looked fine in the WinSxS folder as far as I was concerned.
However, while fixing a security bug, this week Microsoft bumped the version of the 2005 CRT to 8.0.50727.4053 instead of 8.0.50727.672, which I picked up yesterday on my dev machine. I didn't realise this had happened, so when I deployed a new build from an OGRE-using application, I suddenly started getting this error when as far as I was concerned the CRT was fine.
The vc_redist.exe's on Microsoft's site currently only cover the 762 version of the CRT, not 4053. The only way to fix this is to re-deploy using Windows Installer against your newly built app, or applying the security update on the machine that has had this run for the 762 version.
This had me cursing for over an hour today, I hope this helps avoid someone else having the same issue.
However, while fixing a security bug, this week Microsoft bumped the version of the 2005 CRT to 8.0.50727.4053 instead of 8.0.50727.672, which I picked up yesterday on my dev machine. I didn't realise this had happened, so when I deployed a new build from an OGRE-using application, I suddenly started getting this error when as far as I was concerned the CRT was fine.
The vc_redist.exe's on Microsoft's site currently only cover the 762 version of the CRT, not 4053. The only way to fix this is to re-deploy using Windows Installer against your newly built app, or applying the security update on the machine that has had this run for the 762 version.
This had me cursing for over an hour today, I hope this helps avoid someone else having the same issue.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
I saw that update in the windows auto update, it is too big to download with my Thailand cellular internet connection, but I was thinking that this could be the case, and as it turned out from your post – it is.
Thanks for the update.
I guess the solution for now is to add the new "msvcp80.dll" and "msvcr80.dll" to your setup and bin dir, right?
Thanks for the update.
I guess the solution for now is to add the new "msvcp80.dll" and "msvcr80.dll" to your setup and bin dir, right?
Watch out for my OGRE related tweets here.
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Warning - Microsoft updated the VC2005 CRT
So, they updated your build environment in such a way that VC8 SP1 now has two different DLLs it will use? How insipid... This means that they also updated the .lib against which your apps link?
- Fish
- Greenskin
- Posts: 131
- Joined: Fri Aug 22, 2008 6:12 pm
Re: Warning - Microsoft updated the VC2005 CRT
This is one of those times when us MinGW users Roll On the Floor Laughing.
-Fish
-Fish
- jacmoe
- OGRE Retired Moderator
- Posts: 20570
- Joined: Thu Jan 22, 2004 10:13 am
- Location: Denmark
- x 179
- Contact:
Re: Warning - Microsoft updated the VC2005 CRT
I am glad to be using VC9
That's so typically in your face Microsoft.
Only Symantec is worse, IMO.
That's so typically in your face Microsoft.
Only Symantec is worse, IMO.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Warning - Microsoft updated the VC2005 CRT
That's OK, the rest of us using Visual C++, spend the time you spend laughing, actually getting work done. :pFish wrote:This is one of those times when us MinGW users Roll On the Floor Laughing.
-Fish
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
I was thinking for a while to recompile the CRT so I will have TCMalloc from google-perftools as the memory manager like explained on this page, this can also resolve this type of issue – because I will use my own compiled CRT in the distribution.
Has any of you ever done it?
Has any of you ever done it?
Watch out for my OGRE related tweets here.
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Warning - Microsoft updated the VC2005 CRT
Never had a need, myself.
Wouldn't it be simpler to implement Ogre (or other API) memory management interfaces to use tcmalloc or dlmalloc, instead of having to futz around with a custom CRT that you have to track and install on all target machines?
Wouldn't it be simpler to implement Ogre (or other API) memory management interfaces to use tcmalloc or dlmalloc, instead of having to futz around with a custom CRT that you have to track and install on all target machines?
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
I already have to do it in many cases - so why not swap the memory manager as well?
Watch out for my OGRE related tweets here.
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Re: Warning - Microsoft updated the VC2005 CRT
Yep - having investigated, it appears that it only updates the CRT to 4053 on machines that have Visual Studio 2005 installed, on my other machines it only updated it to 3053, which means apps built from VC2005 SP1 with the patch applied don't work on other machines even if they've run Windows Update. Because, as far as I can tell, they haven't updated the vc_redist.exe package yet, the only way to resolve it is to create your own Windows Installer to install the new runtime, say using WiX. I fixed it on my other machines by rebuilding the OGRE Demos installer (ogre/Samples/Common/setup) and running it on the machines, then everything was fine.xavier wrote:So, they updated your build environment in such a way that VC8 SP1 now has two different DLLs it will use? How insipid... This means that they also updated the .lib against which your apps link?
For convenience, I built a simple setup routine to install just the runtimes: http://sourceforge.net/projects/ogre/fi ... i/download
I don't blame MS for fixing security issues in the CRT, but for Christ sakes they should tell us when making a change as significant as this. At least with SP1 we were consciously agreeing to change our dev runtimes, not having them changed under our feet with no real notice.
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Warning - Microsoft updated the VC2005 CRT
They never did, IME. It has never worked for me, and I've always had to resort to the workaround you mention. PITA.sinbad wrote:Because, as far as I can tell, they haven't updated the vc_redist.exe package yet, the only way to resolve it is to create your own Windows Installer to install the new runtime, say using WiX.
Agree 100%. In your investigation, did anyone bitch about this in MS forums? And what was MS's response if so?At least with SP1 we were consciously agreeing to change our dev runtimes, not having them changed under our feet with no real notice.
- Praetor
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
Re: Warning - Microsoft updated the VC2005 CRT
I still bundle the CRT and the manifest with my apps because I a) don't trust the redist and b) don't like making my users download something if I'm not already using an installer. It's been annoying explaining to non-tech users why they have to download something from MS when I've sent them an app in a zip file.
Game Development, Engine Development, Porting
http://www.darkwindmedia.com
http://www.darkwindmedia.com
- sinbad
- OGRE Retired Team Member
- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 66
- Contact:
Re: Warning - Microsoft updated the VC2005 CRT
I haven't, I thought about it but then figured that would just be wasting more of my timexavier wrote:Agree 100%. In your investigation, did anyone bitch about this in MS forums? And what was MS's response if so?At least with SP1 we were consciously agreeing to change our dev runtimes, not having them changed under our feet with no real notice.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
I just found this : Create projects easily with private MFC, ATL and CRT assemblies
This idea can also solve the issue, right?
This idea can also solve the issue, right?
Watch out for my OGRE related tweets here.
- xadhoom
- Minaton
- Posts: 973
- Joined: Fri Dec 28, 2007 4:35 pm
- Location: Germany
- x 1
Re: Warning - Microsoft updated the VC2005 CRT
Interesting solution. Have you been able to successfully launch the demo? I tried like described but still get the SxS errors like the first post describes...
xad
xad
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
I will try later today.
Watch out for my OGRE related tweets here.
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Warning - Microsoft updated the VC2005 CRT
Same -- tried this ages ago and like the first VC8 SP1 CRT installer, it just doesn't work.xadhoom wrote:Interesting solution. Have you been able to successfully launch the demo? I tried like described but still get the SxS errors like the first post describes...
xad
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
Release worked for me.
I downloaded the sample project, compiled release config of the solution, copied the dll and manifest files from the other zip to the release dir, double clicked the exe and it runs.
I downloaded the sample project, compiled release config of the solution, copied the dll and manifest files from the other zip to the release dir, double clicked the exe and it runs.
Watch out for my OGRE related tweets here.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
Here is a depends screenshots.
- Attachments
-
- depends.gif (28.53 KiB) Viewed 6728 times
Watch out for my OGRE related tweets here.
- xavier
- OGRE Retired Moderator
- Posts: 9481
- Joined: Fri Feb 18, 2005 2:03 am
- Location: Dublin, CA, US
- x 22
Re: Warning - Microsoft updated the VC2005 CRT
Could you be more specific? We spent days on this last year and it would have been most excellent if we could have obtained the same results. Unless something has changed with the VC8 CRT DLLs, there is no way you got those results solely following the directions in that link...
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
Did this work for you? What step doesn't work?Assaf Raman wrote:Release worked for me.
I downloaded the sample project, compiled release config of the solution, copied the dll and manifest files from the other zip to the release dir, double clicked the exe and it runs.
Watch out for my OGRE related tweets here.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
I think I am seeing what you talk about - it doesn't run on my xp. strange.
Watch out for my OGRE related tweets here.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
OK, it does work, one file was missing for it to work.
I only copied the following files to the exe path: msvcr80.dll, msvcp80.dll, Microsoft.VC80.CRT.manifest
But the exe didn't run.
I found out that I was missing this file: Microsoft.VC80.MFC.manifest
After adding it - the exe runs.
I don't know why you need an MFC manifest, but it is only 1K in size - so who cares?
[EDIT] I am talking about a new command line app I created to test this, I added the include file to it and didn't use MFC.
I only copied the following files to the exe path: msvcr80.dll, msvcp80.dll, Microsoft.VC80.CRT.manifest
But the exe didn't run.
I found out that I was missing this file: Microsoft.VC80.MFC.manifest
After adding it - the exe runs.
I don't know why you need an MFC manifest, but it is only 1K in size - so who cares?
[EDIT] I am talking about a new command line app I created to test this, I added the include file to it and didn't use MFC.
Watch out for my OGRE related tweets here.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
Seems that it only works for me when I use precompiled headers and the include is the first include of the PCH file (StdAfx.h or smiler)
Watch out for my OGRE related tweets here.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: Warning - Microsoft updated the VC2005 CRT
Sometimes it is hard to add precompiled headers flag to existing projects, you get all sort of strange link errors (even before this include).
I found a way around this - just add an new h file with include to that file, a cpp file with include to the new h file, then set ONLY TO THAT FILE the precompiled headers with the PCH being the new h file. It works.
Do this only if you can't use the precompiled headers flag the normal way.
I found a way around this - just add an new h file with include to that file, a cpp file with include to the new h file, then set ONLY TO THAT FILE the precompiled headers with the PCH being the new h file. It works.
Do this only if you can't use the precompiled headers flag the normal way.
Watch out for my OGRE related tweets here.