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