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
FindCirclesGrid AccessViolation #106
Comments
Thank you. The exception does not occur in my environment, but I agree with you. I added GC.KeepAlive before the end of FindCirclesGrid. This means that I have to add GC.KeepAlive to most OpenCvSharp methods... 😱 |
You can try moving the whole calibration routine into an extra DLL and call this from the main program. This triggers an AccessViolation for sure (at least at my environment: Latest OpenCVSharp and VS2013 Update 4). Also the error is more likely, when the PC is not under load. |
I could demonstrate the error. thanks! The AccessViolationException seems to be occurred by the ambiguity (you said 'bug one') of the native FindCirclesGrid invoker. After fixing the bug, the exception does not occur in my environment. |
It seems to work for me now. Thank you very much! |
Sorry, I have to reopen it: I used the function with no explicit blob detector called. When I use a SBD, the access violation occurs again (At least, when I'm using a grayscale image). If I use the same image after thresholding it (only one channel out of three used, the other two are zero, because there was an error in my routine), everythink works, so propably, the bug is in the SimpleBlobDetector? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I think, these are two different bugs, perhaps they mix up
Bug one was first mentioned in:
http://stackoverflow.com/questions/30004528/opencvsharp-accessviolationexception-in-findcirclesgrid
It seems that the call to the native function is ambiguous.
Bug two (if not the same as bug one or just masking it?)
If FindCirclesGrid is called in a function, the parameters seem to be garbage collected while still running. This leads to a AccessViolation. Accessing all parameters just after the whole detection seems to solve this.
The text was updated successfully, but these errors were encountered: