Bug 247967 - "A MediaStreamTrack ended due to a capture failure" when creating a new MediaStream after destroy the previous one
Summary: "A MediaStreamTrack ended due to a capture failure" when creating a new Media...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Critical
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-15 18:35 PST by Brian Liu
Modified: 2023-01-20 02:14 PST (History)
3 users (show)

See Also:


Attachments
Screen recording (14.72 MB, video/mp4)
2022-11-15 18:35 PST, Brian Liu
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Liu 2022-11-15 18:35:06 PST
Created attachment 463550 [details]
Screen recording

This issue can always be reproduced on iPhone 14/Safari 16.0/16.0.1 simply follow the steps

1. Create a video & audio stream by calling navigator.mediaDevices.getUserMedia
2. Create a MediaRecorder using recordrtc with the stream(https://github.com/muaz-khan/RecordRTC)
3. Record a video
4. Destroy the MediaStreamTracks
5. Repeat step 1 and 2 then browser crash

You can quickly reproduce it by opening this link (https://dev.vouchfor.com/c/ybSXTEjsWj) on iPhone with iOS 16.0/16.0.1
Comment 1 Radar WebKit Bug Importer 2022-11-22 18:36:18 PST
<rdar://problem/102615829>
Comment 2 Eric Carlson 2022-12-13 14:43:03 PST
https://dev.vouchfor.com/c/ybSXTEjsWj is no longer valid. Do you have another test case that demonstrates the problem?
Comment 3 Brian Liu 2022-12-13 14:58:55 PST
Try this one instead https://staging.vouchfor.com/c/EYWSAf4NJP
Comment 4 youenn fablet 2023-01-20 02:11:38 PST
(In reply to Brian Liu from comment #3)
> Try this one instead https://staging.vouchfor.com/c/EYWSAf4NJP

Can you make an English version, or provide some steps to how to use this link?
Comment 5 youenn fablet 2023-01-20 02:14:58 PST
Looking at the screen recording, it might be that there are some VideoFrames that are kept from too long, thus triggering the MediaStreamTrack ended failure.
@Brian, if you can provided an English version, that is great.
Otherwise, can you reproduce and send me (youenn@apple.com) a sysdiagnose?