Closed
Bug 444260
Opened 16 years ago
Closed 16 years ago
Wide <xul:button> causes nsNativeThemeCocoa::DrawCellWithScaling to autorelease a freed object
Categories
(Core :: Widget: Cocoa, defect, P1)
Tracking
()
VERIFIED
FIXED
People
(Reporter: jruderman, Assigned: smichaud)
References
Details
(4 keywords, Whiteboard: [sg:critical?])
Attachments
(2 files, 2 obsolete files)
Version: trunk debug build on Leopard
Loading the testcase causes a malloc error "can't allocate region" (perhaps bug 435223), and then:
objc[20992]: FREED(id): message autorelease sent to freed object=0x1ca0afe0
The malloc error doesn't bother me too much, but touching freed objects is pretty bad. In fact, with MallocScribble enabled, Firefox dereferences 0x55555575 instead of triggering the error message above.
Reporter | ||
Updated•16 years ago
|
Whiteboard: [sg:critical?]
Assignee | ||
Comment 1•16 years ago
|
||
Here's a gdb trace of this crash, made with an opt 1.9.0-branch build
containing debug symbols. It has both console messages and a stack
trace.
I'll be working on this.
Assignee: joshmoz → smichaud
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•16 years ago
|
||
Here's a trivial patch that fixes the crash -- it refuses to draw when
CGBitmapContextCreate() fails (when it returns NULL).
But the impossibly large button does get drawn on other platforms
(e.g. Windows and Linux), so I suppose we should try to work some kind
of fallback into the drawing code, so that it will still "work" even
when it's called with parameters that are far too large.
Since I'm not very familiar with this code, I'd prefer to leave this
to others.
Josh? :-)
Assignee | ||
Comment 3•16 years ago
|
||
On second thought, maybe I _can_ do better.
Here's a slightly less trivial patch that's considerably less ugly.
You still see errors in the console (which I think is entirely
appropriate), but the button does get drawn (and in the same way as on
Windows and Linux).
Attachment #328691 -
Attachment is obsolete: true
Assignee | ||
Updated•16 years ago
|
Attachment #328698 -
Flags: review?(joshmoz)
Assignee | ||
Comment 4•16 years ago
|
||
Comment on attachment 328698 [details] [diff] [review]
Less ugly fix (still pretty trivial)
This patch is (I think) superceded by my current patch for bug 444864
(attachment 329570 [details] [diff] [review]).
Attachment #328698 -
Attachment is obsolete: true
Attachment #328698 -
Flags: review?(joshmoz)
Assignee | ||
Updated•16 years ago
|
Flags: wanted1.9.1?
Flags: wanted1.9.0.x?
Priority: -- → P1
Updated•16 years ago
|
Flags: wanted1.9.0.x?
Flags: wanted1.9.0.x+
Flags: blocking1.9.0.3?
Assignee | ||
Comment 5•16 years ago
|
||
The autorelease-after-deletion problem is an Apple bug. See bug 449111
comment #5.
Reporter | ||
Updated•16 years ago
|
Flags: blocking1.9.1?
Comment 6•16 years ago
|
||
Does that mean we can't fix it? Can we work around it?
Is there an Apple bug reference for the problem?
Assignee | ||
Comment 7•16 years ago
|
||
We can work around the problem. The patch for bug 444864 does so.
Assignee | ||
Comment 8•16 years ago
|
||
Fixed by patch for bug 444864, which was just landed on mozilla-central.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 9•16 years ago
|
||
Reopened because I've backed out my patch for bug 444864 (which
probably caused some reftest failures).
Assignee | ||
Updated•16 years ago
|
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 10•16 years ago
|
||
Fixed by my new patch for bug 444864, which was just landed on mozilla-central.
Status: REOPENED → RESOLVED
Closed: 16 years ago → 16 years ago
Resolution: --- → FIXED
Comment 12•16 years ago
|
||
I assume this isn't needed for Firefox 2 because it's cocoa? I'm that's incorrect please nominate for blocking 1.8.1.x
Flags: wanted1.8.1.x-
Flags: blocking1.9.0.3?
Flags: blocking1.9.0.3+
Assignee | ||
Comment 13•16 years ago
|
||
This bug (bug 444260), bug 444864 and bug 449111 only effect (happen on)
Firefox 3.X -- not Firefox 2.
Assignee | ||
Comment 14•16 years ago
|
||
Fixed on the 1.9.0 branch by the patch for bug 444864.
Keywords: fixed1.9.0.4
Comment 15•16 years ago
|
||
verified fixed using Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2pre) Gecko/20081013 Minefield/3.1b2pre. I verified by using the testcase in Comment 0.
Status: RESOLVED → VERIFIED
Comment 16•16 years ago
|
||
Verified for 1.9.0.4 with Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.4pre) Gecko/2008102104 GranParadiso/3.0.4pre.
Keywords: fixed1.9.0.4 → verified1.9.0.4
Updated•16 years ago
|
Group: core-security
Updated•16 years ago
|
Keywords: fixed1.9.1
Updated•16 years ago
|
Keywords: verified1.9.1
Updated•16 years ago
|
Keywords: fixed1.9.1
You need to log in
before you can comment on or make changes to this bug.
Description
•