Closed Bug 856080 Opened 11 years ago Closed 11 years ago

memory leak in Layer with OMTC

Categories

(Core :: Graphics: Layers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla23
blocking-b2g tef+
Tracking Status
firefox21 --- wontfix
firefox22 --- wontfix
firefox23 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: christophe.mouraud, Assigned: nical)

References

Details

(Whiteboard: [MemShrink])

Attachments

(2 files, 1 obsolete file)

Attached file layer.diff (obsolete) —
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:20.0) Gecko/20100101 Firefox/20.0
Build ID: 20130320062118

Steps to reproduce:

usign CSS opacity transition  with OMTC


Actual results:

Memroy leak (finding with trace-malloc)
nsTArray does not own it manages pointers and there are not released in its destructor
OS: Windows XP → All
Hardware: x86 → All
Hi Christophe, thanks for your patch, can you please format it with the "unified" format, as shown here https://developer.mozilla.org/en-US/docs/Creating_a_patch
and submit it again?

Please add me as reviewer when you do, patches without review request tend to not get much attention.
This fix shouldn't wait longer so I reformated the patch (Christophe, I made sure to put your name and not mine in the patch's header, I don't mean to steal your work).

It's probably worth uplifting asap, I wonder if this could be the cause of the b2g camera app leak.
Assignee: nobody → nical.bugzilla
Attachment #731205 - Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #734745 - Flags: review?(jmuizelaar)
Attachment #734745 - Flags: review?(jmuizelaar) → review+
Whiteboard: [MemShrink]
> +    InfallibleTArray<nsAutoPtr<css::ComputedTimingFunction>>& functions = data->mFunctions;

Shouldn't this be "> >"?  I'd be surprised if all the compilers we support work with ">>" closing the nested template.

How do you think this might cause leaks of the objects identified in bug 846903 comment 64?  I don't see the ComputedTimingFunction class holding on to OGL objects (or any objects at all, actually).
(In reply to Justin Lebar [:jlebar] from comment #5)
> > +    InfallibleTArray<nsAutoPtr<css::ComputedTimingFunction>>& functions = data->mFunctions;
> 
> Shouldn't this be "> >"?  I'd be surprised if all the compilers we support
> work with ">>" closing the nested template.

Oh, right. here is a fix

> 
> How do you think this might cause leaks of the objects identified in bug
> 846903 comment 64?  I don't see the ComputedTimingFunction class holding on
> to OGL objects (or any objects at all, actually).

This leak happens in SetAnimation which you mentioned in Comment 47 of the b2g bug:
> from mozilla::layers::Layer::SetAnimations(), which may or may not be related.

I suppose this won't fix the leak in the camera entirely though.
Attachment #734772 - Attachment description: Fixes ComputedTimingFunction leak (reformated patch) with >> template syntax fix → Fixes ComputedTimingFunction leak (reformated patch) with >> template syntax fix. Carries jmuizelaar: review+
https://hg.mozilla.org/mozilla-central/rev/fdc97a5d6356
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
tef? because of bug 861492.  Let's land this, please.
blocking-b2g: --- → tef?
blocking-b2g: tef? → tef+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: