Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ macOS EWS ] media/video-remove-insert-repaints.html is a flaky crash #17021

Conversation

aestes
Copy link
Contributor

@aestes aestes commented Aug 24, 2023

8f95bb7

[ macOS EWS ] media/video-remove-insert-repaints.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=260663
rdar://114387091

Reviewed by Jer Noble.

If VideoFullscreenManager::removeContext is called with a contextId that doesn't exist in
m_contextMap then a new model would be created with a null video element, leading to a crash when
attempting to remove the video element from m_videoElements. Addressed this by returning early in
VideoFullscreenManager::removeContext if no model/interface pair exists for the given contextId.
Assert that this does not occur to help us track down the underlying issue in Debug builds
(removeContext should not be called for a non-existent contextId).

* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionManager::removeContext):
* Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::VideoFullscreenManager::removeContext):

Canonical link: https://commits.webkit.org/267257@main

1732994

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@aestes aestes requested a review from cdumez as a code owner August 24, 2023 16:48
@aestes aestes self-assigned this Aug 24, 2023
@aestes aestes added the Media Bugs related to the HTML 5 Media elements. label Aug 24, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 24, 2023
@aestes aestes removed the merging-blocked Applied to prevent a change from being merged label Aug 24, 2023
@aestes aestes force-pushed the eng/-macOS-EWS--mediavideo-remove-insert-repaints-html-is-a-flaky-crash branch from 7a7f93f to 50c2c09 Compare August 24, 2023 16:52
if (!model || !interface)
return;

Ref videoElement = *model->videoElement();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could still crash, potentially. Maybe another ASSERT(model->videoElement()) and early return here?

@aestes aestes force-pushed the eng/-macOS-EWS--mediavideo-remove-insert-repaints-html-is-a-flaky-crash branch from 50c2c09 to d9af583 Compare August 24, 2023 21:27
@aestes aestes force-pushed the eng/-macOS-EWS--mediavideo-remove-insert-repaints-html-is-a-flaky-crash branch from d9af583 to 1732994 Compare August 24, 2023 21:31
@aestes aestes added the merge-queue Applied to send a pull request to merge-queue label Aug 25, 2023
https://bugs.webkit.org/show_bug.cgi?id=260663
rdar://114387091

Reviewed by Jer Noble.

If VideoFullscreenManager::removeContext is called with a contextId that doesn't exist in
m_contextMap then a new model would be created with a null video element, leading to a crash when
attempting to remove the video element from m_videoElements. Addressed this by returning early in
VideoFullscreenManager::removeContext if no model/interface pair exists for the given contextId.
Assert that this does not occur to help us track down the underlying issue in Debug builds
(removeContext should not be called for a non-existent contextId).

* Source/WebKit/WebProcess/cocoa/PlaybackSessionManager.mm:
(WebKit::PlaybackSessionManager::removeContext):
* Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::VideoFullscreenManager::removeContext):

Canonical link: https://commits.webkit.org/267257@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/-macOS-EWS--mediavideo-remove-insert-repaints-html-is-a-flaky-crash branch from 1732994 to 8f95bb7 Compare August 25, 2023 01:19
@webkit-commit-queue
Copy link
Collaborator

Committed 267257@main (8f95bb7): https://commits.webkit.org/267257@main

Reviewed commits have been landed. Closing PR #17021 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 8f95bb7 into WebKit:main Aug 25, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Media Bugs related to the HTML 5 Media elements.
Projects
None yet
5 participants