Bug 188282

Summary: Control center controls disappear when pausing, locking device.
Product: WebKit Reporter: Jer Noble <jer.noble>
Component: New BugsAssignee: Jer Noble <jer.noble>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, darin, eric.carlson, jonlee, realdawei, ryanhaddad, tsavell, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=194340
Attachments:
Description Flags
Patch for landing
none
Patch for landing
none
Patch for landing none

Description Jer Noble 2018-08-02 15:48:07 PDT
Control center controls disappear when pausing, locking device.
Comment 1 Jer Noble 2018-08-02 15:48:36 PDT
<rdar://problem/42497809>
Comment 2 Radar WebKit Bug Importer 2018-08-02 15:49:01 PDT
<rdar://problem/42876980>
Comment 3 Jer Noble 2018-08-02 15:55:45 PDT
<rdar://problem/42497809>e
Comment 4 Jer Noble 2018-08-02 15:55:52 PDT
Created attachment 346425 [details]
Patch for landing
Comment 5 Jer Noble 2018-08-02 15:57:23 PDT
<rdar://problem/42497809>
Comment 6 Jer Noble 2018-08-02 16:18:27 PDT
Created attachment 346426 [details]
Patch for landing
Comment 7 Jer Noble 2018-08-02 16:40:13 PDT
Created attachment 346430 [details]
Patch for landing
Comment 8 WebKit Commit Bot 2018-08-02 18:54:22 PDT
Comment on attachment 346430 [details]
Patch for landing

Clearing flags on attachment: 346430

Committed r234534: <https://trac.webkit.org/changeset/234534>
Comment 9 WebKit Commit Bot 2018-08-02 18:54:23 PDT
All reviewed patches have been landed.  Closing bug.
Comment 10 Darin Adler 2018-08-03 08:00:26 PDT
Comment on attachment 346430 [details]
Patch for landing

View in context: https://bugs.webkit.org/attachment.cgi?id=346430&action=review

> Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm:147
> -    : PlatformMediaSessionManager()
> +    : MediaSessionManagerCocoa()

Normally it’s not necessary to explicitly initialize a base class if there are no arguments. Is there some reason it’s necessary here? Would be nice to leave this out if it’s optional.

> Source/WebCore/platform/audio/mac/MediaSessionManagerMac.mm:58
> -    : PlatformMediaSessionManager()
> +    : MediaSessionManagerCocoa()

Ditto.
Comment 11 Truitt Savell 2018-08-03 10:20:58 PDT
It looks like the new layout test from https://trac.webkit.org/changeset/234534/webkit has flakey timeouts on Sierra Release

Test history:
https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=platform%2Fmac%2Fmedia%2Faudio-session-category-video-paused.html

Diff:
--- /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/platform/mac/media/audio-session-category-video-paused-expected.txt
+++ /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/platform/mac/media/audio-session-category-video-paused-actual.txt
@@ -1,19 +1,5 @@
+#PID UNRESPONSIVE - com.apple.WebKit.WebContent.Development (pid 8882)
+FAIL: Timed out waiting for notifyDone to be called
 
-RUN(internals.settings.setShouldManageAudioSessionCategory(true))
-RUN(video.src = findMediaFile("video", "../../../media/content/test"))
-RUN(video.play())
-EVENT(playing)
-EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK
-RUN(video.pause())
-EVENT(pause)
-EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK
-RUN(internals.beginMediaSessionInterruption("system"))
-EXPECTED (internals.audioSessionCategory() == 'None') OK
-RUN(video.play())
-EVENT(playing)
-EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK
-RUN(video.src = "")
-RUN(video.load())
-EXPECTED (internals.audioSessionCategory() == 'None') OK
-END OF TEST
-
+#EOF
+#EOF
Comment 12 Dawei Fenton (:realdawei) 2018-08-03 10:27:24 PDT
(In reply to WebKit Commit Bot from comment #8)
> Comment on attachment 346430 [details]
> Patch for landing
> 
> Clearing flags on attachment: 346430
> 
> Committed r234534: <https://trac.webkit.org/changeset/234534>


Also seeing API test failure on iOS after this revision:

https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/6587/steps/run-api-tests/logs/stdio

    TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
        2018-08-02 21:23:51.737 TestWebKitAPI[75994:322566199] *** Warning: <AVPlayerViewController: 0x7fd3ad80b000> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7fd3ad80b000) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7fd3ad80b000) exitFullScreenAnimated:completionHandler:]!
        2018-08-02 21:23:51.855 TestWebKitAPI[75994:322566199] *** Warning: <AVPlayerViewController: 0x7fd3ae013800> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7fd3ae013800) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7fd3ae013800) exitFullScreenAnimated:completionHandler:]!
        2018-08-02 21:23:51.970 TestWebKitAPI[75994:322566199] *** Warning: <AVPlayerViewController: 0x7fd3b0006a00> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7fd3b0006a00) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7fd3b0006a00) exitFullScreenAnimated:completionHandler:]!
        >>>> frameSizeChanged = 4096
        >>>> frameSizeChanged = 4096
        2018-08-02 21:23:52.167 TestWebKitAPI[75994:322566199] *** Warning: <AVPlayerViewController: 0x7fd3ad84f000> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7fd3ad84f000) exitFullScreenAnimated:completionHandler:]!
        -[AVPlayerViewController exitFullScreenAnimated:completionHandler:] failed with error View needs to be loaded before you can call -[AVPlayerViewController (0x7fd3ad84f000) exitFullScreenAnimated:completionHandler:]!
        2018-08-02 21:23:52.303 TestWebKitAPI[75994:322566199] *** Warning: <AVPlayerViewController: 0x7fd3b0007000> is trying to enter full screen, but is not in its view's window's view controller hierarchy. This results in undefined behavior.
        
        /Volumes/Data/slave/ios-simulator-11-release/build/Tools/TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:126
        Value of: [[getAVAudioSessionClass() sharedInstance] category]
          Actual: "AVAudioSessionCategoryPlayback"
        Expected: getAVAudioSessionCategoryAmbient()
        Which is: "AVAudioSessionCategoryAmbient"
Comment 13 Jer Noble 2018-08-03 11:14:11 PDT
API test fixed in r234547: <http://trac.webkit.org/r234547>
Comment 14 Dawei Fenton (:realdawei) 2018-08-06 15:43:27 PDT
API test appears to be fixed, but still seeing frequent timeouts:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=platform%2Fmac%2Fmedia%2Faudio-session-category-video-paused.html

Sample Diff:
--- /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/platform/mac/media/audio-session-category-video-paused-expected.txt
+++ /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/platform/mac/media/audio-session-category-video-paused-actual.txt
@@ -1,19 +1,5 @@
+#PID UNRESPONSIVE - com.apple.WebKit.WebContent.Development (pid 69042)
+FAIL: Timed out waiting for notifyDone to be called
 
-RUN(internals.settings.setShouldManageAudioSessionCategory(true))
-RUN(video.src = findMediaFile("video", "../../../media/content/test"))
-RUN(video.play())
-EVENT(playing)
-EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK
-RUN(video.pause())
-EVENT(pause)
-EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK
-RUN(internals.beginMediaSessionInterruption("system"))
-EXPECTED (internals.audioSessionCategory() == 'None') OK
-RUN(video.play())
-EVENT(playing)
-EXPECTED (internals.audioSessionCategory() == 'MediaPlayback') OK
-RUN(video.src = "")
-RUN(video.load())
-EXPECTED (internals.audioSessionCategory() == 'None') OK
-END OF TEST
-
+#EOF
+#EOF
Comment 15 Jer Noble 2018-08-07 15:28:04 PDT
We may have to covert this test from a LayoutTest (where previous and subsequent tests can mess with state of global objects) to an API test (where we can fully control the lifetime of the test).
Comment 16 Dawei Fenton (:realdawei) 2018-08-08 11:27:39 PDT
(In reply to Jer Noble from comment #15)
> We may have to covert this test from a LayoutTest (where previous and
> subsequent tests can mess with state of global objects) to an API test
> (where we can fully control the lifetime of the test).

Okay should we skip in the interim to reduce the noise on the bots?
Comment 17 Ryan Haddad 2018-08-29 15:58:39 PDT
(In reply to David Fenton (:realdawei) from comment #16)
> (In reply to Jer Noble from comment #15)
> > We may have to covert this test from a LayoutTest (where previous and
> > subsequent tests can mess with state of global objects) to an API test
> > (where we can fully control the lifetime of the test).
> 
> Okay should we skip in the interim to reduce the noise on the bots?
This is still frequently timing out on the bots. What is the plan here?
Comment 18 Truitt Savell 2018-08-30 10:27:41 PDT
(In reply to David Fenton (:realdawei) from comment #12)
> (In reply to WebKit Commit Bot from comment #8)
> > Comment on attachment 346430 [details]
> > Patch for landing
> > 
> > Clearing flags on attachment: 346430
> > 
> > Committed r234534: <https://trac.webkit.org/changeset/234534>
> 
> 
> Also seeing API test failure on iOS after this revision:
> 
> https://build.webkit.org/builders/
> Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/6587/steps/
> run-api-tests/logs/stdio
> 
>     TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS
>         2018-08-02 21:23:51.737 TestWebKitAPI[75994:322566199] *** Warning:
> <AVPlayerViewController: 0x7fd3ad80b000> is trying to enter full screen, but
> is not in its view's window's view controller hierarchy. This results in
> undefined behavior.
>         -[AVPlayerViewController exitFullScreenAnimated:completionHandler:]
> failed with error View needs to be loaded before you can call
> -[AVPlayerViewController (0x7fd3ad80b000)
> exitFullScreenAnimated:completionHandler:]!
>         -[AVPlayerViewController exitFullScreenAnimated:completionHandler:]
> failed with error View needs to be loaded before you can call
> -[AVPlayerViewController (0x7fd3ad80b000)
> exitFullScreenAnimated:completionHandler:]!
>         2018-08-02 21:23:51.855 TestWebKitAPI[75994:322566199] *** Warning:
> <AVPlayerViewController: 0x7fd3ae013800> is trying to enter full screen, but
> is not in its view's window's view controller hierarchy. This results in
> undefined behavior.
>         -[AVPlayerViewController exitFullScreenAnimated:completionHandler:]
> failed with error View needs to be loaded before you can call
> -[AVPlayerViewController (0x7fd3ae013800)
> exitFullScreenAnimated:completionHandler:]!
>         -[AVPlayerViewController exitFullScreenAnimated:completionHandler:]
> failed with error View needs to be loaded before you can call
> -[AVPlayerViewController (0x7fd3ae013800)
> exitFullScreenAnimated:completionHandler:]!
>         2018-08-02 21:23:51.970 TestWebKitAPI[75994:322566199] *** Warning:
> <AVPlayerViewController: 0x7fd3b0006a00> is trying to enter full screen, but
> is not in its view's window's view controller hierarchy. This results in
> undefined behavior.
>         -[AVPlayerViewController exitFullScreenAnimated:completionHandler:]
> failed with error View needs to be loaded before you can call
> -[AVPlayerViewController (0x7fd3b0006a00)
> exitFullScreenAnimated:completionHandler:]!
>         -[AVPlayerViewController exitFullScreenAnimated:completionHandler:]
> failed with error View needs to be loaded before you can call
> -[AVPlayerViewController (0x7fd3b0006a00)
> exitFullScreenAnimated:completionHandler:]!
>         >>>> frameSizeChanged = 4096
>         >>>> frameSizeChanged = 4096
>         2018-08-02 21:23:52.167 TestWebKitAPI[75994:322566199] *** Warning:
> <AVPlayerViewController: 0x7fd3ad84f000> is trying to enter full screen, but
> is not in its view's window's view controller hierarchy. This results in
> undefined behavior.
>         -[AVPlayerViewController exitFullScreenAnimated:completionHandler:]
> failed with error View needs to be loaded before you can call
> -[AVPlayerViewController (0x7fd3ad84f000)
> exitFullScreenAnimated:completionHandler:]!
>         -[AVPlayerViewController exitFullScreenAnimated:completionHandler:]
> failed with error View needs to be loaded before you can call
> -[AVPlayerViewController (0x7fd3ad84f000)
> exitFullScreenAnimated:completionHandler:]!
>         2018-08-02 21:23:52.303 TestWebKitAPI[75994:322566199] *** Warning:
> <AVPlayerViewController: 0x7fd3b0007000> is trying to enter full screen, but
> is not in its view's window's view controller hierarchy. This results in
> undefined behavior.
>         
>        
> /Volumes/Data/slave/ios-simulator-11-release/build/Tools/TestWebKitAPI/Tests/
> WebKitLegacy/ios/AudioSessionCategoryIOS.mm:126
>         Value of: [[getAVAudioSessionClass() sharedInstance] category]
>           Actual: "AVAudioSessionCategoryPlayback"
>         Expected: getAVAudioSessionCategoryAmbient()
>         Which is: "AVAudioSessionCategoryAmbient"

I saw this API failure again:
https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/7126/steps/run-api-tests/logs/stdio

From:
https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/builds/6187
Comment 19 Jer Noble 2018-08-30 10:32:01 PDT
(In reply to Truitt Savell from comment #18)
> I saw this API failure again:
> https://build.webkit.org/builders/
> Apple%20iOS%2011%20Simulator%20Release%20WK2%20%28Tests%29/builds/7126/steps/
> run-api-tests/logs/stdio
> 
> From:
> https://build.webkit.org/builders/
> Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/builds/6187

This looks like a crash, not a failure. Could you please attach the crash log to a new bug, and relate it to this one?
Comment 20 Truitt Savell 2018-08-30 10:53:52 PDT
Bug to track Crash: https://bugs.webkit.org/show_bug.cgi?id=189158