The default bug view has changed. See this FAQ.

aPNG images in css cursor rule leak a lot of memory

RESOLVED FIXED in mozilla1.9beta1

Status

()

Core
Widget: Gtk
--
critical
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: Olivier, Assigned: mats)

Tracking

(5 keywords)

unspecified
mozilla1.9beta1
x86
Linux
fixed1.8.0.14, mlk, pp, regression, verified1.8.1.10
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments)

(Reporter)

Description

10 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.6) Gecko/20070801 (Debian-1.8.1.6-1) Epiphany/2.14
Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9a9pre) Gecko/2007100404 Minefield/3.0a9pre

aPNG images used in a css cursor rule trigger a condition where memory is consumed until exhausted. 

Reproducible: Always

Steps to Reproduce:
1. monitor memory consumed by the firefox process. Load the testcase
2. open the menu in the testcase and hover quickly on elements
3. see memory consumption going up
Actual Results:  
Leak

Expected Results:  
Not leak :-)

I tried to simplified the testcase, but am still confused what exactly the problem is (some bad interaction between css and aPNG).
Note that:
- this aPNG file, when displayed in the browser, doesn't (appears to) leak memory, and displays fine (either as fixed in ff2, or animated in ff3)
- the same testcase, if using a regular png, doesn't leak
- a regular PNG image is correctly displayed as a css cursor, while aPNG is not (this may be another bug/RFE)
- this affects ff2 as well
(Reporter)

Comment 1

10 years ago
Just thought I would mention this (of course?) affects other Gecko browsers as well.

Updated

10 years ago
Keywords: mlk
(Assignee)

Comment 2

10 years ago
GTK2 nsWindow::SetCursor leaks 'pixbuf' when the image is too big:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/widget/src/gtk2/nsWindow.cpp&rev=1.229&root=/cvsroot&mark=1031,1041,1042#988
Looks like there are a few other leak paths in this method as well.

It's a regression from bug 361298, so it also occurs on branches and the
leak is pretty bad so we should probably fix this on branches as well.
Patch coming up...
Assignee: nobody → mats.palmgren
Blocks: 361298
Status: UNCONFIRMED → NEW
Component: ImageLib → Widget: Gtk
Ever confirmed: true
Keywords: pp, regression
(Assignee)

Comment 3

10 years ago
Created attachment 283660 [details] [diff] [review]
Patch rev. 1 (trunk and 1.8)

Fixes leak and OOM problems. This patch is for trunk and the 1.8 branch.
Attachment #283660 - Flags: superreview?(roc)
Attachment #283660 - Flags: review?(roc)
(Assignee)

Comment 4

10 years ago
Created attachment 283661 [details] [diff] [review]
Patch rev. 1 (1.8.0 branch)
Attachment #283661 - Flags: superreview?(roc)
Attachment #283661 - Flags: review?(roc)
(Assignee)

Updated

10 years ago
Flags: blocking1.8.1.9?
Attachment #283660 - Flags: superreview?(roc)
Attachment #283660 - Flags: superreview+
Attachment #283660 - Flags: review?(roc)
Attachment #283660 - Flags: review+
Attachment #283661 - Flags: superreview?(roc)
Attachment #283661 - Flags: superreview+
Attachment #283661 - Flags: review?(roc)
Attachment #283661 - Flags: review+
(Assignee)

Updated

10 years ago
Attachment #283660 - Flags: approval1.9?

Updated

10 years ago
Attachment #283660 - Flags: approval1.9? → approval1.9+
(Assignee)

Comment 5

10 years ago
mozilla/widget/src/gtk2/nsWindow.cpp 	1.232 

-> FIXED
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9 M9
(Reporter)

Comment 6

10 years ago
I don't see the checkin on branch, and wonder if it got forgotten (as this bug is now closed).

Sorry for the spam if I missed something, and thanks a lot for the super-quick fix.
(Assignee)

Comment 7

10 years ago
The Status field tracks status for trunk.  "fixed1.8.1.x"/"fixed1.8.0.x"
will be added to Keywords when the checkin is made for Firefox 2.0.0.x/1.5.0.x
Here are the trunk builds to test:
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
(Assignee)

Updated

10 years ago
Attachment #283660 - Flags: approval1.8.1.9?
(Assignee)

Updated

10 years ago
Attachment #283661 - Flags: approval1.8.0.14?
Comment on attachment 283660 [details] [diff] [review]
Patch rev. 1 (trunk and 1.8)

approved for 1.8.1.10, a=dveditz for release-drivers
Attachment #283660 - Flags: approval1.8.1.10? → approval1.8.1.10+
Comment on attachment 283661 [details] [diff] [review]
Patch rev. 1 (1.8.0 branch)

approved for 1.8.0.14, a=dveditz for release-drivers
Attachment #283661 - Flags: approval1.8.0.14? → approval1.8.0.14+
(Assignee)

Comment 10

10 years ago
mozilla/widget/src/gtk2/nsWindow.cpp 	1.145.2.14 	MOZILLA_1_8_BRANCH  

mozilla/widget/src/gtk2/nsWindow.cpp 	1.145.2.1.4.4 	MOZILLA_1_8_0_BRANCH  
Flags: blocking1.8.1.11?
Keywords: fixed1.8.0.14, fixed1.8.1.10
verified fixed 1.8.1.10 using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.10) Gecko/2007111504 Firefox/2.0.0.10 and the steps to reproduce from this bug.

Keywords: fixed1.8.1.10 → verified1.8.1.10
I'm not noticing any real difference between the last released 1.8.0 FF build (1.5.0.12) and the current nightly, where this is "fixed".
Created attachment 293198 [details]
zipped testcase

Saved original testcase in case server goes away.
You need to log in before you can comment on or make changes to this bug.