[Webkit-unassigned] [Bug 256366] Safari tab freeze and gpu process crash when calling canvas function drawimage/getimagedata/setimagedata from high resolution getUserMedia stream with several background tabs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 21 19:12:00 PDT 2023


--- Comment #8 from Shawn Lee <shawnlee at infotoo.com> ---

Looks like there is memory leak when drawing getUserMedia video from to canvas or create bitmap from getUserMedia if you do not close the tab.

I have create another demo.

First open instruments to monitor the memory usage of com.apple.webkit.gpu.

Then click "Start drawImage from camera", it will start play video and call drawImage.

Click stop to stop video and remove canvas and video frame the page.

Click replace location to ensure there are no page caches.

Run console.takeHeapSnapshot in inspector to trigger gc.

observer that the memory usage of  com.apple.webkit.gpu. is increased to 100mb.

If you close the tab, the memory is freed.

If you have more tabs, the memory get accumulated, and eventually the system kills the gpu process and safari can not recovery for the foreground tab.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230822/aa1cc809/attachment.htm>

More information about the webkit-unassigned mailing list