<?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>250656</bug_id>
          
          <creation_ts>2023-01-15 15:52:11 -0800</creation_ts>
          <short_desc>[GStreamer] Fix a failure of fast/speechsynthesis/voices-non-mock.html</short_desc>
          <delta_ts>2023-02-03 10:15:39 -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>WebKitGTK</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></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="ChangSeok Oh">changseok</reporter>
          <assigned_to name="ChangSeok Oh">changseok</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cfleizach</cc>
    
    <cc>philn</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1925713</commentid>
    <comment_count>0</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2023-01-15 15:52:11 -0800</bug_when>
    <thetext>SSIA.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925739</commentid>
    <comment_count>1</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2023-01-15 20:40:27 -0800</bug_when>
    <thetext>20:34:53.697 2 summarizing results
20:34:53.697 2 Test timing:
20:34:53.697 2    63.08 total testing time
20:34:53.697 2 
20:34:53.697 2 Thread timing:
20:34:53.697 2       worker/0:    13 tests,  34.97 secs
20:34:53.697 2     34.97 cumulative,   5.00 optimal
20:34:53.697 2 
20:34:53.697 2 PER TEST TIME IN TESTSHELL (seconds):
20:34:53.697 2   Median:           0.133
20:34:53.697 2   Mean:             2.637
20:34:53.697 2   90th percentile:  1.020
20:34:53.697 2   99th percentile: 31.310
20:34:53.697 2   Standard dev:     7.953
20:34:53.697 2 
20:34:53.697 2 
20:34:53.697 2 10 slowest tests that are not marked as SLOW and did not timeout/crash:
20:34:53.697 2   fast/speechsynthesis/speech-synthesis-speak-empty-string.html took 1.0 seconds
20:34:53.697 2   fast/speechsynthesis/speech-synthesis-boundary-events.html took 0.9 seconds
20:34:53.697 2   fast/speechsynthesis/speech-synthesis-pause-resume.html took 0.2 seconds
20:34:53.697 2   fast/speechsynthesis/speech-synthesis-utterance-uses-voice.html took 0.2 seconds
20:34:53.697 2   fast/speechsynthesis/speech-synthesis-gc-utterance-crash.html took 0.2 seconds
20:34:53.698 2   fast/speechsynthesis/speech-synthesis-speak.html took 0.2 seconds
20:34:53.698 2   fast/speechsynthesis/speech-synthesis-elapsed-time.html took 0.1 seconds
20:34:53.698 2   fast/speechsynthesis/speech-synthesis-cancel-crash.html took 0.1 seconds
20:34:53.698 2   fast/speechsynthesis/speech-synthesis-cancel.html took 0.1 seconds
20:34:53.698 2   fast/speechsynthesis/speech-synthesis-voices.html took 0.1 seconds
20:34:53.698 2 
20:34:53.698 2 Tests marked as SLOW:
20:34:53.698 2 
20:34:53.698 2 Tests that timed out or crashed:
20:34:53.698 2   fast/speechsynthesis/speech-synthesis-real-client-version.html took 31.3 seconds
20:34:53.698 2 
20:34:53.698 2 Time to process slowest subdirectories:
20:34:53.698 2   all_tests took 35.0 seconds to run 13 tests.
20:34:53.698 2 
20:34:53.698 2 
20:34:53.698 2 22 tests ran as expected, 4 didn&apos;t:
20:34:53.698 2 
20:34:53.698 2 Writing JSON files in /app/webkit/WebKitBuild/Release/layout-test-results.
20:34:53.699 2 Finished writing JSON file for the test results server.
20:34:53.702 2 Testing completed, Exit status: 2
=&gt; Results: 22/26 tests passed (84.6%)

=&gt; Tests to be fixed (2):
      1 crashes                  (50.0%)

=&gt; Tests that will only be fixed if they crash (WONTFIX) (0):


Regressions: Unexpected crashes (1)
  fast/speechsynthesis/speech-synthesis-real-client-version.html [ Crash ]

Regressions: Unexpected text-only failures (1)
  fast/speechsynthesis/voices-non-mock.html [ Failure ]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1925761</commentid>
    <comment_count>2</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-01-16 02:27:02 -0800</bug_when>
    <thetext>Can you post the crash backtrace?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927396</commentid>
    <comment_count>3</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2023-01-22 23:52:16 -0800</bug_when>
    <thetext>(In reply to Philippe Normand from comment #2)
&gt; Can you post the crash backtrace?

Sure.

#0  0x00007ffff1ecbdd8 in WTF::String::tryGetUTF8(WTF::ConversionMode) const ()           
   from target:/app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0          
#1  0x00007ffff1ecbea0 in WTF::String::utf8(WTF::ConversionMode) const ()                 
   from target:/app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0          
#2  0x00007ffff51985ea in webKitFliteSrcSetUtterance(_WebKitFliteSrc*, WTF::String const&amp;, WebCore::PlatformSpeechSynthesisVoice const&amp;) () from target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#3  0x00007ffff51914e8 in WebCore::GstSpeechSynthesisWrapper::speakUtterance(WTF::RefPtr&lt;WebCore::PlatformSpeechSynthesisUtterance, WTF::RawPtrTraits&lt;WebCore::PlatformSpeechSynthesisUtterance&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::PlatformSpeechSynthesisUtterance&gt; &gt;&amp;&amp;) [clone .part.0] ()
   from target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0                 
#4  0x00007ffff51923f5 in WebCore::PlatformSpeechSynthesizer::speak(WTF::RefPtr&lt;WebCore::PlatformSpeechSynthesisUtterance, WTF::RawPtrTraits&lt;WebCore::PlatformSpeechSynthesisUtterance&gt;, WTF::DefaultRefDerefTraits&lt;WebCore::PlatformSpeechSynthesisUtterance&gt; &gt;&amp;&amp;) ()
   from target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0                 
#5  0x00007ffff5f5f312 in WebCore::SpeechSynthesis::startSpeakingImmediately(WebCore::SpeechSynthesisUtterance&amp;) () from target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#6  0x00007ffff5b39f98 in WebCore::jsSpeechSynthesisPrototypeFunction_speak(JSC::JSGlobalObject*, JSC::CallFrame*) () from target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
#7  0x00007fff90008038 in ?? ()                                                 
#8  0x00007fffffffc180 in ?? ()                                                           
#9  0x00007ffff093a5e4 in js_trampoline_op_call ()                              
   from target:/app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0                          
#10 0x0000000000000000 in ?? ()

The fix is coming. But we need to discuss the failure for fast/speechsynthesis/voices-non-mock.html

The GTK/WPE fails in shouldBeTrue(&quot;voiceCount &gt; 20&quot;). This means we need more than 20 voices to pass the test. Currently, GTK/WPE ports have 4 voices. I don&apos;t know why 20 here though, a possible fix is to make it shouldBeTrue(&quot;voiceCount &gt; 0&quot;)? Any thought?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927398</commentid>
    <comment_count>4</comment_count>
    <who name="chris fleizach">cfleizach</who>
    <bug_when>2023-01-23 00:31:59 -0800</bug_when>
    <thetext>(In reply to ChangSeok Oh from comment #3)
&gt; (In reply to Philippe Normand from comment #2)
&gt; &gt; Can you post the crash backtrace?
&gt; 
&gt; Sure.
&gt; 
&gt; #0  0x00007ffff1ecbdd8 in WTF::String::tryGetUTF8(WTF::ConversionMode) const
&gt; ()           
&gt;    from
&gt; target:/app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0    
&gt; 
&gt; #1  0x00007ffff1ecbea0 in WTF::String::utf8(WTF::ConversionMode) const ()   
&gt; 
&gt;    from
&gt; target:/app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0    
&gt; 
&gt; #2  0x00007ffff51985ea in webKitFliteSrcSetUtterance(_WebKitFliteSrc*,
&gt; WTF::String const&amp;, WebCore::PlatformSpeechSynthesisVoice const&amp;) () from
&gt; target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
&gt; #3  0x00007ffff51914e8 in
&gt; WebCore::GstSpeechSynthesisWrapper::speakUtterance(WTF::RefPtr&lt;WebCore::
&gt; PlatformSpeechSynthesisUtterance,
&gt; WTF::RawPtrTraits&lt;WebCore::PlatformSpeechSynthesisUtterance&gt;,
&gt; WTF::DefaultRefDerefTraits&lt;WebCore::PlatformSpeechSynthesisUtterance&gt; &gt;&amp;&amp;)
&gt; [clone .part.0] ()
&gt;    from target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0   
&gt; 
&gt; #4  0x00007ffff51923f5 in
&gt; WebCore::PlatformSpeechSynthesizer::speak(WTF::RefPtr&lt;WebCore::
&gt; PlatformSpeechSynthesisUtterance,
&gt; WTF::RawPtrTraits&lt;WebCore::PlatformSpeechSynthesisUtterance&gt;,
&gt; WTF::DefaultRefDerefTraits&lt;WebCore::PlatformSpeechSynthesisUtterance&gt; &gt;&amp;&amp;) ()
&gt;    from target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0   
&gt; 
&gt; #5  0x00007ffff5f5f312 in
&gt; WebCore::SpeechSynthesis::startSpeakingImmediately(WebCore::
&gt; SpeechSynthesisUtterance&amp;) () from
&gt; target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
&gt; #6  0x00007ffff5b39f98 in
&gt; WebCore::jsSpeechSynthesisPrototypeFunction_speak(JSC::JSGlobalObject*,
&gt; JSC::CallFrame*) () from
&gt; target:/app/webkit/WebKitBuild/Release/lib/libwebkit2gtk-4.1.so.0
&gt; #7  0x00007fff90008038 in ?? ()                                             
&gt; 
&gt; #8  0x00007fffffffc180 in ?? ()                                             
&gt; 
&gt; #9  0x00007ffff093a5e4 in js_trampoline_op_call ()                          
&gt; 
&gt;    from
&gt; target:/app/webkit/WebKitBuild/Release/lib/libjavascriptcoregtk-4.1.so.0    
&gt; 
&gt; #10 0x0000000000000000 in ?? ()
&gt; 
&gt; The fix is coming. But we need to discuss the failure for
&gt; fast/speechsynthesis/voices-non-mock.html
&gt; 
&gt; The GTK/WPE fails in shouldBeTrue(&quot;voiceCount &gt; 20&quot;). This means we need
&gt; more than 20 voices to pass the test. Currently, GTK/WPE ports have 4
&gt; voices. I don&apos;t know why 20 here though, a possible fix is to make it
&gt; shouldBeTrue(&quot;voiceCount &gt; 0&quot;)? Any thought?

That was fairly specific for Apple platforms. The number is irrelevant as long as you can confirm you&apos;re getting something expected. If, on Mac, we only got 4 voices, that would be a regression...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927399</commentid>
    <comment_count>5</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-01-23 00:37:54 -0800</bug_when>
    <thetext>The value should be queried through a new Internals method then. There we can handle the various platforms and what they expect.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1927672</commentid>
    <comment_count>6</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2023-01-23 18:12:32 -0800</bug_when>
    <thetext>(In reply to Philippe Normand from comment #5)
&gt; The value should be queried through a new Internals method then. There we
&gt; can handle the various platforms and what they expect.

O.K. It sounds like more effort than expected. Let&apos;s spin off the crash into a separate bug [1]. I will fix it first.

[1] https://bugs.webkit.org/show_bug.cgi?id=251056</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929695</commentid>
    <comment_count>7</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2023-01-31 00:54:11 -0800</bug_when>
    <thetext>(In reply to Philippe Normand from comment #5)
&gt; The value should be queried through a new Internals method then. There we
&gt; can handle the various platforms and what they expect.

I thought about adding a new method to the Internals a bit. Do we expect the new method returns a hard-coded value of the expected voice count or available voice count on the testing platform? For the latter, adding a new method is pointless I think. Because the new method returns the same value of window.speechSynthesis.getVoices().length in the test.

If the purpose of the test checks if speechSynthesis is properly initialized with some voices, I think testing shouldBeTrue(&quot;voiceCount &gt; 0&quot;) should be enough for all platforms. Any thought?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929731</commentid>
    <comment_count>8</comment_count>
    <who name="Philippe Normand">philn</who>
    <bug_when>2023-01-31 03:39:04 -0800</bug_when>
    <thetext>&gt; If the purpose of the test checks if speechSynthesis is properly initialized with some voices, I think testing shouldBeTrue(&quot;voiceCount &gt; 0&quot;) should be enough for all platforms. Any thought?

IIUC Chris&apos;s comment this kind of test wouldn&apos;t be sufficient for Apple platforms. Maybe I misunderstood...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929824</commentid>
    <comment_count>9</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2023-01-31 12:14:22 -0800</bug_when>
    <thetext>(In reply to Philippe Normand from comment #8)
&gt; &gt; If the purpose of the test checks if speechSynthesis is properly initialized with some voices, I think testing shouldBeTrue(&quot;voiceCount &gt; 0&quot;) should be enough for all platforms. Any thought?
&gt; 
&gt; IIUC Chris&apos;s comment this kind of test wouldn&apos;t be sufficient for Apple
&gt; platforms. Maybe I misunderstood...

Well, then we go to a route of adding an Internals method that returns a hard-coded value for the testing platform.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1929983</commentid>
    <comment_count>10</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2023-01-31 22:03:57 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/9429</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1930154</commentid>
    <comment_count>11</comment_count>
    <who name="ChangSeok Oh">changseok</who>
    <bug_when>2023-02-01 10:04:46 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/9461</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1930911</commentid>
    <comment_count>12</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-02-03 10:15:34 -0800</bug_when>
    <thetext>Committed 259820@main (3aad9165b15d): &lt;https://commits.webkit.org/259820@main&gt;

Reviewed commits have been landed. Closing PR #9429 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>