Summary: | [GStreamer] gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed in WebCore::MediaPlayerPrivateGStreamer::paused | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||||
Component: | Media | Assignee: | Philippe Normand <pnormand> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bugs-noreply, eric.carlson, mcatanzaro, pnormand, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
Michael Catanzaro
2019-04-08 07:45:56 PDT
This backtrace doesn't look very useful. What's in m_pipeline? I don't know why it's not included in the backtrace. It must be either nullptr or else dangling. I can't reproduce this issue. "Loading reddit" is quite a vague description, especially because it's quite fast-changing website. Next time you see this error, please provide logs, GST_DEBUG=3,webkit*:6 Indeed the error is gone today, oh well :/ Let's close this then. Reopen (with logs) if/when the issue happens again :) Got it again today. The log ends with: 0:01:09.998282618 98709 0x14b1ea0 WARN webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:2204:loadingFailed: Loading failed, error: 4 (WebKitWebProcess:98709): GStreamer-CRITICAL **: 20:07:52.445: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed Will attach the whole thing. Reproducer is to just scroll down on the front page (G_DEBUG=fatal-criticals will help). Created attachment 367858 [details]
Debug log
More from the ending: 0:01:09.998240909 98709 0x14b1ea0 DEBUG webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:2243:supportsType: Checking mime-type "image/gif" 0:01:09.998264264 98709 0x14b1ea0 DEBUG webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:2253:supportsType: Supported: IsNotSupported 0:01:09.998276707 98709 0x14b1ea0 DEBUG webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:2287:setPreload: Setting preload to Auto 0:01:09.998282618 98709 0x14b1ea0 WARN webkitmediaplayer MediaPlayerPrivateGStreamer.cpp:2204:loadingFailed: Loading failed, error: 4 (WebKitWebProcess:98709): GStreamer-CRITICAL **: 20:07:52.445: gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed "image/gif" looks suspicious.... I can reproduce it. Will have a look! (In reply to Michael Catanzaro from comment #8) > More from the ending: > > 0:01:09.998240909 98709 0x14b1ea0 DEBUG webkitmediaplayer > MediaPlayerPrivateGStreamer.cpp:2243:supportsType: Checking mime-type > "image/gif" > 0:01:09.998264264 98709 0x14b1ea0 DEBUG webkitmediaplayer > MediaPlayerPrivateGStreamer.cpp:2253:supportsType: Supported: IsNotSupported > 0:01:09.998276707 98709 0x14b1ea0 DEBUG webkitmediaplayer > MediaPlayerPrivateGStreamer.cpp:2287:setPreload: Setting preload to Auto > 0:01:09.998282618 98709 0x14b1ea0 WARN webkitmediaplayer > MediaPlayerPrivateGStreamer.cpp:2204:loadingFailed: Loading failed, error: 4 > > (WebKitWebProcess:98709): GStreamer-CRITICAL **: 20:07:52.445: > gst_element_get_state: assertion 'GST_IS_ELEMENT (element)' failed > > "image/gif" looks suspicious.... Yeah that's indeed the issue. Our supportsType() returns IsNotSupported for image/gif but the MediaPlayer creates a GStreamer MediaPlayerPrivate anyway and tries to load that asset. Eric, this looks like a bug in MediaPlayer::loadWithNextMediaEngine(): // If no MIME type is specified or the type was inferred from the file extension, just use the next engine. if (!engine && (m_contentType.isEmpty() || m_contentMIMETypeWasInferredFromExtension)) engine = nextMediaEngine(current); m_contentType is not empty but m_contentMIMETypeWasInferredFromExtension is true, so the next engine is loaded, regardless of the supportsType() result. If this code has to remain, I think it would be good that MediaPlayerPrivate::load() methods return a bool result. WDYT? > > Yeah that's indeed the issue. Our supportsType() returns IsNotSupported for > image/gif but the MediaPlayer creates a GStreamer MediaPlayerPrivate anyway > and tries to load that asset. > > Eric, this looks like a bug in MediaPlayer::loadWithNextMediaEngine(): > > > // If no MIME type is specified or the type was inferred from the file > extension, just use the next engine. > if (!engine && (m_contentType.isEmpty() || > m_contentMIMETypeWasInferredFromExtension)) > engine = nextMediaEngine(current); > > m_contentType is not empty but m_contentMIMETypeWasInferredFromExtension is > true, so the next engine is loaded, regardless of the supportsType() result. It does this on the assumption that because media file extensions are such a mess (e.g. look at the number of synonyms for "video/mpeg" in MIMETypeRegistry.cpp), it is better to let the media engine look at the file in the absence of a MIME type. > If this code has to remain, I think it would be good that MediaPlayerPrivate::load() methods return a bool result. WDYT? That would require MediaPlayerPrivate::load to be synchronous, which is usually impossible. If the MediaPlayerPrivate calls MediaPlayer::networkStateChanged() with networkState >= FormatError and readyState < HaveMetadata, MediaPlayer will try with with the next media engine or pass the error to HTMLMediaElement if there are none. Ah right, forcing the 2 state changes is the way to go. I was not notifying the player correctly. Thanks! Created attachment 368141 [details]
Patch
Comment on attachment 368141 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=368141&action=review > LayoutTests/platform/gtk/TestExpectations:-1649 > -# Crash is webkit.org/b/176802 > -webkit.org/b/36642 fast/replaced/border-radius-clip.html [ Failure Pass Crash ] It might still be flaky, I'll remove the Crash mentions only, for now. Committed r244641: <https://trac.webkit.org/changeset/244641> |