Bug 160433 - ASSERTION FAILURE: [[videoLayer delegate] isKindOfClass:getUIViewClass()] in WebAVPlayerLayerView_videoView()
Summary: ASSERTION FAILURE: [[videoLayer delegate] isKindOfClass:getUIViewClass()] in ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Local Build
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords:
Depends on:
Blocks: 160434
  Show dependency treegraph
 
Reported: 2016-08-01 16:28 PDT by Daniel Bates
Modified: 2016-08-15 19:08 PDT (History)
2 users (show)

See Also:


Attachments
Test Case (128.77 KB, application/zip)
2016-08-01 16:28 PDT, Daniel Bates
no flags Details
Patch and Layout Test (9.58 KB, patch)
2016-08-01 17:11 PDT, Daniel Bates
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2016-08-01 16:28:52 PDT
Created attachment 285052 [details]
Test Case

When using a debug build of WebKit for iOS Simulator and simulating an iPad the assertion ASSERT([[videoLayer delegate] isKindOfClass:getUIViewClass()]) failed in WebAVPlayerLayerView_videoView when I closed a tab that contain a video that was in picture-in-picture mode.

Attached an archive with a test case that can be used to demonstrate this issue. Unzip the attached archive into a web-accessible directory, open Mobile Safari and navigate to TestCase/close-page-with-picture-in-picture-video-assertion-failure.html. Follow the instructions to reproduce this issue.
Comment 1 Daniel Bates 2016-08-01 16:35:15 PDT
Here is a snippet from the crash report:

Identifier:            MobileSafari
...
Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000bbadbeef
...
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   JavaScriptCore                	0x00000001137ae9b4 WTFCrash + 36 (Assertions.cpp:323)
1   com.apple.WebCore             	0x000000011a87c517 WebAVPlayerLayerView_videoView(objc_object*, objc_selector*) + 199 (WebVideoFullscreenInterfaceAVKit.mm:402)
2   com.apple.WebCore             	0x000000011a87c7f6 WebAVPlayerLayerView_stopRoutingVideoToPictureInPicturePlayerLayerView(objc_object*, objc_selector*) + 54 (WebVideoFullscreenInterfaceAVKit.mm:439)
3   com.apple.AVKit               	0x000000012e774adc -[AVPictureInPictureController pictureInPictureViewControllerViewWillDisappear:] + 155
4   com.apple.AVKit               	0x000000012e76a004 -[AVPictureInPictureViewController didAnimatePictureInPictureStop] + 74
5   com.apple.Pegasus             	0x000000012f0e259f __130-[PGPictureInPictureProxy _stopPictureInPictureAnimated:activateApplicationIfNeededAndRestoreUserInterface:withCompletionHandler:]_block_invoke_2.344 + 79
6   libdispatch.dylib             	0x0000000123beaa20 _dispatch_call_block_and_release + 12
7   libdispatch.dylib             	0x0000000123c0c17e _dispatch_client_callout + 8
8   libdispatch.dylib             	0x0000000123bf36dd _dispatch_main_queue_callback_4CF + 1054
9   com.apple.CoreFoundation      	0x00000001111311c9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
10  com.apple.CoreFoundation      	0x00000001110f6a6d __CFRunLoopRun + 2205
11  com.apple.CoreFoundation      	0x00000001110f5f74 CFRunLoopRunSpecific + 420
12  com.apple.GraphicsServices    	0x00000001124bca71 GSEventRunModal + 161
13  com.apple.UIKit               	0x00000001162749e9 UIApplicationMain + 159
14  com.apple.mobilesafari        	0x000000010feab81a 0x10fe41000 + 436250
15  libdyld.dylib                 	0x0000000123c5568d start + 1
Comment 2 Daniel Bates 2016-08-01 17:11:14 PDT
Created attachment 285055 [details]
Patch and Layout Test
Comment 3 Daniel Bates 2016-08-15 19:08:24 PDT
Committed r204492: <http://trac.webkit.org/changeset/204492>