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

Access violation error:tutorial-apriltag-detector-live #1203

Open
Hawthorne0 opened this issue Jul 15, 2023 · 8 comments
Open

Access violation error:tutorial-apriltag-detector-live #1203

Hawthorne0 opened this issue Jul 15, 2023 · 8 comments

Comments

@Hawthorne0
Copy link

Hawthorne0 commented Jul 15, 2023

Hello everyone. When I follow the tutorial of AprilTag marker detection(https://visp-doc.inria.fr/doxygen/visp-daily/tutorial-detection-apriltag.html), the program has encountered access violation error. How can I fix it.
1

@fspindle
Copy link
Contributor

Which OS ?
Which Compiler ?
Which ViSP version ?
Which grabber used in tutorial-apriltag-detector-live.cpp ?
Does tutorial-apriltag-detector.cpp work ?

@Hawthorne0
Copy link
Author

Hawthorne0 commented Jul 17, 2023

Which OS ? Which Compiler ? Which ViSP version ? Which grabber used in tutorial-apriltag-detector-live.cpp ? Does tutorial-apriltag-detector.cpp work ?

windows 11 22H2,visual studio 2022,visp 3.5.0 and OpenCV grabber. Both programs dont work with the same error(access violation). Any help would be greatly appreciated.

@fspindle
Copy link
Contributor

The first thing to do is to try with visp github version.
Check also that the location of ViSP dll files are in the Path env var.

@Hawthorne0
Copy link
Author

Hawthorne0 commented Jul 17, 2023

The first thing to do is to try with visp github version. Check also that the location of ViSP dll files are in the Path env var.
That's right. When I encountered this error, I upgraded visp using github version firstly. But it still doesnot work with the same error. The location of ViSP dll files were also checked.
I guess maybe this line: detector.detect(I, tagSize, cam, cMo_vec) of tutorial-apriltag-detector-live.cpp arises unexpected problems cause the program could work without error by deleteing this line. I dont know how to fix it.

@fspindle
Copy link
Contributor

There is something wrong in your setup. What is the content of your ViSP-third-party.txt file ?

Try to do a fresh visp build without 3rd parties and run tutorial-apriltag-detector.cpp again.
If it doesnt' work use the debugger to figure out the issue.

@Hawthorne0
Copy link
Author

Okay, thanks a lot.

@yangqingnian
Copy link

good @Hawthorne0

@Hawthorne0
Copy link
Author

I solve this issue by doing a fresh visp and the most important step I think is to switch the vs mode from debug (default) to release. If I use the upgraded visp and switch the vs to debug, the same error shows up. So if you guys have the same error like this, change the vs code mode maybe a good solution after following the tutorial step by step. Finally, thanks a lost for fspindle's help and all contributors of this project.

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

No branches or pull requests

3 participants