<?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>234496</bug_id>
          
          <creation_ts>2021-12-19 18:38:32 -0800</creation_ts>
          <short_desc>Assertion when reloading webm video: ASSERT(!m_parseTracksStatus);</short_desc>
          <delta_ts>2021-12-19 19:14:32 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Media</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></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>
          <dependson>232740</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jean-Yves Avenard [:jya]">jean-yves.avenard</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aestes</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1825511</commentid>
    <comment_count>0</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2021-12-19 18:38:32 -0800</bug_when>
    <thetext>STR:
In a debug build:
- Load http://cali.apple.com/qadrift/_media/_streams/webM/source_files/vp8/Big_Buck_Bunny_4K.webm.480p.webm
- Refresh the page

Assertion ASSERT(!m_parseTracksStatus); in MediaFormatReader::didParseTracks

```
lldb) bt
* thread #28, queue = &apos;WebKit::MediaFormatReader Queue&apos;, stop reason = EXC_BAD_ACCESS (code=1, address=0xbbadbeef)
    frame #0: 0x000000013322cafc JavaScriptCore`::WTFCrash() at Assertions.cpp:322:35
    frame #1: 0x000000011857bda4 WebKit`WTFCrashWithInfo((null)=188, (null)=&quot;/Users/jyavenard/Work/webkit/OpenSource/Source/WebKit/Shared/mac/MediaFormatReader/MediaFormatReader.cpp&quot;, (null)=&quot;void WebKit::MediaFormatReader::didParseTracks(SourceBufferPrivateClient::InitializationSegment &amp;&amp;, uint64_t)&quot;, (null)=2723) at Assertions.h:732:5
  * frame #2: 0x000000011898f258 WebKit`WebKit::MediaFormatReader::didParseTracks(this=0x0000600000cc9220, segment=0x000000016d072700, errorCode=2008) at MediaFormatReader.cpp:188:5
    frame #3: 0x000000011899d2e0 WebKit`WebKit::MediaFormatReader::parseByteSource(this=0x0000000106004108, errorCode=2008)::$_4::operator()(unsigned long long) const at MediaFormatReader.cpp:162:9
    frame #4: 0x000000011899d1a0 WebKit`WTF::Detail::CallableWrapper&lt;WebKit::MediaFormatReader::parseByteSource(WTF::RetainPtr&lt;OpaqueMTPluginByteSource*&gt;&amp;&amp;)::$_4, void, unsigned long long&gt;::call(this=0x0000000106004100, in=2008) at Function.h:53:39
    frame #5: 0x00000001482d1568 WebCore`WTF::Function&lt;void (unsigned long long)&gt;::operator(this=0x0000000106078220, in=2008)(unsigned long long) const at Function.h:82:35
    frame #6: 0x000000014aa040fc WebCore`WebCore::SourceBufferParserWebM::appendData(this=0x000000010613c0c8)&gt;&amp;&amp;, WebCore::SourceBufferParser::AppendFlags)::$_11::operator()() const at SourceBufferParserWebM.cpp:749:13
    frame #7: 0x000000014aa03e50 WebCore`WTF::Detail::CallableWrapper&lt;WebCore::SourceBufferParserWebM::appendData(WebCore::SourceBufferParser::Segment&amp;&amp;, WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;, WebCore::SourceBufferParser::AppendFlags)::$_11, void&gt;::call(this=0x000000010613c0c0) at Function.h:53:39
    frame #8: 0x00000001332542b0 JavaScriptCore`WTF::Function&lt;void ()&gt;::operator(this=0x0000000106008228)() const at Function.h:82:35
    frame #9: 0x00000001333794b8 JavaScriptCore`WTF::(anonymous namespace)::DispatchWorkItem::operator(this=0x0000000106008220)() at WorkQueueCocoa.cpp:40:25
    frame #10: 0x0000000133377d54 JavaScriptCore`void WTF::dispatchWorkItem&lt;WTF::(anonymous namespace)::DispatchWorkItem&gt;(dispatchContext=0x0000000106008220) at WorkQueueCocoa.cpp:48:5
    frame #11: 0x000000010347e480 libdispatch.dylib`_dispatch_client_callout + 20
    frame #12: 0x0000000103487834 libdispatch.dylib`_dispatch_lane_serial_drain + 980
    frame #13: 0x000000010348889c libdispatch.dylib`_dispatch_lane_invoke + 440
    frame #14: 0x0000000103498184 libdispatch.dylib`_dispatch_workloop_worker_thread + 1232
    frame #15: 0x000000010307fef4 libsystem_pthread.dylib`_pthread_wqthread + 288
(lldb) 
```</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1825512</commentid>
    <comment_count>1</comment_count>
    <who name="Jean-Yves Avenard [:jya]">jean-yves.avenard</who>
    <bug_when>2021-12-19 19:14:07 -0800</bug_when>
    <thetext>This started with bug 232740 as now an error can be returned while reading, which causes an error to be emitted and the error handler will call didParseTracks() again</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1825513</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-12-19 19:14:32 -0800</bug_when>
    <thetext>&lt;rdar://problem/86706195&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>