<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>259915</bug_id>
          
          <creation_ts>2023-08-07 21:23:45 -0700</creation_ts>
          <short_desc>[WPE][Debug]: fast/mediastream/captureStream/canvas3d.html crashes with error gst_sample_get_caps: assertion &apos;GST_IS_SAMPLE (sample)&apos; failed</short_desc>
          <delta_ts>2023-08-09 05:32:14 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Diego Pino">dpino</reporter>
          <assigned_to name="Philippe Normand">philn</assigned_to>
          <cc>philn</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1970032</commentid>
    <comment_count>0</comment_count>
    <who name="Diego Pino">dpino</who>
    <bug_when>2023-08-07 21:23:45 -0700</bug_when>
    <thetext>https://build.webkit.org/results/WPE-Linux-64-bit-Debug-Tests/266663@main%20(6300)/fast/mediastream/captureStream/canvas3d-crash-log.txt

STDERR: (WPEWebProcess:76043): GStreamer-CRITICAL **: 18:47:01.803: gst_sample_get_caps: assertion &apos;GST_IS_SAMPLE (sample)&apos; failed
STDERR: WPEWebProcess terminated (pid 76043) for reason: crash

Thread 1 (Thread 0x7fd586f62ec0 (LWP 76043)):
#0  g_logv (log_domain=0x7fd58d9529ae &quot;GStreamer&quot;, log_level=G_LOG_LEVEL_CRITICAL, format=&lt;optimized out&gt;, args=&lt;optimized out&gt;) at ../glib/gmessages.c:1422
#1  0x00007fd58db05c53 in g_log (log_domain=log_domain@entry=0x7fd58d9529ae &quot;GStreamer&quot;, log_level=log_level@entry=G_LOG_LEVEL_CRITICAL, format=format@entry=0x7fd58db69ff7 &quot;%s: assertion &apos;%s&apos; failed&quot;) at ../glib/gmessages.c:1460
#2  0x00007fd58db06e6d in g_return_if_fail_warning (log_domain=log_domain@entry=0x7fd58d9529ae &quot;GStreamer&quot;, pretty_function=pretty_function@entry=0x7fd58d977920 &lt;__func__.8.lto_priv.35&gt; &quot;gst_sample_get_caps&quot;, expression=expression@entry=0x7fd58d975644 &quot;GST_IS_SAMPLE (sample)&quot;) at ../glib/gmessages.c:2930
#3  0x00007fd58d911c26 in gst_sample_get_caps (sample=&lt;optimized out&gt;) at ../gst/gstsample.c:209
#4  gst_sample_get_caps (sample=&lt;optimized out&gt;) at ../gst/gstsample.c:207
#5  0x00007fd5a02e4b5e in WebCore::VideoFrameGStreamer::create(WTF::GRefPtr&lt;_GstSample&gt;&amp;&amp;, WebCore::FloatSize const&amp;, WTF::MediaTime const&amp;, WebCore::VideoFrameRotation, bool, std::optional&lt;WebCore::VideoFrameTimeMetadata&gt;&amp;&amp;, std::optional&lt;WebCore::PlatformVideoColorSpace&gt;&amp;&amp;) (sample=..., presentationSize=..., presentationTime=..., videoRotation=WebCore::VideoFrameRotation::None, videoMirrored=false, metadata=..., colorSpace=...) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/VideoFrameGStreamer.cpp:222
#6  0x00007fd5a02d9edc in WebCore::MediaPlayerPrivateGStreamer::videoFrameForCurrentTime() (this=0x7fd57d561780) at /app/webkit/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:3870
#7  0x00007fd5a0137426 in WebCore::MediaPlayer::videoFrameForCurrentTime() (this=0x7fd57d129c60) at /app/webkit/Source/WebCore/platform/graphics/MediaPlayer.cpp:1144
#8  0x00007fd59e1c65c8 in operator()(WTF::RefPtr&lt;WebCore::HTMLVideoElement, WTF::RawPtrTraits&lt;WebCore::HTMLVideoElement&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::HTMLVideoElement&gt; &gt;&amp;) const (__closure=0x7ffcc8113cd0, video=...) at /app/webkit/Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp:190

I think the issue might be that the `convertedSample` in https://searchfox.org/wubkat/source/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp#3868 is not sample anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970065</commentid>
    <comment_count>1</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-08-08 01:06:04 -0700</bug_when>
    <thetext>This bot has no GPU I guess?
Setting GST_DEBUG=3 should show the relevant error, most likely from gst_video_convert_sample() returning NULL.

I cannot reproduce this here, but this code should be more error-prone. I&apos;ll send a PR.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970067</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2023-08-08 01:08:36 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/16470</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970280</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-08-09 05:31:33 -0700</bug_when>
    <thetext>Committed 266723@main (6204c3532ecc): &lt;https://commits.webkit.org/266723@main&gt;

Reviewed commits have been landed. Closing PR #16470 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970281</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-08-09 05:32:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/113624573&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>