Closed
Bug 1402818
Opened 8 years ago
Closed 8 years ago
Assertion failed: IsGUIThread(false) in mouse_cursor_monitor_win.cc
Categories
(Core :: WebRTC: Audio/Video, defect, P2)
Tracking
()
RESOLVED
FIXED
mozilla58
People
(Reporter: pehrsons, Assigned: dminor)
References
Details
Attachments
(1 file, 1 obsolete file)
|
1.14 KB,
patch
|
pehrsons
:
review+
ritu
:
approval-mozilla-beta-
|
Details | Diff | Splinter Review |
See https://treeherder.mozilla.org/#/jobs?repo=try&revision=b1cda02d4f1fae6c85e96f82ac13690299fca3c1
Or, if that is gone when you load it, enable test_getUserMedia_basicScreenshare.html on windows debug and run on try.
This started happening with the changes done to that test in bug 1380346.
| Assignee | ||
Comment 1•8 years ago
|
||
This assertion was added in the branch 57 update, check blame at [1] and it is not present in upstream webrtc.org [2] as the IsGUIThread checks are our code. I'm going to suggest that this was added by accident, when we were adding the IsGUIThread to the methods that require them.
[1] http://searchfox.org/mozilla-central/rev/f6dc0e40b51a37c34e1683865395e72e7fca592c/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc#112
[2] https://cs.chromium.org/chromium/src/third_party/webrtc/modules/desktop_capture/mouse_cursor_monitor_win.cc?q=MouseCursorMonitorWin&sq=package:chromium&l=102
| Assignee | ||
Comment 2•8 years ago
|
||
| Reporter | ||
Comment 3•8 years ago
|
||
Here's a try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=106483ae106cfe7b3b3dd1d25b6575a24a8767ac
I just wrote the patch myself for try, but content is the same.
Comment 4•8 years ago
|
||
(In reply to Dan Minor [:dminor] from comment #1)
> This assertion was added in the branch 57 update, check blame at [1] and it
> is not present in upstream webrtc.org [2] as the IsGUIThread checks are our
> code. I'm going to suggest that this was added by accident, when we were
> adding the IsGUIThread to the methods that require them.
We added a bunch of IsGUIThread() assertions after fixing a problem with not being on a UI thread in bug 1060738 (jimm), including this one. You're just seeing the changes we're carrying being merged forward; if a change is part of the "rollup" patch, it likely was there before the update. Check out the changeset before the webrtc.org landing to verify.
The really odd thing is that this was called from PlatformUIThread::Run().... 8-/ ??!
Comment 5•8 years ago
|
||
Comment on attachment 8911772 [details] [diff] [review]
Remove IsGUIThread() assertion from Capture()
Review of attachment 8911772 [details] [diff] [review]:
-----------------------------------------------------------------
This was added on purpose, and we *should* be running on a UI thread unless that class is entirely broken in the webrtc.org 57 update. Asserting is right, I believe. If PlatformUIThread isn't a UI thread, we need to make it one ASAP.
Attachment #8911772 -
Flags: review?(rjesup) → review-
| Assignee | ||
Comment 6•8 years ago
|
||
> We added a bunch of IsGUIThread() assertions after fixing a problem with not
> being on a UI thread in bug 1060738 (jimm), including this one. You're just
> seeing the changes we're carrying being merged forward; if a change is part
> of the "rollup" patch, it likely was there before the update. Check out the
> changeset before the webrtc.org landing to verify.
>
Yes, you're right and I should know better, I've been bitten by this before.
| Assignee | ||
Comment 7•8 years ago
|
||
After the call to ApplyConstraints() the same thread which previously was running ok fails the IsGUIThread() assertion the very next time Capture() is called. I see garbage values in the local variables in the debugger, so maybe we're failing to stop the thread after some data is freed, I'm not certain yet.
At any rate, it looks like the PlatformUIThread is a UI thread right up to the point after ApplyConstraints is called.
| Assignee | ||
Comment 8•8 years ago
|
||
Attachment #8911772 -
Attachment is obsolete: true
Attachment #8913396 -
Flags: review?(apehrson)
| Assignee | ||
Comment 9•8 years ago
|
||
| Reporter | ||
Comment 10•8 years ago
|
||
Comment on attachment 8913396 [details] [diff] [review]
Set hwnd_ to NULL in Stop()
Review of attachment 8913396 [details] [diff] [review]:
-----------------------------------------------------------------
This makes sense, thanks! Can you uplift this to webrtc.org?
Attachment #8913396 -
Flags: review?(apehrson) → review+
| Reporter | ||
Comment 11•8 years ago
|
||
Try push with bug 1380346 which triggered this before: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b73790aacbe7c3c7a59babbc57d8d8d262daf022
| Reporter | ||
Comment 12•8 years ago
|
||
| Assignee | ||
Comment 13•8 years ago
|
||
(In reply to Andreas Pehrson [:pehrsons] from comment #10)
> Comment on attachment 8913396 [details] [diff] [review]
> Set hwnd_ to NULL in Stop()
>
> Review of attachment 8913396 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> This makes sense, thanks! Can you uplift this to webrtc.org?
Thanks! Unless I'm misreading blame for the second time on this bug :) PlatformUIThread is our code and does not exist upstream. I guess at some point we should try to either upstream the whole thing or determine what we're doing differently that we require the changes.
Comment 14•8 years ago
|
||
Pushed by dminor@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/835180921387
Set hwnd_ to NULL in PlatformUIThread::Stop(); r=pehrsons
| Reporter | ||
Comment 15•8 years ago
|
||
(In reply to Dan Minor [:dminor] from comment #13)
> (In reply to Andreas Pehrson [:pehrsons] from comment #10)
> > Comment on attachment 8913396 [details] [diff] [review]
> > Set hwnd_ to NULL in Stop()
> >
> > Review of attachment 8913396 [details] [diff] [review]:
> > -----------------------------------------------------------------
> >
> > This makes sense, thanks! Can you uplift this to webrtc.org?
>
> Thanks! Unless I'm misreading blame for the second time on this bug :)
> PlatformUIThread is our code and does not exist upstream. I guess at some
> point we should try to either upstream the whole thing or determine what
> we're doing differently that we require the changes.
Right, thanks for checking that!
Comment 16•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
| Assignee | ||
Comment 18•8 years ago
|
||
Comment on attachment 8913396 [details] [diff] [review]
Set hwnd_ to NULL in Stop()
Approval Request Comment
[Feature/Bug causing the regression]:
This problem was present when this code was initially landed in Bug 1060738.
[User impact if declined]:
Running code that accesses UI functionality on Windows from a non-UI thread can lead to crashes. Without this fix, if Stop() and then Start() is called on the thread, what was previously a UI thread will no longer be one.
[Is this code covered by automated tests?]:
Yes, this issue was discovered by modifying one of our screen sharing unit tests.
[Has the fix been verified in Nightly?]:
Yes.
[Needs manual test from QE? If yes, steps to reproduce]:
No.
[List of other uplifts needed for the feature/fix]:
None.
[Is the change risky?]:
No.
[Why is the change risky/not risky?]:
This just resets a variable so that initialization will happen properly if we call Stop() then Start().
[String changes made/needed]:
None.
Flags: needinfo?(dminor)
Attachment #8913396 -
Flags: approval-mozilla-beta?
Comment on attachment 8913396 [details] [diff] [review]
Set hwnd_ to NULL in Stop()
This is not a new regression, recommend letting this fix ride the 58 train.
Attachment #8913396 -
Flags: approval-mozilla-beta? → approval-mozilla-beta-
status-firefox56:
--- → affected
Updated•8 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•