FF will crash while rendering a huge amount of pictures using JS




JavaScript Engine
2 years ago
5 months ago


(Reporter: kill0rz, Unassigned)


({crash, triage-deferred})

47 Branch
Windows 7
crash, triage-deferred

Firefox Tracking Flags

(Not tracked)


(crash signature)



2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160604131506

Steps to reproduce:

I wrote a testpage here: https://github.com/kill0rz/WBB2_Pic-Upload/tree/master/browsertest

I want to upload pictures to a website, but before uploading they should be resized using JS in browser.
Jut put a local copy of the test page and upload very much pictures at once.
That works using FF only with small amounts of data. Upload a huge amount, like 600MB/1000 files, will crash FF immediately.

Actual results:

FF crashes even before rendering the first images has been completed.

Expected results:

Just like other browsers, like Chrome, FF should process the files until the end.


2 years ago
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64

Comment 1

2 years ago
So you are creating a lot of canvases in parallel.  It looks like they should be collected eventually, but you may stack too many up too quickly for them to be GC'd.

Can you try setting canvas.width=0 and canvas.height = 0 after you get the result out of the canvas?  That would free the canvas memory more aggressively.

Also, do you have a link for the crash in about:crashes?  I'm just guessing its an OOM.
Flags: needinfo?(git)

Comment 2

2 years ago
Hi ben,

as you requested, here ist the link to the crash: https://crash-stats.mozilla.com/report/index/b896ae8c-9b22-4343-8ff2-fa48f2160608

Setting canvas.width=0 and canvas.height = 0 does not fix the problem nor delays the crash.

Comment 3

2 years ago
Ok.  I guess we need someone to investigate how chrome is avoiding this OOM while we are hitting it.
Crash Signature: https://crash-stats.mozilla.com/report/index/b896ae8c-9b22-4343-8ff2-fa48f2160608
Flags: needinfo?(git)
Keywords: crash


2 years ago
Crash Signature: https://crash-stats.mozilla.com/report/index/b896ae8c-9b22-4343-8ff2-fa48f2160608 → [@ OOM | large | NS_ABORT_OOM | NS_NewURI]

Comment 4

2 years ago
Confirming, that this bug only appears in 32Bit FF. 64Bit FF handels at least 1,2GB upload data. Tested on Linux and Windows.
Keywords: triage-deferred
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.