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

want the program to be less fragile #1183

Open
Jeremyly opened this issue Jun 29, 2024 · 1 comment
Open

want the program to be less fragile #1183

Jeremyly opened this issue Jun 29, 2024 · 1 comment

Comments

@Jeremyly
Copy link

Description

I encountered an error while using the AddWeighted() scheme to fuse images: signal aligned during external code execution. Causing my program to crash directly. I know what caused this error. What I am concerned about is that the program crash caused by this error cannot be recovered by 'recover()'. This problem is very serious because such an error directly causes the program to crash without automatic recovery. Is there any way to prevent this situation from happening? I just want the program to be less fragile!

gocv:0.37.0 windows

Your Environment

  • Operating System and version: windows10
  • OpenCV version used:4.10
  • GoCV version used: 0.37.0
  • Go version: 1.22
@NicoChenyt
Copy link
Contributor

In my opinion, this is a defect of opencv itself. In my experience of using opencv, every function may cause exceptions, even when using opencv directly in a C++ project. Some exceptions can be caught by catch cv::Exception, but memory segmentation errors will still cause the program to crash and exit directly. So I can only be more careful and try to check every parameters. For example, whether the Mat is empty, whether the size/channel/type is the same, etc.

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

No branches or pull requests

2 participants