-
Notifications
You must be signed in to change notification settings - Fork 19
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
Segfault when attempting to start stream #10
Comments
If you have a backtrace that would be very helpful! BTW: You are allowed to panic in the stream, the current behaviour is to catch at the FFI behaviour and ignore |
@Noah-Kennedy I pushed the latest version to 'crates.io` which should fix a double free if your function should crash mid-stream. |
@Noah-Kennedy Have you managed to get somewhere on the debugging? |
@mulimoen Have same issue with a different camera (UHM 350) Ubuntu 18.04 64 bit
Rust doesn't provide the option to expose the stacktrace it seems. EDIT: obtained stacktrace via debugger
|
I'm not familiar with the output from |
Gef is an extension of GDB geared towards binary analysis. Its got multiple sections to it,
My x86 assembly is quite weak, but looks like its trying to dereference
|
Poking the crash a bit, it appears
|
I've made a bugfix in #18, please check if this solves your problem |
It doesn't segfault now, but it does still panic.
|
That would suggest there are no formats available for streaming. Does your camera work with other software using uvc? |
Unclear, I haven't tested the camera against |
You could call |
using the provided What did appear to work was manually constructing a let mut streamh = devh.get_stream_handle_with_format(StreamFormat {
width: 1920,
height: 1080,
fps: 30,
format: FrameFormat::MJPEG
}).unwrap(); This produces a bunch of non-fatal errors, but does open the camera and streams live video, so it appears to work.
|
Not all cameras supports all modes and configurations, those errors are somewhat normal. The first frame is also corrupted, I've noticed this before on my own hardware |
Thanks for the feedback. If i have any further issues they will go in their own tickets. |
When attempting to start a stream (I am trying to stream video from a Logitech C920), the program segfaults.
Code:
When running it, I get:
Some other program is must be using my camera for some reason, which probably should be causing either a panic or causing a function to return an error, but should probably not be causing a segfault from safe Rust.
If you'd like, I can try and debug this from my machine, and I can try and potentially pull request a fix in.
The text was updated successfully, but these errors were encountered: