If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Composer leaks nsEditorShell

VERIFIED FIXED in Future

Status

()

Core
Layout
P3
major
VERIFIED FIXED
18 years ago
17 years ago

People

(Reporter: Simon Fraser, Assigned: anthonyd)

Tracking

({mlk, perf})

Trunk
Future
All
Mac System 8.5
mlk, perf
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [nsbeta3+][p:2][pdtp3])

Attachments

(2 attachments)

(Reporter)

Description

18 years ago
If you open and close a composer window (no typing required), we leak a bunch of 
stuff, including the nsEditor, nsEditorShell, nsEditorBoxObject, 2 nsJSContexts 
and perhaps more. This causes other teardown-related bugs (e.g. bug 41681).
(Reporter)

Updated

18 years ago
Blocks: 41681
(Reporter)

Comment 1

18 years ago
We're leaking an nsXULDocument here
(Reporter)

Comment 2

18 years ago
Created attachment 9916 [details]
refcount trace with --ignore-balanced, for mozilla -edit and quit

Comment 3

18 years ago
*** Bug 41681 has been marked as a duplicate of this bug. ***
(Reporter)

Comment 4

18 years ago
Status on this one:

If I remove the <editor> tag from the XUL, we stop leaking.
If I never make an editor in the C++, then we still leak.
Status: NEW → ASSIGNED
Target Milestone: --- → M17
(Reporter)

Updated

18 years ago
Depends on: 42530
(Reporter)

Comment 5

18 years ago
Well, this was fun. It turns out to be a bug deep in XBL/JS, which I've filed 
separately (bug 42746). I can fix this by checking in a workaround.
Whiteboard: fix in hand
(Reporter)

Comment 6

18 years ago
Created attachment 10219 [details]
trace for editor shell leakage
(Reporter)

Comment 7

18 years ago
I checked in a 1-line JS change that fixed the XUL doc leak. We still leak the 
editorshell, which is shown in the log just attached.
Summary: Composer leaks nsEditor, nsEditorShell, nsEditorBoxObject → Composer leaks nsEditorShell
Whiteboard: fix in hand
Keywords: mlk
(Reporter)

Comment 8

17 years ago
Tony, this one is all yours. FYI, here's an email which waterson sent out which 
relates to this bug:

David Baron has done a heroic job of tracking down and documenting a
plethora of leaks that involve XUL, JS, XBL, boxes, and editor. For
that, he certainly deserves a *ton* of credit. But that's not why I'm
writing this message.

I'm starting to get really, really nervous about the state of this code.
I think that a lot of stuff is just leaking all over the floor. And I
mean, really nasty, hard leaks that involve cycles between frames,
content nodes, and their JS objects. (For example, look at
http://bugzilla.mozilla.org/show_bug.cgi?id=45676.)

These leaks involve massive amounts of memory. For example, let's take
bug 45676. Just *using* a scrollbar (imagine that) entrains over 1Mb
(the entire window)! Realistically, this means that we're leaking almost
every window that we open.

I realize that people on XPToolkit are already doomed, but this stuff
has *got* to be made a priority. It has tremendous impact on performance
and footprint, and ultimately affects the stability of the product on
Win98, Mac, and embedded platforms.

Is there any hope that dbaron can get some help looking at this stuff?

thanks,
chris
Assignee: sfraser → anthonyd
Status: ASSIGNED → NEW
(Reporter)

Comment 9

17 years ago
keywords
Keywords: nsbeta3, perf
(Reporter)

Comment 10

17 years ago
Ugh, sorry for the spam. m18.
Target Milestone: M17 → M18

Updated

17 years ago
Status: NEW → ASSIGNED

Comment 11

17 years ago
Anthony -- pull in SImon if you need help with this one, setting to nsbeta3+
Whiteboard: nsbeta3+

Comment 12

17 years ago
setting priority in status whiteboard - medium
Whiteboard: nsbeta3+ → [nsbeta3+][p:3]

Comment 13

17 years ago
moving this over to m19 with other perf issues
Whiteboard: [nsbeta3+][p:3] → [nsbeta3-][p:3]
Target Milestone: M18 → M19

Comment 14

17 years ago
bumping up to p2, setting to nsbeta3+ -- reviewed by Bijal and beppe
Severity: normal → major
Priority: P3 → P2
Whiteboard: [nsbeta3-][p:3] → [nsbeta3+][p:2]

Comment 15

17 years ago
pdtp3.  There is nothing in this bug that describes the horrible impact of not
fixing it.  If you can show that fixing this would provide some huge benefit,
please bring it back for reconsideration.
Priority: P2 → P3
Whiteboard: [nsbeta3+][p:2] → [nsbeta3+][p:2][pdtp3]
Target Milestone: M19 → Future
(Reporter)

Comment 16

17 years ago
This bug is fixed anyway.
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 17

17 years ago
Marking verified per last comments by reporter.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.