Closed RReverser closed 2 years ago
did you put 1 .jpg file into the vusb cameras virtual directory? i need to check if "no image" is handled well enough.
did you put 1 .jpg file into the vusb cameras virtual directory?
Hmm, no, I didn't know it's required... Is that documented somewhere? I thought vusb just produces some hardcoded static image in that case.
i need to check if "no image" is handled well enough.
Yeah it would be useful to print a helpful error in that case.
Interesting, I see that the code does try to report a meaningful error message, I guess it's just not printed by gphoto2 CLI?
The problem is more that we returned GeneralError and the ptp2 driver ignored it. I am returning a different error now.
Linking my comments from the commit here so that they don't get lost: https://github.com/gphoto/libgphoto2/commit/cf154a3d81fcd4b6ce12c57f428c2e712607e109#r84900329
Actually, re:
There is also one more similar code at line 1107 above that still reports PTP_RC_GeneralError.
Aren't those two copies of code doing exactly the same thing? Looks like a mistake (note section starting from 1154 and compare with one at 1136):
FWIW it doesn't look like changing PTP error type alone fixed the hang-up when a file is missing.
I don't think https://github.com/gphoto/libgphoto2/commit/8b462f8c835b9d3ab0cee4117e0b0458dac00445 fixed it :/
Now seeing "Setting port timeout to 20000 milliseconds." in logs, but after that it still hangs trying "gp_port_vusb_check_int", resulting "Reading PTP event failed: Timeout reading from or writing to the port (-10)" and so on and on forever.
i tried with gphoto2 --capture-image and it terminates for me.
can you get a debugtrace of gphoto2 --capture-image --debug --debug-logfile=xx.log
Describe the bug
When using
vusb
virtual camera, capturing hangs forever, although earlier docs (e.g. https://hackweek.opensuse.org/projects/simulate-ptp-cameras-in-libgphoto2) suggest that capturing used to work.Name the camera
(virtual camera)
libgphoto2 and gphoto2 version
To Reproduce
Build with
--enable-vusb
and run e.g.Here's the debug log, looks like an internal error.
out.log