Bug 253228

Summary: imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-pause-resume.html is crashing sometimes under -[AVAssetWriterInput appendSampleBuffer:]
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   

Description youenn fablet 2023-03-01 23:26:48 PST
See https://build.webkit.org/results/Apple-Monterey-Debug-WK2-Tests/261013@main%20(7232)/imported/w3c/web-platform-tests/mediacapture-record/MediaRecorder-pause-resume-crash-log.txt
2023-03-01 13:41:55.282 com.apple.WebKit.GPU.Development[94325:38781352] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[AVAssetWriterInput appendSampleBuffer:] Cannot append sample buffer: Must start a session (using -[AVAssetWriter startSessionAtSourceTime:) first'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007ff81b27e1e3 __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007ff81afdec13 objc_exception_throw + 48
	2   AVFCore                             0x00007ff82dda83f4 __41-[AVAssetWriterInput appendSampleBuffer:]_block_invoke + 0
	3   WebCore                             0x00000001079d0eee _ZZN7WebCore26MediaRecorderPrivateWriter28flushCompressedSampleBuffersEON3WTF8FunctionIFvvEEEEN3$_3clEv + 398
	4   WebCore                             0x00000001079d143d _ZZN3WTF8BlockPtrIFvvEE12fromCallableIZN7WebCore26MediaRecorderPrivateWriter28flushCompressedSampleBuffersEONS_8FunctionIS1_EEE3$_3EES2_T_ENKUlPvE_clESB_ + 29
	5   WebCore                             0x00000001079d1415 _ZZN3WTF8BlockPtrIFvvEE12fromCallableIZN7WebCore26MediaRecorderPrivateWriter28flushCompressedSampleBuffersEONS_8FunctionIS1_EEE3$_3EES2_T_ENUlPvE_8__invokeESB_ + 21
	6   AVFCore                             0x00007ff82ddb16cd -[AVAssetWriterInputMediaDataRequester requestMediaDataIfNecessary] + 84
	7   libdispatch.dylib                   0x00007ff81af800cc _dispatch_call_block_and_release + 12
	8   libdispatch.dylib                   0x00007ff81af81317 _dispatch_client_callout + 8
	9   libdispatch.dylib                   0x00007ff81af8dc78 _dispatch_main_queue_drain + 943
	10  libdispatch.dylib                   0x00007ff81af8d8bb _dispatch_main_queue_callback_4CF + 31
	11  CoreFoundation                      0x00007ff81b2409c7 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	12  CoreFoundation                      0x00007ff81b20193f __CFRunLoopRun + 2771
	13  CoreFoundation                      0x00007ff81b2007ac CFRunLoopRunSpecific + 562
	14  Foundation                          0x00007ff81c054d9a -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 216
	15  Foundation                          0x00007ff81c0df8d7 -[NSRunLoop(NSRunLoop) run] + 76
	16  libxpc.dylib                        0x00007ff81ae80816 _xpc_objc_main + 773
	17  libxpc.dylib                        0x00007ff81ae80239 xpc_main + 99
	18  WebKit                              0x0000000131f22a42 _ZN6WebKit14XPCServiceMainEiPPKc + 834
	19  WebKit                              0x000000013402eccb WKXPCServiceMain + 27
	20  com.apple.WebKit.GPU.Development    0x0000000100b44f22 main + 34
	21  dyld                                0x0000000104efb51e start + 462
)
Comment 1 Radar WebKit Bug Importer 2023-03-01 23:27:03 PST
<rdar://problem/106128729>