<?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>123403</bug_id>
          
          <creation_ts>2013-10-28 07:55:06 -0700</creation_ts>
          <short_desc>MediaStreamTrackPrivate&apos;s m_client uninitialized</short_desc>
          <delta_ts>2013-10-28 08:23:06 -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>WebCore Misc.</component>
          <version>528+ (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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Philippe Normand">pnormand</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>commit-queue</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>glenn</cc>
    
    <cc>hta</cc>
    
    <cc>jer.noble</cc>
    
    <cc>pnormand</cc>
    
    <cc>thiago.lacerda</cc>
    
    <cc>tommyw</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>944081</commentid>
    <comment_count>0</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2013-10-28 07:55:06 -0700</bug_when>
    <thetext>This leads to a segfault, the member variable should be initialized in the constructor I think. Trivial patch incoming.

#0  0x00007fc66cfd50f9 in WebCore::MediaStreamTrackPrivate::setReadyState (this=0x21d1e90, 
    state=WebCore::MediaStreamSource::Live)
    at ../../Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:191
#1  0x00007fc66cfd4c4e in WebCore::MediaStreamTrackPrivate::setSource (this=0x21d1e90, 
    source=0x2257710) at ../../Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:80
#2  0x00007fc66cfd4bbd in WebCore::MediaStreamTrackPrivate::MediaStreamTrackPrivate (
    this=0x21d1e90, source=0x2257710)
    at ../../Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:69
#3  0x00007fc66cfd49fc in WebCore::MediaStreamTrackPrivate::create (source=...)
    at ../../Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:39
#4  0x00007fc66cfd1a0b in WebCore::MediaStreamDescriptor::MediaStreamDescriptor (this=0x2125b60, 
    id=&quot;2bd7aee2-a71a-4f68-847f-fe8bba59dca2&quot;, 
    audioSources=WTF::Vector of length 1, capacity 16 = {...}, 
    videoSources=WTF::Vector of length 1, capacity 16 = {...}, ended=false)
    at ../../Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp:109
#5  0x00007fc66cfd1645 in WebCore::MediaStreamDescriptor::create (
    audioSources=WTF::Vector of length 1, capacity 16 = {...}, 
    videoSources=WTF::Vector of length 1, capacity 16 = {...}, 
    flag=WebCore::MediaStreamDescriptor::IsNotEnded)
    at ../../Source/WebCore/platform/mediastream/MediaStreamDescriptor.cpp:49
#6  0x00007fc66cfdcbfd in WebCore::MediaStreamCenterGStreamer::createMediaStream (this=0x22d99e0, 
    prpQueryClient=..., audioConstraints=..., videoConstraints=...)
    at ../../Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp:102
#7  0x00007fc66d0c9525 in WebCore::UserMediaRequest::createMediaStream (this=0x21c4500)
    at ../../Source/WebCore/Modules/mediastream/UserMediaRequest.cpp:151
#8  0x00007fc66d0caf97 in WTF::FunctionWrapper&lt;void (WebCore::UserMediaRequest::*)()&gt;::operator()
    (this=0x1f77100, c=0x21c4500) at ../../Source/WTF/wtf/Functional.h:218
#9  0x00007fc66d0cada0 in WTF::BoundFunctionImpl&lt;WTF::FunctionWrapper&lt;void (WebCore::UserMediaRequest::*)()&gt;, void (WebCore::UserMediaRequest*)&gt;::operator()() (this=0x1f770f0)
    at ../../Source/WTF/wtf/Functional.h:496
#10 0x00007fc67140d93f in WTF::Function&lt;void ()&gt;::operator()() const (this=0x21cb5e0)
    at ../../Source/WTF/wtf/Functional.h:704
#11 0x00007fc67140d005 in std::_Function_handler&lt;void (), WTF::Function&lt;void ()&gt; &gt;::_M_invoke(std::_Any_data const&amp;) (__functor=...) at /usr/include/c++/4.8/functional:2071
#12 0x00007fc67140c338 in std::function&lt;void ()&gt;::operator()() const (this=0x1f833c0)
    at /usr/include/c++/4.8/functional:2468
#13 0x00007fc67140b910 in WTF::callFunctionObject (context=0x1f833c0)
    at ../../Source/WTF/wtf/MainThread.cpp:236
#14 0x00007fc67140b592 in WTF::dispatchFunctionsFromMainThread ()
    at ../../Source/WTF/wtf/MainThread.cpp:167
#15 0x00007fc67143020d in WTF::timeoutFired () at ../../Source/WTF/wtf/gtk/MainThreadGtk.cpp:43
#16 0x00007fc6693e3c63 in g_timeout_dispatch (source=source@entry=0x1f579e0, 
    callback=&lt;optimized out&gt;, user_data=&lt;optimized out&gt;) at gmain.c:4450
#17 0x00007fc6693e3106 in g_main_dispatch (context=0x1d2e1e0) at gmain.c:3065
#18 g_main_context_dispatch (context=context@entry=0x1d2e1e0) at gmain.c:3641
#19 0x00007fc6693e3458 in g_main_context_iterate (context=0x1d2e1e0, block=block@entry=1, 
    dispatch=dispatch@entry=1, self=&lt;optimized out&gt;) at gmain.c:3712
#20 0x00007fc6693e385a in g_main_loop_run (loop=0x1dd2e80) at gmain.c:3906
#21 0x00007fc66d5c6f7a in WebCore::RunLoop::run ()
    at ../../Source/WebCore/platform/gtk/RunLoopGtk.cpp:61
#22 0x00007fc66be6209b in WebKit::WebProcessMainGtk (argc=2, argv=0x7fff45a87888)
    at ../../Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.cpp:78
#23 0x000000000040095d in main (argc=2, argv=0x7fff45a87888)
    at ../../Source/WebKit2/gtk/MainGtk.cpp:31
(gdb) f 0
#0  0x00007fc66cfd50f9 in WebCore::MediaStreamTrackPrivate::setReadyState (this=0x21d1e90, 
    state=WebCore::MediaStreamSource::Live)
    at ../../Source/WebCore/platform/mediastream/MediaStreamTrackPrivate.cpp:191
191	        m_client-&gt;trackReadyStateChanged();
(gdb) p m_client
$1 = (WebCore::MediaStreamTrackPrivateClient *) 0x40</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944082</commentid>
    <comment_count>1</comment_count>
      <attachid>215308</attachid>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2013-10-28 07:58:27 -0700</bug_when>
    <thetext>Created attachment 215308
fix TrackPrivate</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944083</commentid>
    <comment_count>2</comment_count>
      <attachid>215308</attachid>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2013-10-28 08:07:31 -0700</bug_when>
    <thetext>Comment on attachment 215308
fix TrackPrivate

I guess I can pull this fix out of my patch for 123316 :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944084</commentid>
    <comment_count>3</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2013-10-28 08:12:28 -0700</bug_when>
    <thetext>Ah, thank you :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944085</commentid>
    <comment_count>4</comment_count>
    <who name="Thiago de Barros Lacerda">thiago.lacerda</who>
    <bug_when>2013-10-28 08:13:56 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; Created an attachment (id=215308) [details]
&gt; fix TrackPrivate

Sorry to let that pass :(
Also set the MediaStreamTrackPrivate MediaStreamTrack constructor</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944086</commentid>
    <comment_count>5</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2013-10-28 08:14:59 -0700</bug_when>
    <thetext>Committed r158109: &lt;http://trac.webkit.org/changeset/158109&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944087</commentid>
    <comment_count>6</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2013-10-28 08:16:28 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #1)
&gt; &gt; Created an attachment (id=215308) [details] [details]
&gt; &gt; fix TrackPrivate
&gt; 
&gt; Sorry to let that pass :(

No problem :)

&gt; Also set the MediaStreamTrackPrivate MediaStreamTrack constructor

Hum? I didn&apos;t notice that issue, perhaps we can deal with it in a new bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944090</commentid>
    <comment_count>7</comment_count>
    <who name="Thiago de Barros Lacerda">thiago.lacerda</who>
    <bug_when>2013-10-28 08:21:13 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #4)
&gt; &gt; (In reply to comment #1)
&gt; &gt; &gt; Created an attachment (id=215308) [details] [details] [details]
&gt; &gt; &gt; fix TrackPrivate
&gt; &gt; 
&gt; &gt; Sorry to let that pass :(
&gt; 
&gt; No problem :)
&gt; 
&gt; &gt; Also set the MediaStreamTrackPrivate MediaStreamTrack constructor
&gt; 
&gt; Hum? I didn&apos;t notice that issue, perhaps we can deal with it in a new bug?

I mean set the MediaStreamTrackPrivate&apos;s client inside MediaStreamTrack constructor. By looking quickly at the code I could not see it being set. Maybe Eric can put in his bug too</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>944091</commentid>
    <comment_count>8</comment_count>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2013-10-28 08:23:06 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (In reply to comment #4)
&gt; &gt; (In reply to comment #1)
&gt; &gt; &gt; Created an attachment (id=215308) [details] [details] [details]
&gt; &gt; &gt; fix TrackPrivate
&gt; &gt; 
&gt; &gt; Sorry to let that pass :(
&gt; 
&gt; No problem :)
&gt; 
&gt; &gt; Also set the MediaStreamTrackPrivate MediaStreamTrack constructor
&gt; 
&gt; Hum? I didn&apos;t notice that issue, perhaps we can deal with it in a new bug?

(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; (In reply to comment #4)
&gt; &gt; &gt; (In reply to comment #1)
&gt; &gt; &gt; &gt; Created an attachment (id=215308) [details] [details] [details] [details]
&gt; &gt; &gt; &gt; fix TrackPrivate
&gt; &gt; &gt; 
&gt; &gt; &gt; Sorry to let that pass :(
&gt; &gt; 
&gt; &gt; No problem :)
&gt; &gt; 
&gt; &gt; &gt; Also set the MediaStreamTrackPrivate MediaStreamTrack constructor
&gt; &gt; 
&gt; &gt; Hum? I didn&apos;t notice that issue, perhaps we can deal with it in a new bug?
&gt; 
&gt; I mean set the MediaStreamTrackPrivate&apos;s client inside MediaStreamTrack constructor. By looking quickly at the code I could not see it being set. Maybe Eric can put in his bug too

Yes, I have done that in bug 123316 as well.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>215308</attachid>
            <date>2013-10-28 07:58:27 -0700</date>
            <delta_ts>2013-10-28 08:07:30 -0700</delta_ts>
            <desc>fix TrackPrivate</desc>
            <filename>fix-TrackPrivate.patch</filename>
            <type>text/plain</type>
            <size>1687</size>
            <attacher name="Philippe Normand">pnormand</attacher>
            
              <data encoding="base64">RnJvbSA4MjNjYzcyNzY5MzdiNTM3ZjQ1NmUzYTNkOWZkYmRmODU3ZDVjNGMyIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBQaGlsaXBwZSBOb3JtYW5kIDxwbm9ybWFuZEBpZ2FsaWEuY29t
PgpEYXRlOiBNb24sIDI4IE9jdCAyMDEzIDE1OjQ4OjQwICswMTAwClN1YmplY3Q6IFtQQVRDSF0g
Zml4IFRyYWNrUHJpdmF0ZQoKLS0tCiBTb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cgICAgICAgICAg
ICAgICAgICAgICAgICA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WdhbGlhLmNvbT4KKwogICAgICAgICBbV0syXSBVc2VyTWVkaWFDbGllbnQg
c3VwcG9ydAogICAgICAgICBodHRwczovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9
MTIzMTU4CiAKZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL21lZGlhc3RyZWFt
L01lZGlhU3RyZWFtVHJhY2tQcml2YXRlLmNwcCBiL1NvdXJjZS9XZWJDb3JlL3BsYXRmb3JtL21l
ZGlhc3RyZWFtL01lZGlhU3RyZWFtVHJhY2tQcml2YXRlLmNwcAppbmRleCBmZDMxYWEyLi44MDc4
YmM3IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViQ29yZS9wbGF0Zm9ybS9tZWRpYXN0cmVhbS9NZWRp
YVN0cmVhbVRyYWNrUHJpdmF0ZS5jcHAKKysrIGIvU291cmNlL1dlYkNvcmUvcGxhdGZvcm0vbWVk
aWFzdHJlYW0vTWVkaWFTdHJlYW1UcmFja1ByaXZhdGUuY3BwCkBAIC02NSw2ICs2NSw3IEBAIE1l
ZGlhU3RyZWFtVHJhY2tQcml2YXRlOjpNZWRpYVN0cmVhbVRyYWNrUHJpdmF0ZShNZWRpYVN0cmVh
bVNvdXJjZSogc291cmNlKQogICAgICwgbV9tdXRlZChmYWxzZSkKICAgICAsIG1fZW5hYmxlZCh0
cnVlKQogICAgICwgbV9zdG9wcGVkKGZhbHNlKQorICAgICwgbV9jbGllbnQoMCkKIHsKICAgICBz
ZXRTb3VyY2Uoc291cmNlKTsKIH0KLS0gCjEuOC40LnJjMw==
</data>
<flag name="review"
          id="238003"
          type_id="1"
          status="+"
          setter="eric.carlson"
    />
          </attachment>
      

    </bug>

</bugzilla>