Bug 303383

Summary: Crash in RTCEncodedStreamProducer::writeFrame, m_transformBackend nullptr
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Kimmo Kinnunen
Reported 2025-12-02 04:25:42 PST
Crash in RTCEncodedStreamProducer::writeFrame, m_transformBackend nullptr https://build.webkit.org/results/Apple-Tahoe-Debug-WK2-Tests/303542@main%20(290)/impo[…]oded-transform/script-metadata-transform.https-crash-log.txt https://build.webkit.org/results/Apple-Tahoe-Debug-WK2-Tests/303542@main%20(290)/results.html I'm pretty sure it can be fixed by diff --git a/Source/WebCore/Modules/mediastream/RTCEncodedStreamProducer.cpp b/Source/WebCore/Modules/mediastream/RTCEncodedStreamProducer.cpp index fc452c545d17..183e89eada5d 100644 --- a/Source/WebCore/Modules/mediastream/RTCEncodedStreamProducer.cpp +++ b/Source/WebCore/Modules/mediastream/RTCEncodedStreamProducer.cpp @@ -142,6 +142,9 @@ ExceptionOr<void> RTCEncodedStreamProducer::writeFrame(ScriptExecutionContext& c auto* globalObject = context.globalObject(); if (!globalObject) return { }; + RefPtr backend = m_transformBackend; + if (!backend) + return { }; // should we return exception if clear()'ed Ref vm = globalObject->vm(); auto scope = DECLARE_THROW_SCOPE(vm); @@ -156,10 +159,9 @@ ExceptionOr<void> RTCEncodedStreamProducer::writeFrame(ScriptExecutionContext& c }, [&](RefPtr<RTCEncodedVideoFrame>& value) { return value->rtcFrame(vm); }); - // If no data, skip the frame since there is nothing to packetize or decode. if (rtcFrame->data().data()) - Ref { *m_transformBackend }->processTransformedFrame(rtcFrame.get()); + backend->processTransformedFrame(rtcFrame.get()); return { };
Attachments
Radar WebKit Bug Importer
Comment 1 2025-12-02 04:25:48 PST
youenn fablet
Comment 2 2025-12-04 03:55:27 PST
EWS
Comment 3 2025-12-04 06:47:24 PST
Committed 303908@main (8b20220f4c45): <https://commits.webkit.org/303908@main> Reviewed commits have been landed. Closing PR #54833 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.