0

Chrome Version : 48.0.2564.109 m on Windows 7

We have a Chrome Extension developed for our project.

The extension within it has a video element the source of which is the stream selected from the "chrome.desktopCapture.chooseDesktopMedia". The image for every 500ms is captured as webp from the video played and sent back to the host application via long lived connections.

What we notice is that this extension is crashing after a brief usage in time (sometimes at 5mins sometimes at 30mins). Profiling the extension we see the Heap memory constant at ~2.6MB throughout until the extension getting crashed.

One odd behavior that we noticed is that clicking the "Collect Garbage" button in the Timeline tab of the Developers tool for the extension is helping the extension to run for longer period without getting crashed.

Questions : 1. Is there any existing issue with Google Chrome browser extension's garbage collection not getting triggered until it is manually started ? 2. By any means is it possible to kick start this garbage collection process from the extension's

Aravind
  • 1
  • 2
  • have you tried reading this? http://stackoverflow.com/questions/13950394/forcing-garbage-collection-in-google-chrome and https://developer.chrome.com/devtools/docs/javascript-memory-profiling – Android Enthusiast Feb 19 '16 at 12:11
  • I tried them. The Heap memory remains almost constant. Checked on the Task Manager of Google Chrome and noticed that the Memory of the extension keeps increasing. But the Heap snapshot is not showing any difference. On clicking the "Collect Garbage" button the memory of the extension in Task Manager is coming down drastically. Trigerring GC process from the code seems to need Google Chrome modification which cannot be done for the project we deliver. – Aravind Feb 22 '16 at 10:45

0 Answers0