<?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>233352</bug_id>
          
          <creation_ts>2021-11-18 23:03:51 -0800</creation_ts>
          <short_desc>HTMLTrackElement is not always kept alive until HTMLTrackElement::didCompleteLoad is called</short_desc>
          <delta_ts>2021-11-25 23:04:19 -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>WebKit Nightly Build</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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="youenn fablet">youennf</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>peng.liu6</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1816757</commentid>
    <comment_count>0</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2021-11-18 23:03:51 -0800</bug_when>
    <thetext>From https://ews-build.s3-us-west-2.amazonaws.com/macOS-Catalina-Debug-WK1-Tests-EWS/r444685-20219/media/track/track-id-crash-log.txt
Application Specific Information:
CRASHING TEST: media/track/track-id.html

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.JavaScriptCore      	0x0000000114cdcd1e WTFCrash + 14 (Assertions.cpp:322)
1   com.apple.WebCore             	0x0000000136ba5d8b WTFCrashWithInfo(int, char const*, char const*, int) + 27
2   com.apple.WebCore             	0x00000001398104f8 WebCore::JSEventListener::ensureJSFunction(WebCore::ScriptExecutionContext&amp;) const + 632
3   com.apple.WebCore             	0x000000013980f7f4 WebCore::JSEventListener::handleEvent(WebCore::ScriptExecutionContext&amp;, WebCore::Event&amp;) + 212
4   com.apple.WebCore             	0x000000013a0847c7 WebCore::EventTarget::innerInvokeEventListeners(WebCore::Event&amp;, WTF::Vector&lt;WTF::RefPtr&lt;WebCore::RegisteredEventListener, WTF::RawPtrTraits&lt;WebCore::RegisteredEventListener&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::RegisteredEventListener&gt; &gt;, 1ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc&gt;, WebCore::EventTarget::EventInvokePhase) + 1063
5   com.apple.WebCore             	0x000000013a084224 WebCore::EventTarget::fireEventListeners(WebCore::Event&amp;, WebCore::EventTarget::EventInvokePhase) + 356
6   com.apple.WebCore             	0x000000013a05811a WebCore::EventContext::handleLocalEvents(WebCore::Event&amp;, WebCore::EventTarget::EventInvokePhase) const + 938
7   com.apple.WebCore             	0x000000013a07ad05 WebCore::dispatchEventInDOM(WebCore::Event&amp;, WebCore::EventPath const&amp;) + 149
8   com.apple.WebCore             	0x000000013a07a57e WebCore::EventDispatcher::dispatchEvent(WebCore::Node&amp;, WebCore::Event&amp;) + 1134
9   com.apple.WebCore             	0x000000013a11211d WebCore::Node::dispatchEvent(WebCore::Event&amp;) + 29
10  com.apple.WebCore             	0x000000013a5af127 WebCore::HTMLTrackElement::didCompleteLoad(WebCore::HTMLTrackElement::LoadStatus) + 135
11  com.apple.WebCore             	0x000000013a7dce35 WebCore::LoadableTextTrack::scheduleLoad(WTF::URL const&amp;)::$_1::operator()() + 309
12  com.apple.WebCore             	0x000000013a7dccae WTF::Detail::CallableWrapper&lt;WebCore::LoadableTextTrack::scheduleLoad(WTF::URL const&amp;)::$_1, void&gt;::call() + 30
13  com.apple.WebCore             	0x0000000136bbec92 WTF::Function&lt;void ()&gt;::operator()() const + 130 (Function.h:82)
14  com.apple.WebCore             	0x000000013a5bbb75 WebCore::HTMLTrackElement::scheduleTask(WTF::Function&lt;void ()&gt;&amp;&amp;)::$_3::operator()() + 21
15  com.apple.WebCore             	0x000000013a5bbaae WTF::Detail::CallableWrapper&lt;WebCore::HTMLTrackElement::scheduleTask(WTF::Function&lt;void ()&gt;&amp;&amp;)::$_3, void&gt;::call() + 30
16  com.apple.WebCore             	0x0000000136bbec92 WTF::Function&lt;void ()&gt;::operator()() const + 130 (Function.h:82)
17  com.apple.WebCore             	0x000000013a5bb2ce void WebCore::ActiveDOMObject::queueTaskKeepingObjectAlive&lt;WebCore::HTMLTrackElement&gt;(WebCore::HTMLTrackElement&amp;, WebCore::TaskSource, WTF::Function&lt;void ()&gt;&amp;&amp;)::&apos;lambda&apos;()::operator()() const + 30
18  com.apple.WebCore             	0x000000013a5baf1e WTF::Detail::CallableWrapper&lt;void WebCore::ActiveDOMObject::queueTaskKeepingObjectAlive&lt;WebCore::HTMLTrackElement&gt;(WebCore::HTMLTrackElement&amp;, WebCore::TaskSource, WTF::Function&lt;void ()&gt;&amp;&amp;)::&apos;lambda&apos;(), void&gt;::call() + 30
19  com.apple.WebCore             	0x0000000136bbec92 WTF::Function&lt;void ()&gt;::operator()() const + 130 (Function.h:82)
20  com.apple.WebCore             	0x000000013a08844e WebCore::EventLoopFunctionDispatchTask::execute() + 30
21  com.apple.WebCore             	0x000000013a07dc05 WebCore::EventLoop::run() + 373</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1816758</commentid>
    <comment_count>1</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2021-11-18 23:06:26 -0800</bug_when>
    <thetext>One possibility is that HTMLTrackElement::textTrackModeChanged is calling scheduleLoad and TextTrack was GCed before as it readyState was None.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1817887</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-11-25 23:04:19 -0800</bug_when>
    <thetext>&lt;rdar://problem/85760489&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>