Answered by:
fatal error LNK1143: invalid or corrupt file: no symbol for comdat section 0xffff8000

Question
-
Until recently my project was compiling and linking successfully on Windows OS using Visual Studio (VS) 2005, 2008, 2015. Suddenly, one of the *.cpp files, after compiling successfully, cannot link, issuing the following errors:
- fatal error LNK1143: invalid or corrupt file: no symbol for comdat section 0xffff8000
when compiled on VS 2005;
- fatal error C1002: compiler is out of heap space in pass 2
when compiled on VS 2008;
- on VS 2015 it compiles and links, producing EXE file; when the EXE is executed, I get the message: " Debug Assertion Failed! File:minkernel\crts\ucrt\inc\corecrt_internal_stdio.h
Line: 716 Expression: 82invalid file open mode", 0)Note, that on two other computers, running Windows OS, the same program compiles and links on VS 2005 and executes! So, what is wrong? The Win OS? The VS compiler? Or, something else?
I would like to have an answer to
- why the same project compiles, without error, on two other Laptops?
- why different versions of VS (2005, 2008) see the error differently?
- why VS 2015 compiles the project, without error, but I cannot execute the EXE file?Monday, February 3, 2020 11:52 AM
Answers
-
Have you tried forcing a clean build? It appears that a file is invalid or corrupt, so, if it builds on other computers, then a clean build might fix it.
Bruce Eitman
Senior Enginer
Bruce.Eitman AT Synopsys DOT com
My BLOG http://geekswithblogs.net/bruceeitman
I work for Synopsys- Marked as answer by Languageware Monday, February 3, 2020 12:50 PM
Monday, February 3, 2020 12:19 PM -
I don't think that the version matters, why do you think it does?
Build->Clean Solution
or
Build->Clean Solution
The other alternative is to do what you did (I hope that you did) on the other computers, get the code from version control to a clean folder and build.
Bruce Eitman
Senior Enginer
Bruce.Eitman AT Synopsys DOT com
My BLOG http://geekswithblogs.net/bruceeitman
I work for Synopsys- Edited by Bruce Eitman Monday, February 3, 2020 4:23 PM Added version control sentance
- Marked as answer by Languageware Tuesday, February 4, 2020 1:30 PM
Monday, February 3, 2020 4:18 PM -
Oh wait, the other error messages are about memory space - your computer seems to be low on memory.
So as a test, shut down all applications on the computer, then build. If that fails, try shutting down VS and build from the command line using msbuild (see online documentation for command line options.)
Bruce Eitman
Senior Enginer
Bruce.Eitman AT Synopsys DOT com
My BLOG http://geekswithblogs.net/bruceeitman
I work for Synopsys- Marked as answer by Languageware Wednesday, February 5, 2020 7:26 AM
Tuesday, February 4, 2020 2:08 PM -
however that is not a good solution for me, because I still work on this VS project
Agreed, this is just a test to see if memory is the problem.
1) How do I increase the memory of this particular Laptop running Win 10?
You would need to ask the manufacturer.
2) Why the same project compiles and links, without error, on three older Laptops, having presumably less memory, running Win 7. Win 8.1 and Win 10?
Presumably? I don't presume... You should check to see how much ram, and more important how much is available during the build.
3) What can be wrong with the memory of the Laptop I am using at present?
We wouldn't know because you have told us nothing about that laptop.
Bruce Eitman
Senior Enginer
Bruce.Eitman AT Synopsys DOT com
My BLOG http://geekswithblogs.net/bruceeitman
I work for Synopsys- Marked as answer by Languageware Thursday, February 6, 2020 3:55 PM
Thursday, February 6, 2020 2:03 PM
All replies
-
Have you tried forcing a clean build? It appears that a file is invalid or corrupt, so, if it builds on other computers, then a clean build might fix it.
Bruce Eitman
Senior Enginer
Bruce.Eitman AT Synopsys DOT com
My BLOG http://geekswithblogs.net/bruceeitman
I work for Synopsys- Marked as answer by Languageware Monday, February 3, 2020 12:50 PM
Monday, February 3, 2020 12:19 PM -
I have cleaned and rebuild the VS project using VS 2005. I prefer to use this version, because I can execute the file from the menu. The error was the same, nothing has changed.
May I ask, how else do I force a clean build, if it is diffrent on newer VS versions?
Monday, February 3, 2020 1:05 PM -
I don't think that the version matters, why do you think it does?
Build->Clean Solution
or
Build->Clean Solution
The other alternative is to do what you did (I hope that you did) on the other computers, get the code from version control to a clean folder and build.
Bruce Eitman
Senior Enginer
Bruce.Eitman AT Synopsys DOT com
My BLOG http://geekswithblogs.net/bruceeitman
I work for Synopsys- Edited by Bruce Eitman Monday, February 3, 2020 4:23 PM Added version control sentance
- Marked as answer by Languageware Tuesday, February 4, 2020 1:30 PM
Monday, February 3, 2020 4:18 PM -
No, I don't think the VS version matters. I only wondered why compiling and linking the project I get different types of errors on different VS versions.
In one of my *.cpp files, in one long case, I closed the section that caused this error. Then, I moved this section to another *cpp file, under a case of its own and I got the error:
fatal error LNK1102: out of memory
My projects are kept and compiled on external drive and on USB stick.
I searched Online, one advice was to place the project in a directory on drive C. I did, the error was absolutely the same. I have in the project settings /Zm650 /. Increasing it has not helped.
I have an older PC, running Windows Vista. I have there the project in question in a drive on the hard disk. There the error was the same. I have a Laptop with Win 7 and another Laptop with Win 10, there the project compiles without error from USB drive. I am afraid to move this project on one of these other Laptops, before I find out what causes the problem on the Laptop, with Win 10, which I use at present. Could it be that a Windows file was damaged? I have re-installed VS 2005, thinking that the error is in its files, but that was not the case.Tuesday, February 4, 2020 1:55 PM -
Oh wait, the other error messages are about memory space - your computer seems to be low on memory.
So as a test, shut down all applications on the computer, then build. If that fails, try shutting down VS and build from the command line using msbuild (see online documentation for command line options.)
Bruce Eitman
Senior Enginer
Bruce.Eitman AT Synopsys DOT com
My BLOG http://geekswithblogs.net/bruceeitman
I work for Synopsys- Marked as answer by Languageware Wednesday, February 5, 2020 7:26 AM
Tuesday, February 4, 2020 2:08 PM -
Shutting down all applications and building did not help. The error was the same.
As a last resort, I will try to build using msbuild, just to see if linking works, however that is not a good solution for me, because I still work on this VS project, test, etc. Besides, VS 2015 compiles and links the same project, but the resultant EXE fails to execute, with the error:
Debug Assertion Failed! File:minkernel\crts\ucrt\inc\corecrt_internal_stdio.h
Line: 716 Expression: 82invalid file open mode", 0)
This is an update to what I have said above. I did some more experiments and I was convinced that my computer is low on memory, as you have said. Now, my question is:
1) How do I increase the memory of this particular Laptop running Win 10?
2) Why the same project compiles and links, without error, on three older Laptops, having presumably less memory, running Win 7. Win 8.1 and Win 10?
3) What can be wrong with the memory of the Laptop I am using at present?VS 6.0 is not on the Program Manager list on the Laptop that has this problem. I have tried several times to install it, but after checking for previous installation, after selecting typical or custom installation, after installing something, comes the message: VS 6.0 installation is not complete. So, I work perhaps, with installed VS 6.0 that has a problem, which I cannot uninstall and install again?
- Edited by Languageware Thursday, February 6, 2020 11:35 AM
Wednesday, February 5, 2020 10:54 AM -
however that is not a good solution for me, because I still work on this VS project
Agreed, this is just a test to see if memory is the problem.
1) How do I increase the memory of this particular Laptop running Win 10?
You would need to ask the manufacturer.
2) Why the same project compiles and links, without error, on three older Laptops, having presumably less memory, running Win 7. Win 8.1 and Win 10?
Presumably? I don't presume... You should check to see how much ram, and more important how much is available during the build.
3) What can be wrong with the memory of the Laptop I am using at present?
We wouldn't know because you have told us nothing about that laptop.
Bruce Eitman
Senior Enginer
Bruce.Eitman AT Synopsys DOT com
My BLOG http://geekswithblogs.net/bruceeitman
I work for Synopsys- Marked as answer by Languageware Thursday, February 6, 2020 3:55 PM
Thursday, February 6, 2020 2:03 PM -
I have tried to build the project using MSBuild.exe,
C:\Windows\Microsoft.NET\Framework\v2.0.50727>MSBC:\Windows\Microsoft.NET\Framework\v2.0.50727>MSBuild.exe C:\GE_RU\sldeen.vcproj /property:Configuration=Release
I could not select the VS version I want. VS 2008 opened the project, I have cleaned it and rebuilt it.
I got the same error like before:
my_file_name.cpp(63123) : fatal error C1002: compiler is out of heap space in pass 2
Line 63123 is the end line of code section, in a case, in this file, where compiler gets out of heap.
So, using MSBuild did not help. Any new suggestion?Friday, February 7, 2020 8:15 AM