New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 638919 link

Starred by 2 users

Issue metadata

Status: Archived
Owner: ----
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

MHTML files removed by URL.revokeObjectURL are not deleted, leading to Chrome to Crash

Reported by o...@testim.io, Aug 18 2016

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36

Steps to reproduce the problem:
1. Install the attached unpacked extension via chrome://extensions (reduced problem to 15 lines of code)
2. Open the extension's popup and set the input (labeled "Number of MHTML to Create") to 50000, and click start

What is the expected behavior?
Chrome to generate 50000 mhtml files and delete them.

What went wrong?
Chrome crashes

WebStore page: https://chrome.google.com/webstore/detail/testim-editor/pebeiooilphfmbohdbhbomomkkoghoia

Did this work before? N/A 

Chrome version: 50.0.2661.86  Channel: stable
OS Version: Ubuntu Server 16.04
Flash Version: 

The code creates mhtml files via the pageCapture extension API*
Works on Mac.
Crashes on Linux with docker (Docker version 1.11.0, build 4dc5990).

* https://developer.chrome.com/extensions/pageCapture
 
mhtml extention example.zip
43.5 KB Download

Comment 1 by o...@testim.io, Aug 18 2016

Chrome probably crashes due to insufficient disk space.
Cc: rnimmagadda@chromium.org
Labels: Needs-Feedback
@oren: Could you please provide us the screen-recording of this issue for better understanding. This would help us in triaging it further.

Thank you.

Comment 3 by o...@testim.io, Aug 19 2016

Please see attached screenshot of the extension (with minimum code to reproduce).

The pseudo code is:
for (1.. 50000) {
  var blob = chrome.pageCapture.saveAsMHTML();
  var url = URL.createObjectURL(blob);
  URL.revokeObjectURL(url);
}


The actual code is found in background.js comprising:

function deleteBlob(blob) {
	var url = URL.createObjectURL(blob);
  	URL.revokeObjectURL(url);
}

function createMhtml(tabId) {
  chrome.pageCapture.saveAsMHTML({"tabId" : tabId}, function(pageDomBlob){
    if (chrome.runtime.lastError) {            
      console.error("Failed to save page as MHTML", chrome.runtime.lastError.message);
    } else {
      console.log("Tab id:", tabId ,"saved as MHTML");
      //delete blob
      deleteBlob(pageDomBlob);
    }
  });
}

chrome.runtime.onMessage.addListener(function(request, sender, sendResponse) {
	if(request.tabId && request.msg === 'saveAsMHTML' && request.numOfMhtml) {
		for (i = 0; i < parseInt(request.numOfMhtml); i++) {
		  createMhtml(request.tabId);
		}
	}
});
revokeBlob extension.jpg
64.7 KB View Download
Project Member

Comment 4 by sheriffbot@chromium.org, Aug 26 2016

Labels: -Needs-Feedback Needs-Review
Owner: rnimmagadda@chromium.org
Thank you for providing more feedback. Adding requester "rnimmagadda@chromium.org" for another review and adding "Needs-Review" label for tracking.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Needs-Review
Owner: ----
Can you get a crash report id? https://www.chromium.org/for-testers/bug-reporting-guidelines/reporting-crash-bug
Project Member

Comment 6 by sheriffbot@chromium.org, Sep 11 2017

Status: Archived (was: Unconfirmed)
Issue has not been modified or commented on in the last 365 days, please re-open or file a new bug if this is still an issue.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment