NEW251229
Mastodon video exits fullscreen immediately in Safari, MiniBrowser assertion failure
https://bugs.webkit.org/show_bug.cgi?id=251229
Summary Mastodon video exits fullscreen immediately in Safari, MiniBrowser assertion ...
Jeff Johnson
Reported 2023-01-26 15:56:27 PST
Created attachment 464676 [details] MiniBrowser lldb backtrace Summary: There's a video on Mastodon that causes Safari to exit fullscreen as soon as you enter fullscreen. This doesn't happen in Firefox or Google Chrome. I've tested with Safari 16.3 and Safari Technology Preview Release 162 running macOS Ventura 13.2 and Monterey 12.6.3 on M1 Apple silicon. I also built WebKit from source (commit 8c0586df02759523c7ba36188adcb4f85a2033de) and tested with MiniBrowser, which hits an assertion failure after the video exits fullscreen. Attached is the lldb backtrace. Steps to reproduce: 1) Open https://mstdn.plus/@lapcatsoftware 2) Scroll down to the video from https://mstdn.plus/@lapcatsoftware/10974137414728390 on January 23. (Note that the bug doesn't reproduce if you open the post directly, for unknown reasons. You have to use the timeline from step 1.) 3) Open the contextual menu on the video and select Enter Full Screen. Expected results: The video plays in full screen. Actual results: The video flashes goes into full screen momentarily, flashes, and exits full screen.
Attachments
MiniBrowser lldb backtrace (24.89 KB, text/plain)
2023-01-26 15:56 PST, Jeff Johnson
no flags
dumped render tree (400.51 KB, text/plain)
2026-10-14 02:08 PDT, Frédéric Wang Nélar
no flags
Jeff Johnson
Comment 2 2023-01-26 16:27:46 PST
I found another example: the YouTube video https://hachyderm.io/@mikeymikey/109758095653559893 on the timeline https://hachyderm.io/@mikeymikey Again, the bug only occurs if you use the timeline rather than the direct post link. You can try to enter full screen from the YouTube full screen widget.
Radar WebKit Bug Importer
Comment 3 2023-01-26 16:50:35 PST
Alexey Proskuryakov
Comment 4 2023-01-26 16:52:49 PST
Looks like this assertion is there since 2012 at least: ASSERT(m_element); if (!m_element) return;
Frédéric Wang Nélar
Comment 6 2026-10-14 02:06:54 PDT
Complete backtrace: #0 0x0000007000002920 in WTFCrashWithInfo at /Users/fred/WebKit/WebKitBuild/Debug/usr/local/include/wtf/Assertions.h:1140 #1 0x00000070042ab2c0 in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker()::'lambda'(WebCore::RenderObject const&)::operator()(WebCore::RenderObject const&) const at /Users/fred/WebKit/Source/WebCore/page/LocalFrameViewLayoutContext.cpp:97 #2 0x00000070042ab1f0 in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker at /Users/fred/WebKit/Source/WebCore/page/LocalFrameViewLayoutContext.cpp:104 #3 0x000000700424f3c0 in WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker at /Users/fred/WebKit/Source/WebCore/page/LocalFrameViewLayoutContext.cpp:84 #4 0x000000700424e648 in WebCore::LocalFrameViewLayoutContext::performLayout at /Users/fred/WebKit/Source/WebCore/page/LocalFrameViewLayoutContext.cpp:312 #5 0x000000700424eb7c in WebCore::LocalFrameViewLayoutContext::interleavedLayout at /Users/fred/WebKit/Source/WebCore/page/LocalFrameViewLayoutContext.cpp:200 #6 0x000000700178733c in WebCore::Document::resolveStyle at /Users/fred/WebKit/Source/WebCore/dom/Document.cpp:2921 #7 0x00000070017885e4 in WebCore::Document::updateStyleIfNeeded at /Users/fred/WebKit/Source/WebCore/dom/Document.cpp:3077 #8 0x0000007001788b14 in WebCore::Document::updateLayout at /Users/fred/WebKit/Source/WebCore/dom/Document.cpp:3156 #9 0x0000007001788ac0 in WebCore::Document::updateLayout at /Users/fred/WebKit/Source/WebCore/dom/Document.cpp:3152 #10 0x000000011e3fb898 in WebKit::WebFullScreenManager::willEnterFullScreen at /Users/fred/WebKit/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:594 #11 0x000000011e421a04 in WebKit::WebFullScreenManager::performEnterFullScreen()::$_2::operator()(bool) at /Users/fred/WebKit/Source/WebKit/WebProcess/FullScreen/WebFullScreenManager.cpp:507 #12 0x000000011e421984 in std::__1::__invoke[abi:sqn220106]<WebKit::WebFullScreenManager::performEnterFullScreen()::$_2, bool> at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/usr/include/c++/v1/__type_traits/invoke.h:90 #13 0x000000011e421950 in std::__1::__apply_tuple_impl[abi:sqn220106]<WebKit::WebFullScreenManager::performEnterFullScreen()::$_2, std::__1::tuple<bool>, 0ul> at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/usr/include/c++/v1/tuple:1397 #14 0x000000011e421914 in std::__1::apply[abi:sqn220106]<WebKit::WebFullScreenManager::performEnterFullScreen()::$_2, std::__1::tuple<bool>> at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX27.0.sdk/usr/include/c++/v1/tuple:1401 #15 0x000000011e42187c in IPC::Connection::callReply<Messages::WebFullScreenManagerProxy::EnterFullScreen, WebKit::WebFullScreenManager::performEnterFullScreen()::$_2> at /Users/fred/WebKit/Source/WebKit/Platform/IPC/Connection.h:1164 #16 0x000000011e4217a0 in WTF::CompletionHandler<void (IPC::Connection*, IPC::Decoder*)> IPC::Connection::makeAsyncReplyCompletionHandler<Messages::WebFullScreenManagerProxy::EnterFullScreen, WebKit::WebFullScreenManager::performEnterFullScreen()::$_2>(WebKit::WebFullScreenManager::performEnterFullScreen()::$_2&&, WTF::ThreadLikeAssertion)::'lambda'(IPC::Connection*, IPC::Decoder*)::operator()(IPC::Connection*, IPC::Decoder*) at /Users/fred/WebKit/Source/WebKit/Platform/IPC/Connection.h:1075 #17 0x000000011e421650 in WTF::Detail::CallableWrapper<WTF::CompletionHandler<void (IPC::Connection*, IPC::Decoder*)> IPC::Connection::makeAsyncReplyCompletionHandler<Messages::WebFullScreenManagerProxy::EnterFullScreen, WebKit::WebFullScreenManager::performEnterFullScreen()::$_2>(WebKit::WebFullScreenManager::performEnterFullScreen()::$_2&&, WTF::ThreadLikeAssertion)::'lambda'(IPC::Connection*, IPC::Decoder*), void, IPC::Connection*, IPC::Decoder*>::call at /Users/fred/WebKit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:59 #18 0x000000011d2c2a38 in WTF::Function<void (IPC::Connection*, IPC::Decoder*)>::operator() at /Users/fred/WebKit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:103 #19 0x000000011d29dfe8 in WTF::CompletionHandler<void (IPC::Connection*, IPC::Decoder*)>::operator() at /Users/fred/WebKit/WebKitBuild/Debug/usr/local/include/wtf/CompletionHandler.h:110 #20 0x000000011f1a6050 in IPC::Connection::dispatchMessage at /Users/fred/WebKit/Source/WebKit/Platform/IPC/Connection.cpp:1424 #21 0x000000011f1a6700 in IPC::Connection::dispatchMessage at /Users/fred/WebKit/Source/WebKit/Platform/IPC/Connection.cpp:1499 #22 0x000000011f1a6b40 in IPC::Connection::dispatchOneIncomingMessage at /Users/fred/WebKit/Source/WebKit/Platform/IPC/Connection.cpp:1567 #23 0x000000011f1cbf14 in IPC::Connection::enqueueIncomingMessage(WTF::UniqueRef<IPC::Decoder>)::$_1::operator()() const at /Users/fred/WebKit/Source/WebKit/Platform/IPC/Connection.cpp:1403 #24 0x000000011f1cbe70 in WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(WTF::UniqueRef<IPC::Decoder>)::$_1, void>::call at /Users/fred/WebKit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:59 #25 0x000000013371d9f4 in WTF::Function<void ()>::operator() at /Users/fred/WebKit/WebKitBuild/Debug/usr/local/include/wtf/Function.h:103 #26 0x0000000130ffb544 in WTF::RunLoop::performWork at /Users/fred/WebKit/Source/WTF/wtf/RunLoop.cpp:146 #27 0x0000000131002ff4 in WTF::RunLoop::performWork at /Users/fred/WebKit/Source/WTF/wtf/cf/RunLoopCF.cpp:44 #28 0x00000001835e6944 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ () #29 0x00000001835e68d8 in __CFRunLoopDoSource0 () #30 0x00000001835e6610 in __CFRunLoopDoSources0 () #31 0x00000001835e51e0 in __CFRunLoopRun () #32 0x00000001836bf82c in _CFRunLoopRunSpecificWithOptions () #33 0x0000000184ce8d5c in -[NSRunLoop(NSRunLoop) runMode:beforeDate:] () #34 0x0000000184d61bcc in -[NSRunLoop(NSRunLoop) run] () #35 0x00000001831fc524 in _xpc_objc_main () #36 0x0000000183210074 in _xpc_main () #37 0x00000001831fbf64 in xpc_main () #38 0x000000011be95b78 in WebKit::XPCServiceMain at /Users/fred/WebKit/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:314 #39 0x000000011f087084 in WKXPCServiceMain at /Users/fred/WebKit/Source/WebKit/Shared/API/Cocoa/WKMain.mm:36 #40 0x0000000102b0470c in main at /Users/fred/WebKit/Source/WebKit/Shared/EntryPointUtilities/Cocoa/AuxiliaryProcessMain.cpp:32 #41 0x000000018314fe80 in start ()
Frédéric Wang Nélar
Comment 7 2026-10-14 02:08:08 PDT
Created attachment 481799 [details] dumped render tree
Frédéric Wang Nélar
Comment 8 2026-10-14 02:11:53 PDT
(In reply to Frédéric Wang Nélar from comment #5) > I can reproduce a crash with > https://hachyderm.io/@mikeymikey/117106856897792159 but the backtrace seems > quite different: > > https://searchfox.org/wubkat/rev/b934faaa9c958fb3278550542b2eb3b127e363f2/ > Source/WebCore/page/LocalFrameViewLayoutContext.cpp#97 I forgot say that contrary to the initial report, the crash I mentioned can be reproduced directly with https://hachyderm.io/@mikeymikey/117106856897792159 ; no need to scroll down on the timeline https://hachyderm.io/@mikeymikey I added the full backtrace and dumped dirty tree. But the testcase is still big and would need some reduction.
Note You need to log in before you can comment on or make changes to this bug.