V003. Unrecognized error found...
Message V003 means that a critical error occurred in the analyzer. It is most likely that in this case you will not see any warning messages concerning the file being checked at all.
Although the message V003 is very rare, we will appreciate if you help us fix the issue that caused this message to appear. To do this, please send us a file with stacktrace ('*.PVS-Studio.stacktrace.txt'), a preprocessed i-file that caused the error ('*.PVS-Studio.i') and its corresponding configuration file ('*.PVS-Studio.cfg') through the support page.
If you received the error of the following form:
V003 Unrecognized error found: stacktrace was written to the file source.cpp.PVS-Studio.stacktrace.txt 1
You can go to the text file that may look as follows:
PVS-Studio version: 7.XX.XXXXX.XXXX #NN Object "[0xffffffffffffffff]", at 0xffffffffffffffff, in .... #1 Object "[0xb39b7e]", at 0xb39b7e, in #0 Object "[0xcfac19]", at 0xcfac19, in
By addresses from this file we can determine the source of the error.
Obtaining a preprocessed file
A preprocessed i-file is generated from a source file (for example, 'file.cpp') when the preprocessor finishes its work. To get this file you should set the option 'RemoveIntermediateFiles' to 'False' on the tab 'Common Analyzer Settings' in PVS-Studio settings and restart the analysis of this one file.
If the 'pvs-studio-analyzer' utility is used to analyze the project, then the internal files can be obtained using the '--dump-files' flag.
After that you can find the corresponding i-file in the project folder (for example, 'file.PVS-Studio.i') and its corresponding 'file.PVS-Studio.cfg'.
Problems related to lack of RAM
Sometimes the analyzer may behave unstable when working with large files (or files that include many others). Large memory consumption can lead to the following error:
V003 Unrecognized error found: 'bad allocation'. source.cpp 1
To fix it, it is worth lowering the number of threads.
In the Visual Studio plugin, set the 'ThreadCount' option to a lower value.
If you use the 'pvs-studio-analyzer' utility or 'CompilerCommandsAnalyzer.exe ' reduce the number passed to the '-j' / '--threads' parameter.
In projects based on Unreal Engine, use the 'BuildConfiguration' file.xml' with such options:
<?xml version="1.0" encoding="utf-8" ?> <Configuration xmlns="https://www.unrealengine.com/BuildConfiguration"> <ParallelExecutor> <MaxProcessorCount>1</MaxProcessorCount> </ParallelExecutor> </Configuration>
More detailed documentation for this file is available at the link.