https://bugs.winehq.org/show_bug.cgi?id=47048
Bug ID: 47048 Summary: Logitech webcam does not show picture, only grey Product: Wine Version: 4.6 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: beniwtv@relamp.tk Distribution: ---
Created attachment 64216 --> https://bugs.winehq.org/attachment.cgi?id=64216 Log when running webcam application with qcap debugging enabled
I have a Logitech C920 HD Pro Webcam that works flawlessly on v4l2 in any Linux application. However, under Wine as long as I can remember this never worked in the 4.x series or 3.21 (didn't test older) - only showing a grey picture (even though the applications detect it).
Right now I am testing with Star Citizen's FOIP and "Portable Webcam" application, both which seem to use qcap/DirectShow for this.
I saw qcap being updated to v4l2 in 4.6 (even tried 4.7), but I still get a grey picture only.
Portable Webcam can be obtained from SourceForge: https://sourceforge.net/projects/portablewebcam/
I have attached a log with qcap debugging made with today's wine GIT version (let me know if I can/should further increase wine debugging channels)
What's also to note (but probably not related to the error) is that Wine seems to prefer the video1 device (a metadata/advanced settings device related to the other one) and not video0, so I have to rm that device node.
Cheers :)
https://bugs.winehq.org/show_bug.cgi?id=47048
Benedikt beniwtv@relamp.tk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |beniwtv@relamp.tk
https://bugs.winehq.org/show_bug.cgi?id=47048
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com URL| |https://sourceforge.net/pro | |jects/portablewebcam/ Keywords| |download Component|-unknown |quartz
https://bugs.winehq.org/show_bug.cgi?id=47048
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |damjan.jov@gmail.com Keywords| |source Status|UNCONFIRMED |NEW
--- Comment #1 from Damjan Jovanovic damjan.jov@gmail.com --- Still a bug, even with today's Git.
Camera light comes on, but the application window is a transparent borderless frame, with a title of "Portable Webcam [Initilizing video...]".
This is the output:
0009:fixme:qcap:fnCaptureGraphBuilder2_FindInterface (0x152100/0x152100)->({fb6c4281-0353-11d1-905f-0000c0cc16ba}, {73646976-0000-0010-8000-00aa00389b71}, 0x153be8, {c6e13340-30ac-11d0-a18c-00a0c9118956}, 0x31bd34) - workaround stub! 0009:fixme:qcap:fnCaptureGraphBuilder2_RenderStream (0x152100/0x152100)->({fb6c4281-0353-11d1-905f-0000c0cc16ba}, {73646976-0000-0010-8000-00aa00389b71}, 0x153be8, 0x151a88, 0x151c78) semi-stub! 0009:fixme:qcap:KSP_Get () Not adding a pin with PIN_CATEGORY_PREVIEW 0009:fixme:qcap:KSP_Get () Not adding a pin with PIN_CATEGORY_PREVIEW 0009:fixme:qcap:capture_query_accept (0x1541c0) stub 0009:fixme:qcap:fnCaptureGraphBuilder2_FindInterface (0x152100/0x152100)->({fb6c4281-0353-11d1-905f-0000c0cc16ba}, {73646976-0000-0010-8000-00aa00389b71}, 0x153be8, {c6e13340-30ac-11d0-a18c-00a0c9118956}, 0x31bd64) - workaround stub! 0009:err:ntdll:RtlpWaitForCriticalSection section 0x15224c "v4l.c: Capture.CritSect" wait timed out in thread 0009, blocked by 0030, retrying (60 sec) 0031:err:ntdll:RtlpWaitForCriticalSection section 0x15224c "v4l.c: Capture.CritSect" wait timed out in thread 0031, blocked by 0030, retrying (60 sec)
https://bugs.winehq.org/show_bug.cgi?id=47048
Damjan Jovanovic damjan.jov@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|source |
--- Comment #2 from Damjan Jovanovic damjan.jov@gmail.com --- It's some sort of deadlock in that application. I've submitted a ticket to get the source code (as I can't find it anywhere): https://sourceforge.net/p/portablewebcam/tickets/1/
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #3 from Zebediah Figura z.figura12@gmail.com --- Created attachment 65663 --> https://bugs.winehq.org/attachment.cgi?id=65663 some improvements for v4l2 threading
Our v4l threading code is horribly broken in a lot of ways. This patch might help, but might not. It's something of a work in progress.
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #4 from Damjan Jovanovic damjan.jov@gmail.com --- (In reply to Zebediah Figura from comment #3)
Created attachment 65663 [details] some improvements for v4l2 threading
Our v4l threading code is horribly broken in a lot of ways. This patch might help, but might not. It's something of a work in progress.
That patch doesn't help. winedbg's "bt all":
Backtracing for thread 0042 in process 0039 (Z:\Wine\Research\47048-webcam-grey\portable-webcam.exe): Backtrace: =>0 0x623360fd __sys___acl_get_link+0x37bfd() in libc.so.7 (0x00f2f888) 1 0x62234e8f __sys_lchflags+0xad6() in libc.so.7 (0x00f2f8a0) 2 0x628dddc9 wait_select_reply+0x38() in ntdll (0x00f2f8e0) 3 0x628deffc server_select+0x21b() in ntdll (0x00f2fa10) 4 0x6285f500 wait_semaphore+0xcf() in ntdll (0x00f2fb58) 5 0x6285f197 RtlpWaitForCriticalSection+0x276() in ntdll (0x00f2fc68) 6 0x6285f834 RtlEnterCriticalSection+0x133() in ntdll (0x00f2fcb8) 7 0x6592cd01 BaseOutputPinImpl_Deliver+0x40() in qcap (0x00f2fe28) 8 0x659322b5 ReadThread+0x434() in qcap (0x00f2ff18) 9 0x628e1c34 call_thread_func_wrapper+0xb() in ntdll (0x00f2ff28) 10 0x628e5a35 call_thread_func+0xb4() in ntdll (0x00f2ffdc) 11 0x628e1c26 call_thread_entry+0x9() in ntdll (0x00f2ffec)
Backtracing for thread 0040 in process 0039 (Z:\Wine\Research\47048-webcam-grey\portable-webcam.exe): Backtrace: =>0 0x623360fd __sys___acl_get_link+0x37bfd() in libc.so.7 (0x00a5f7d8) 1 0x62234e8f __sys_lchflags+0xad6() in libc.so.7 (0x00a5f7f0) 2 0x628dddc9 wait_select_reply+0x38() in ntdll (0x00a5f830) 3 0x628deffc server_select+0x21b() in ntdll (0x00a5f960) 4 0x628ef5e8 wait_objects+0x107() in ntdll (0x00a5faa8) 5 0x628ef4ce NtWaitForMultipleObjects+0x5d() in ntdll (0x00a5fae8) 6 0x62b618b5 WaitForMultipleObjectsEx+0x154() in kernelbase (0x00a5fc78) 7 0x64af2e62 X11DRV_MsgWaitForMultipleObjectsEx+0xa1() in winex11 (0x00a5fcd0) 8 0x633ee112 wait_message+0x71() in user32 (0x00a5fd28) 9 0x63376de8 wait_objects+0x187() in user32 (0x00a5fe08) 10 0x63376ac6 GetMessageW+0x1f5() in user32 (0x00a5fe78) 11 0x657a4abb message_thread_run+0xba() in quartz (0x00a5ff18) 12 0x628e1c34 call_thread_func_wrapper+0xb() in ntdll (0x00a5ff28) 13 0x628e5a35 call_thread_func+0xb4() in ntdll (0x00a5ffdc) 14 0x628e1c26 call_thread_entry+0x9() in ntdll (0x00a5ffec)
Backtracing for thread 003a in process 0039 (Z:\Wine\Research\47048-webcam-grey\portable-webcam.exe): Backtrace: =>0 0x623360fd __sys___acl_get_link+0x37bfd() in libc.so.7 (0x0031b688) 1 0x62234e8f __sys_lchflags+0xad6() in libc.so.7 (0x0031b6a0) 2 0x628dddc9 wait_select_reply+0x38() in ntdll (0x0031b6e0) 3 0x628deffc server_select+0x21b() in ntdll (0x0031b810) 4 0x6285f500 wait_semaphore+0xcf() in ntdll (0x0031b958) 5 0x6285f197 RtlpWaitForCriticalSection+0x276() in ntdll (0x0031ba68) 6 0x6285f834 RtlEnterCriticalSection+0x133() in ntdll (0x0031babc) 7 0x6593249c qcap_driver_stop_stream+0x1b() in qcap (0x0031bb08) 8 0x659337fe VfwCapture_Pause+0xad() in qcap (0x0031bb58) 9 0x657bbfa1 SendPause+0x30() in quartz (0x0031bb8c) 10 0x657bbf26 SendFilterMessage+0x365() in quartz (0x0031bc68) 11 0x657bb021 MediaFilter_Stop+0x100() in quartz (0x0031bce8) 12 0x657af76d MediaControl_Stop+0x3c() in quartz (0x0031bd14) 13 0x00473921 EntryPoint+0xffffffff() in portable-webcam (0x0031bd48) 14 0x0040315b EntryPoint+0xffffffff() in portable-webcam (0x0031bd70) 15 0x004742da EntryPoint+0xffffffff() in portable-webcam (0x0031bdb0) 16 0x0047536e EntryPoint+0xffffffff() in portable-webcam (0x0031bddc) 17 0x00456d8d EntryPoint+0xffffffff() in portable-webcam (0x0031bf18) 18 0x0043fe44 EntryPoint+0xffffffff() in portable-webcam (0x0031bf60) 19 0x0043fabf EntryPoint+0xffffffff() in portable-webcam (0x0031bf90) 20 0x0041dbe6 EntryPoint+0xffffffff() in portable-webcam (0x0031bfa8) 21 0x633e98bc WINPROC_wrapper+0x1b() in user32 (0x0031bfd8) 22 0x633eb78d call_window_proc+0x12c() in user32 (0x0031c074) 23 0x633ebee6 WINPROC_call_window+0x675() in user32 (0x0031c188) 24 0x6337af90 call_window_proc+0x12f() in user32 (0x0031c228) 25 0x633731e0 send_message+0x1bf() in user32 (0x0031c2b8) 26 0x633735ea SendMessageA+0x99() in user32 (0x0031c330) 27 0x00452921 EntryPoint+0xffffffff() in portable-webcam (0x0031c36c) 28 0x0043fd51 EntryPoint+0xffffffff() in portable-webcam (0x0031c3cc) 29 0x0041dbe6 EntryPoint+0xffffffff() in portable-webcam (0x0031c3e4) 30 0x633e98bc WINPROC_wrapper+0x1b() in user32 (0x0031c414) 31 0x633eb78d call_window_proc+0x12c() in user32 (0x0031c4b0) 32 0x633ed5bc WINPROC_CallProcWtoA+0x151b() in user32 (0x0031d7b4) 33 0x633ebbf5 WINPROC_call_window+0x384() in user32 (0x0031d8c8) 34 0x6337af90 call_window_proc+0x12f() in user32 (0x0031d968) 35 0x633731e0 send_message+0x1bf() in user32 (0x0031d9f8) 36 0x63373535 SendMessageW+0x94() in user32 (0x0031da78) 37 0x63338a77 set_focus_window+0x1e6() in user32 (0x0031db48) 38 0x633387af SetFocus+0x3ce() in user32 (0x0031dbf8) 39 0x00456b90 EntryPoint+0xffffffff() in portable-webcam (0x0031dc2c) 40 0x00456c09 EntryPoint+0xffffffff() in portable-webcam (0x0031dd64) 41 0x0043fe44 EntryPoint+0xffffffff() in portable-webcam (0x0031ddac) 42 0x0043fabf EntryPoint+0xffffffff() in portable-webcam (0x0031dddc) 43 0x0041dbe6 EntryPoint+0xffffffff() in portable-webcam (0x0031ddf4) 44 0x633e98bc WINPROC_wrapper+0x1b() in user32 (0x0031de24) 45 0x633eb78d call_window_proc+0x12c() in user32 (0x0031dec0) 46 0x633ed5bc WINPROC_CallProcWtoA+0x151b() in user32 (0x0031f1c4) 47 0x633ebbf5 WINPROC_call_window+0x384() in user32 (0x0031f2d8) 48 0x6337af90 call_window_proc+0x12f() in user32 (0x0031f378) 49 0x633731e0 send_message+0x1bf() in user32 (0x0031f408) 50 0x63373535 SendMessageW+0x94() in user32 (0x0031f480) 51 0x63338287 set_active_window+0x766() in user32 (0x0031f660) 52 0x633377ac set_foreground_window+0x23b() in user32 (0x0031f748) 53 0x63338b3f SetForegroundWindow+0x9e() in user32 (0x0031f788) 54 0x633e3f0c USER_SetWindowPos+0x53b() in user32 (0x0031f8b8) 55 0x633dd67c SetWindowPos+0x25b() in user32 (0x0031f988) 56 0x633e1573 show_window+0x672() in user32 (0x0031faa8) 57 0x633dc6b5 ShowWindow+0x84() in user32 (0x0031fb00) 58 0x00457eeb EntryPoint+0xffffffff() in portable-webcam (0x0031fb3c) 59 0x0043cef7 EntryPoint+0xffffffff() in portable-webcam (0x0031fc64) 60 0x0043fe44 EntryPoint+0xffffffff() in portable-webcam (0x0031fcac) 61 0x0043ccc7 EntryPoint+0xffffffff() in portable-webcam (0x0031fcc8) 62 0x0043f998 EntryPoint+0xffffffff() in portable-webcam (0x0031fcf4) 63 0x0043fa03 EntryPoint+0xffffffff() in portable-webcam (0x0031fe30) 64 0x0043fe44 EntryPoint+0xffffffff() in portable-webcam (0x0031fe78) 65 0x0043ccc7 EntryPoint+0xffffffff() in portable-webcam (0x0031fe94) 66 0x0043ba44 EntryPoint+0xffffffff() in portable-webcam (0x0031fed8) 67 0x0047593c EntryPoint+0xffffffff() in portable-webcam (0x0031fef0) 68 0x62c7bca2 call_process_entry+0x11() in kernel32 (0x0031ff08) 69 0x62c7bed1 start_process+0x200() in kernel32 (0x0031ffdc) 70 0x62c7bcae start_process_wrapper+0x9() in kernel32 (0x0031ffec) 0x628e1c39 DbgBreakPoint+0x1 in ntdll: ret
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #5 from Zebediah Figura z.figura12@gmail.com --- Mmh, yeah. That's a pervasive problem we have that should probably be resolved first. As far as I can tell, we want a design where the streaming thread never takes the filter lock.
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #6 from Benedikt beniwtv@relamp.tk --- I also tested the patch, but it unfortunately did not work.
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #7 from Damjan Jovanovic damjan.jov@gmail.com --- (In reply to Benedikt from comment #0)
I have a Logitech C920 HD Pro Webcam that works flawlessly on v4l2 in any Linux application. However, under Wine as long as I can remember this never worked in the 4.x series or 3.21 (didn't test older) - only showing a grey picture (even though the applications detect it).
It sounds to me like you're looking for any app that can capture video in Wine. There are some that do. Try the Windows version of VLC for example (Media -> Open Capture Device -> Play).
What's also to note (but probably not related to the error) is that Wine seems to prefer the video1 device (a metadata/advanced settings device related to the other one) and not video0, so I have to rm that device node.
That /dev/video0 vs video1 bug was fixed by several commits between 20 and 23 April 2019, just a few days after your bug report. Please retest with a recent version of Wine, and if you still get it, report which version.
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #8 from Benedikt beniwtv@relamp.tk --- (In reply to Damjan Jovanovic from comment #7)
It sounds to me like you're looking for any app that can capture video in Wine. There are some that do. Try the Windows version of VLC for example (Media -> Open Capture Device -> Play).
We're actually looking to get FOIP in Star Citizen working :) Some apps may use a different API I guess for capturing, indeed Star Citizen seems to use the same as "Portable Webcam" (hence the example).
That /dev/video0 vs video1 bug was fixed by several commits between 20 and 23 April 2019, just a few days after your bug report. Please retest with a recent version of Wine, and if you still get it, report which version.
Yes, I tried with Wine 4.20 and this seems to work properly now.
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #9 from Zebediah Figura z.figura12@gmail.com --- (In reply to Benedikt from comment #8)
(In reply to Damjan Jovanovic from comment #7)
It sounds to me like you're looking for any app that can capture video in Wine. There are some that do. Try the Windows version of VLC for example (Media -> Open Capture Device -> Play).
We're actually looking to get FOIP in Star Citizen working :) Some apps may use a different API I guess for capturing, indeed Star Citizen seems to use the same as "Portable Webcam" (hence the example).
If you don't have a bug report already, please file one, and attach a log with WINEDEBUG=+qcap,+quartz,+strmbase,+gstreamer,+timestamp,+seh.
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #10 from Benedikt beniwtv@relamp.tk --- This is the bug I filed :) (See attachment for log)
-> I will do a new log though with the additional debug channels (I think I only used qcap in that log)
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #11 from Zebediah Figura z.figura12@gmail.com --- (In reply to Benedikt from comment #10)
This is the bug I filed :) (See attachment for log)
-> I will do a new log though with the additional debug channels (I think I only used qcap in that log)
Serves me right for not reading the actual post >_>
I misread and assumed you were talking about a different bug. Sorry for the confusion. A log with additional channels might help, but it's also not hard to pick out ways in which our v4l code can race.
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #12 from Zebediah Figura z.figura12@gmail.com --- The deadlock visible from the last logs should be fixed by https://source.winehq.org/git/wine.git/commitdiff/84e55192fa2d6610acac2edfef3421cba0705331, but there are some regressions in the sample grabber, and even with those fixed it still hangs—looks like a deadlock between the main thread and the sample grabber callback, which is waiting for messages and never returns. I'll keep working on it.
https://bugs.winehq.org/show_bug.cgi?id=47048
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #13 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with wine-5.16?
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #14 from Benedikt beniwtv@protonmail.com --- At least for me, my camera now works, but I have no idea if this particular bug was fixed or could occur in other cases.
https://bugs.winehq.org/show_bug.cgi?id=47048
--- Comment #15 from joaopa jeremielapuree@yahoo.fr --- It should be safe to close this bug as FIXED. If you find others bugs, you could open a new bug report.
https://bugs.winehq.org/show_bug.cgi?id=47048
Benedikt beniwtv@protonmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #16 from Benedikt beniwtv@protonmail.com --- Let's mark it fixed then.
https://bugs.winehq.org/show_bug.cgi?id=47048
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #17 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.17.