Any ideas what this error message means? It seems like some obscure compiler error that only occurs when we run with code analysis on. Our solution compiles without code analysis turned on.
Related
I'm getting a C1001 error while attempting to build in Visual Studio 2019 Version 16.7.2. This is a C++ project that has previously built fine until a change set I am attempting to build today.
The exact error is as follows: (with project specific path redacted)
1>d:\work\[...](82): fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'd:\agent\_work\3\s\src\vctools\compiler\utc\src\p2\main.c', line 187)
Notes below:
The error only happens in Release. Debug builds and runs.
If I turn off all optimizations in Release the error goes away.
The location where the error occurs seems to be unrelated to recent changes I have made to the project i.e. VS is reporting the error in a translation unit that had been building without problem until unrelated changes in another TU were made.
The location where the error occurs seems to not actually be problematic in the sense that if I comment out the implementation of the function there and just return a default value from the function so that the program is syntactically correct, the error occurs in the next the function in the same file.
Turning off Whole Program Optimization and Link Time Code Generation does not fix the problem.
SUGGESTIONS
Please:
Update your post with exact error text (if available)
Post your question to https://developercommunity.visualstudio.com/ as well
See if any of these links are applicable:
https://developercommunity.visualstudio.com/content/problem/710576/visual-studio-2019-1622-fatal-error-c1001-in-32-bi.html
https://social.msdn.microsoft.com/Forums/vstudio/en-US/165975b4-35e9-4b40-9524-e656a4e2f359/fatal-error-c1001-an-internal-error-has-occurred-in-the-compiler?forum=visualstudiogeneral
https://developercommunity.visualstudio.com/content/problem/664162/ice-on-valid-code-after-upgrading-to-1620.html
One way to notify Microsoft Support like this:
MSVS > Help > Send Feedback > Report a Problem
Here is a complete list of MSVS support options: https://visualstudio.microsoft.com/vs/support/
Update:
Thank you for copying/pasting the exact error message:
1>d:\work\[...](82): fatal error C1001: An internal error has occurred in the compiler.
1>(compiler file 'd:\agent\_work\3\s\src\vctools\compiler\utc\src\p2\main.c', line 187)
This is the MSVS file causing the error C1001: vctools\compiler\utc\src\p2\main.c
This is an existing Microsoft trouble report:
https://developercommunity.visualstudio.com/content/problem/210332/c1001-internal-error-compiler-file-fddvctoolscompi.html
Hi Roger,
Thanks for reporting the bug, and including an excellently
self-contained repro, so quickly. I've investigated and this seems to
be the same issue as
https://developercommunity.visualstudio.com/content/problem/209359/ice-with-fpfast-in-156-and-msvc-daily-1413263051-p.html.
I'm closing this as a duplicate just so that people can collect
context and work-around advice in the same location, and when the
other bug is marked fixed, you can assume that this one is too.
Thanks again,
Aaron Gorenstein
Software Engineer II
Searching for this error message/source module, I also found this: https://stackoverflow.com/a/63435683/421195
Please post back if either of these work for you!
I am working through some example code from Lazar and Penea, Mastreing Qt5:
https://github.com/PacktPublishing/Mastering-Qt-5
I think I am starting to understand the code, but I am stuck with a compilation error in the method "addAlbum" in the class "AlbumModel", The offending line is
unique_ptr<Album> newAlbum(new Album(album));
which yields the error message
error: use of deleted function ‘Album::Album(const Album&)’
unique_ptr<Album> newAlbum(new Album(album));
^
I am using CMake 3.10.2 and cpp 7.5.0. I presume the github code is correct, so this error is a bit puzzling. Although there are a lot of "use of deleted function" discussions here on stackoverflow, I have not been able to determine the cause of the error.
Some errors in Visual Studio are not displayed by the filename of the source code where they are created, which makes them difficult to find and debug.
In this particular example, I have the error pointing to #include <vector> header, but I cannot trace it to the source file where the actual code error is. Error C2528 'data': pointer to reference is illegal c:\program files (x86)\microsoft visual studio 14.0\vc\include\vector 1246
If this was a runtime error, I would be able to use the Call Stack to see where in the code the runtime crash occurred.
Is there a similar way to find this error with compiler errors? Or am I stuck looking through source code to see where the error can potentially be manually?
Just for information, this is not a post asking how to fix this particular error, but a post asking how to find the source file where the errors occur quickly. Therefore I am not posting any source code, the error provided here is an example of the type of error that would cause the confusing compiler messages,
Look in the Output tab and select 'Build' from the dropdown. You should see a 'traceback' of your error(s) there. As you have observed, the Error List tab just displays the line provoking the error.
All of a sudden, when trying to run a unit test in Visual Studio 2017, I get errors E1696 command-line error: cannot open metadata file "mscorlib.dll" and also "E2998 PCH warning: an unknown error occurred. An IntelliSense PCH file was not generated."
After some experimentation, this seems to be VS2017's way of telling you that you have tried to run a unit test/MS Test on a CPP module that has a Syntax Error in it. The syntax error is in the module under test, not the test. Typical scenario would be the .CPP module is changed to fix something, a syntax error is accidentally introduced, then any unit testing will generate E1696/E2988 mscorlib/Intellisense errors. The offending syntax error may not be obvious in the Error List if there are many warnings. Scrolling down the Error List window may reveal the syntax error, which when fixed, will eliminate the E1696 and E2988 mscorlib.dll + Intellisense errors.
This answer got me through a similar one. My symptoms were cannot find mscorlib.tlh in ./debug.
The problem was missing .prob files in the vcxproj file. Deleted those references and the error went away.
Posting this because the answer here actually got me to the problem despite what the compiler was telling me and hours of web searching (hours and hours trying to figure out what was wrong with mscorlib).
I am attempting to compile a qt project using the following sequence of commands
> qmake -project
> qmake
> make
In the make process I keep getting the following error popping up.
{standard input}: Assembler messages:
{standard input}:21385: Fatal error: can't close Transfer.o: Input/output error make: *** [Transfer.o] Error 1
The same error is coming up for multiple classes, Originally I thought it was qt related because it first appeared in when the compiler tried to make a moc file. But now it seems to be popping up in other classes in my project.
I don't really know where to look for problems because I don't understand the error, Could anybody point me in the right direction? I'm happy to post code as needed.
I think this is related to some part of the code that assembler is not able to decode it.