Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible to improve "OpenCppCoverage cannot find the name of the module." situation ? #58

Open
comicfans opened this issue Jun 30, 2018 · 16 comments
Labels

Comments

@comicfans
Copy link

Before creating an issue, please make sure the answer is not in the FAQ.

FAQ explain that this error may be lead by antivirus and can be resolved by restart computer, but for some reason, our coverage environment is restricted , It's known that our antivirus always inject itself to process and makes some module related API not reliable, I wonder if when such situation happened on some modules, can we just ignore the unknown ones and continue to process left ones?

@OpenCppCoverage
Copy link
Owner

Hello,

I had 3 times this issue. I know that restarting solve the problem but I also had the case that this problem disappeared after an amount of time (~1 hour).

I had this issue on a dll located in a folder A. I can move folder A to B but I cannot copy A to another folder (or the opposite). Your application may have very strange issues in all cases.

What is the frequency of the issue? Can you check if it disappear after an amount of time?
Do you have any idea how to reproduce it?

OpenCppCoverage

@comicfans
Copy link
Author

unfortunately , it never disappears on our coverage environment, no matter how long time passed. So I wonder if OpenCppCoverage can ignore none critical parts of this problem and continue running , as I know , the antivirus cause this problem . another test PC without antivirus can run opencppcoverage successfully . but I have to have antivirus installed on our coverage environmnet.

@ukbea
Copy link

ukbea commented Jul 23, 2018

We also have this on our Jenkins+Docker agent setup. The error is consistent and we have no clue on how to fix it. Trying different source paths doesn't help.

@waltronix
Copy link

I come to the same issue, when trying to use OpenCppCoverage within a docker container.

@OpenCppCoverage
Copy link
Owner

Hello,

First thanks to all of you for reporting this issue and providing some useful information.
I was able to reproduce the issue when running OpenCppCoverage under Docker.
I spent a full day and do not yet found a working solution for this issue but I still have some ideas to test.
They require some time to implement and I will update this discussion when I have more information.

OpenCppCoverage

@OpenCppCoverage
Copy link
Owner

Hello,

I tried many Win32 functions to get the module path but I did not find a working solution :(

For Docker, I have created a bug issue here. I hope it will lead to a solution for Docker!

@comicfans: I cannot ignore this error as the whole module will be ignored and the coverage will be wrong. When I had this issue, I was able to run OpenCppCoverage by copying the folder of my program to another location. You can also try to generate your binaries to another location.
Please let me know if it helps!

OpenCppCoverage

@comicfans
Copy link
Author

comicfans commented Aug 19, 2018 via email

@waltronix
Copy link

Hello @OpenCppCoverage,

I have tried the copy approach and unfortunately it does not work, neither on my local machine, nor on our servers.

@OpenCppCoverage
Copy link
Owner

Hello waltronix,

This workaround is only for Windows and not for Docker.
I created an issue on Docker. I hope it will lead to a solution.

OpenCppCoverage

@aniruddhagore1984
Copy link

I hit this issue today and noticed it's been 2 years with no activity. Assuming it's not easy to fix the issues, I am curious what workarounds have others found since? :) Did you switch to another code coverage tool, or, something in the docker image helped you avoid this issue?

Would really appreciate any help here :)

@JasonDictos
Copy link

Running into this today on our CODEBUILD Windows 2019 container. Bummer.

@centlakestefan
Copy link

I have posted a WIP pull request with code working in docker using the Microsoft dbgeng.dll module to implement the debugger part.

@rpandurangan
Copy link

rpandurangan commented Oct 25, 2023

@OpenCppCoverage Kindly prioritise this PR from @centlakestefan we are badly waiting for opencppcoverage support in windows container.

@rpandurangan
Copy link

rpandurangan commented Oct 26, 2023

@centlakestefan I've tried building opencppcoverage from your branch and with that am able to run in docker container but for some test cases it throws access violation error even with --optimized_build. Same test works well in EC2 instance.
My env is windows server 2022 + VS 2022

*** Your application has thrown an unhandled exception. Code: 3221225477: EXCEPTION_ACCESS_VIOLATION

@centlakestefan
Copy link

@rpandurangan I have now fixed the problem with ACCESS_VIOLATION during startup. Sometimes the dbgeng does not give the initial breakpoint the code is expecting. I now set this option to make sure it's set.

I have also another branch in my repo with minidump support if the problem is in the test-subject.

@rpandurangan
Copy link

rpandurangan commented Oct 28, 2023

@centlakestefan Great it works this time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants