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

Requesting image search outside of screen boundaries fails with runtime error #195

Closed
dancesWithBugs opened this issue Dec 10, 2020 · 0 comments · Fixed by #196 or #212
Closed

Requesting image search outside of screen boundaries fails with runtime error #195

dancesWithBugs opened this issue Dec 10, 2020 · 0 comments · Fixed by #196 or #212
Labels
enhancement Enhancement to existing features

Comments

@dancesWithBugs
Copy link
Contributor

Version

1.5.0

Description

When I accidentally fed screen.find() a search region outside the screen's boundaries, the process terminated with a cryptic runtime error like that:

terminate called after throwing an instance of 'std::runtime_error'
  what():  OpenCV Error: (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in Mat, in file /node_modules/opencv-build/opencv/opencv/modules/core/src/matrix.cpp, line 473, status -215
Aborted (core dumped)

A promise rejection would seem preferable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to existing features
Projects
None yet
2 participants