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

CUDA not available causes SIGSEV #123

Open
vadixidav opened this issue Mar 28, 2019 · 1 comment
Open

CUDA not available causes SIGSEV #123

vadixidav opened this issue Mar 28, 2019 · 1 comment

Comments

@vadixidav
Copy link

When CUDA is not available at runtime, but cv-rs is built with the "cuda" feature enabled, then the program emits this message: OpenCV(3.4.1) Error: Gpu API call (no CUDA-capable device is detected) in allocate. Then an exception is thrown with that error which is not caught and blows up the stack. We need to catch exceptions for when CUDA is not available and either panic! on the Rust side, or give Result back via the API.

@Pzixel
Copy link
Collaborator

Pzixel commented Mar 28, 2019

CResutlt has relevant method to catch it. We could just use it. Panic may be a bad thing since GPU may appear after (e.g. dynamic videocard switch on laptop).

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