(In reply to Andreas Pehrson [:pehrsons] from comment #28) > Thanks Yannis for the repro tooling! Since you're all setup, could you give [this tentative fix](https://treeherder.mozilla.org/jobs?repo=try&revision=39badb838fc8960c0166bc528918fff387b880bf) a spin to see whether it seems sufficient? I confirm that this patch does prevent the crash -- at least when triggered with my reproducer in the way described above. I was a bit worried because it seems that the reproducer was now finding two windows belonging to the VideoCapture thread: ``` Found VideoCapture thread window [hwnd = 00000000003105F4, pid = 12632, tid = 18088], sending WM_QUIT... Result: 1 Found VideoCapture thread window [hwnd = 00000000002F06F8, pid = 12632, tid = 18088], sending WM_QUIT... Result: 1 ``` But actually that would already be the case before the patch if I didn't send the `WM_QUIT` message, so it seems normal: ``` Found VideoCapture thread window [hwnd = 00000000000B03E0, pid = 28796, tid = 14512]. Found VideoCapture thread window [hwnd = 00000000000B03C6, pid = 28796, tid = 14512]. ```
Bug 1790160 Comment 30 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Andreas Pehrson [:pehrsons] from comment #28) > Thanks Yannis for the repro tooling! Since you're all setup, could you give [this tentative fix](https://treeherder.mozilla.org/jobs?repo=try&revision=39badb838fc8960c0166bc528918fff387b880bf) a spin to see whether it seems sufficient? I confirm that this patch does prevent the crash -- at least when triggered with my reproducer in the way described above. I was a bit worried because it seems that the reproducer was now finding two windows belonging to the VideoCapture thread: ``` Found VideoCapture thread window [hwnd = 00000000003105F4, pid = 12632, tid = 18088], sending WM_QUIT... Result: 1 Found VideoCapture thread window [hwnd = 00000000002F06F8, pid = 12632, tid = 18088], sending WM_QUIT... Result: 1 ``` But actually that would already be the case before the patch if I didn't send the `WM_QUIT` message, so it seems normal (probably the second window was dead by the time `EnumWindows` would reach it): ``` Found VideoCapture thread window [hwnd = 00000000000B03E0, pid = 28796, tid = 14512]. Found VideoCapture thread window [hwnd = 00000000000B03C6, pid = 28796, tid = 14512]. ```
(In reply to Andreas Pehrson [:pehrsons] from comment #28) > Thanks Yannis for the repro tooling! Since you're all setup, could you give [this tentative fix](https://treeherder.mozilla.org/jobs?repo=try&revision=39badb838fc8960c0166bc528918fff387b880bf) a spin to see whether it seems sufficient? I confirm that this patch does prevent the crash -- at least when triggered with my reproducer in the way described above. I was a bit worried because it seems that the reproducer was now finding two windows belonging to the VideoCapture thread: ``` Found VideoCapture thread window [hwnd = 00000000003105F4, pid = 12632, tid = 18088], sending WM_QUIT... Result: 1 Found VideoCapture thread window [hwnd = 00000000002F06F8, pid = 12632, tid = 18088], sending WM_QUIT... Result: 1 ``` But actually that would already be the case before the patch if I didn't send the `WM_QUIT` message, so it seems normal (probably the second window was dead by the time `EnumWindows` would reach it when sending `WM_QUIT`): ``` Found VideoCapture thread window [hwnd = 00000000000B03E0, pid = 28796, tid = 14512]. Found VideoCapture thread window [hwnd = 00000000000B03C6, pid = 28796, tid = 14512]. ```