Closed Bug 1732230 Opened 3 years ago Closed 3 years ago

Heavy freezing while playing videos on YouTube fullscreen

Categories

(Core :: Graphics, defect)

defect

Tracking

()

VERIFIED FIXED
94 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox92 --- unaffected
firefox93 --- unaffected
firefox94 + verified

People

(Reporter: yoasif, Assigned: bradwerth)

References

(Regression)

Details

(Keywords: nightly-community, regression)

Crash Data

Attachments

(2 files)

Noticed today that fullscreen videos on YouTube were freezing and stuttering heavily.

Example video: https://www.youtube.com/watch?v=Q6SQ2_iShIs

I played this back on a 13" Early 2015 MacBook Air with a 1.6GHz dual core i5 and macOS Catalina.

Issue occurs on both 720p and 1080p (have not tried other resolutions).

Profile: https://share.firefox.dev/3kypx43

Profile is a recording of starting playback, fullscreen, playing back for a few minutes and exiting fullscreen.

mozregression:

Was this inbound build good, bad, or broken? (type 'good', 'bad', 'skip', 'retry', 'back' or 'exit' and press Enter): good
84:16.64 INFO: Narrowed inbound regression window from [ddc9c3bd, af7e7b1d] (3 builds) to [c9a191f9, af7e7b1d] (2 builds) (~1 steps left)
84:16.77 INFO: No more inbound revisions, bisection finished.
84:16.77 INFO: Last good revision: c9a191f99fa323e42bc664320d160b4ff4f3f4f1
84:16.77 INFO: First bad revision: af7e7b1d891ee07ec15c3702cbce8f509679b82a
84:16.77 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=c9a191f99fa323e42bc664320d160b4ff4f3f4f1&tochange=af7e7b1d891ee07ec15c3702cbce8f509679b82a

Has Regression Range: --- → yes
Has STR: --- → yes
Regressed by: 1731815
Attached file about:support

I'll sort it out.

Assignee: nobody → bwerth

Set release status flags based on info from the regressing bug 1731815

I also see a huge memory increase of the VTDecoderXPCService during fullscreen youtube playback. Maybe we're only enqueuing buffers and never dequeuing them? Or we're missing some other reference counting release?

[Tracking Requested - why for this release]: Video playback regression

Yeah, NativeLayerCA::Representation::EnqueueSurface never releases sampleBuffer. I think it needs to.

Same with pixelBuffer. The layer will have a ref to the sampleBuffer, which has a ref to the pixelBuffer. All other references need to be released.

Sorry for not catching this in review. This should be using CFTypeRefPtr to do the release automatically.

Using CFTypeRefPtr ensures that the created Core Foundation / Media types are
deallocated under all code paths. The duplicated syntax of -"Deallocator"
variables is necessary because CFTypeRefPtr is designed to work with
functions that return the required type. All of the creation methods in use
here take a type reference as a parameter, making it impossible to pass in a
CFTypeRefPtr directly. The "Deallocator" variables serve the purpose of
ensuring deallocation even though the variables are not otherwise referenced.

This change also cleans up the casting for CFMutableDictionaryRef to use a
simpler Objective-C idiom.

Crash Signature: [@ mozilla::layers::MacIOSurfaceRecycleAllocator::Allocate]
Crash Signature: [@ mozilla::layers::MacIOSurfaceRecycleAllocator::Allocate] → [@ mozilla::layers::MacIOSurfaceRecycleAllocator::Allocate] [@ mozilla::layers::NativeLayerCA::NextSurface]
Pushed by bwerth@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/22bebc9d9463
Ensure deallocation in NativeLayerCA::Representation::EnqueueSurface. r=mstange
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch

Verified-fixed on the latest Firefox Nightly 94.0a1 (2021-09-27) (64-bit) on macOS 10.15 and macOS Beta 12.

Status: RESOLVED → VERIFIED
Crash Signature: [@ mozilla::layers::MacIOSurfaceRecycleAllocator::Allocate] [@ mozilla::layers::NativeLayerCA::NextSurface] → [@ mozilla::layers::MacIOSurfaceRecycleAllocator::Allocate] [@ mozilla::layers::NativeLayerCA::NextSurface]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: