Execution halt without further hints

Jun 6 at 1:51 AM
Edited Jun 6 at 1:53 AM
Hello,

By looking at the OpenCppCoverage introduction, I am very excited for its functionality and give it a try immediately.

I use Microsoft Visual Studio Community 2017 to create a simple C++ project OpenCppCovTest which only contains one .cpp file with one main function, I put some condition branches in the main function as a trial.

With the executable and .pdb files, I use below command to start:
OpenCppCoverage.exe --source=
OpenCppCovTest --export_type=html -- OpenCppCovTest.exe


======== log start
D:\codes\opencppcoverage_test\OpenCppCovTest\Debug>OpenCppCoverage.exe --source=
OpenCppCovTest --export_type=html -- OpenCppCovTest.exe
[info] Start Program:
Path:"OpenCppCovTest.exe"
Arguments:
Working directory: not set.
Modules: Selected: * Excluded:
Sources: Selected: OpenCppCovTest Excluded:
Log Level: Normal
Cover Children: 0
Aggregate by file: 1
Continue after C++ exception: 0
Optimized build support: 0
Export: Html
Input coverage:
Unified diff:
Excluded line regular expressions:
[info] Module: D:\codes\opencppcoverage_test\OpenCppCovTest\Debug\OpenCppCovTest.exe is selected because it matches selected pattern: *
======== log end

The console just halt here without further instructions, the only difference I spot is a new file "LastCoverageResults.log" sized 0KB (empty) being created under the working folder (same folder as .exe and .pdb).

The OpenCppCoverage version is 0.9.6.1 (shall be able to cope with VS2017 per the ChangeLog)

Looking forward to your reply :)
Coordinator
Jun 6 at 9:02 PM
Hello,

I have just created a default console application with the following code:
int main()
{
    if (true)
        return 0;
    else
        return 0;
}
When I run OpenCppCoverage 0.9.6.1 (x64) with the following command, I have a new folder in the current folder starting with "CoverageReport-"
OpenCppCoverage --source Console --export_type=html -- Debug\ConsoleApplication1.exe
I have tried with Visual Studio 2017 version 15.2 26430.6 and version 15.2 26430.12 on x64 and x86 for debug and release build (you should use --optimized_build for release build).
In all these cases, I had a correct coverage report.

Can you try to disable your antivirus (if any) and reinstall OpenCppCoverage x64? In C:\Program Files\OpenCppCoverage you should have one folder and 21 files (8 455 540 octets).
Can you also check you can run and debug your program?
Can you try on another computer if the problem still exist?

I hope this will help,

OpenCppCoverage
Mon at 3:01 AM
Hi,
Looks like some of my test environment issue, I was testing the toy project on the company PC.
As I tried exactly the same things on my personal laptop, it works.
Maybe there is some privilege setting on the company PC blocking the opencppcoverage execution and I shall check with IT guys.

Thanks for your help :D