Closed Bug 647480 Opened 9 years ago Closed 9 years ago

Crash [@ TextRunWordCache::MakeTextRun] with canvas mozDrawText, mozPathText, mozTextAlongPath

Categories

(Core :: Canvas: 2D, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla5
Tracking Status
firefox5 --- fixed
blocking2.0 --- -
blocking1.9.2 --- -

People

(Reporter: jruderman, Assigned: mats)

References

(Blocks 1 open bug)

Details

(Keywords: crash, testcase, Whiteboard: [sg:dos])

Crash Data

Attachments

(3 files, 1 obsolete file)

###!!! ASSERTION: Default canvas font is invalid: 'res == NS_OK', file content/canvas/src/nsCanvasRenderingContext2D.cpp, line 2941
(like in bug 637245)

Crash [@ TextRunWordCache::MakeTextRun]
Attached file stack traces
OS: Mac OS X → All
Hardware: x86 → All
Summary: Crash [@ TextRunWordCache::MakeTextRun] with canvas mozDrawText → Crash [@ TextRunWordCache::MakeTextRun] with canvas mozDrawText, mozPathText, mozTextAlongPath
Attached patch fix (obsolete) — Splinter Review
mozPathText() and mozTextAlongPath() also crashes without a font.

Accessing the font, eg "ctx.font", asserts:
###!!! ASSERTION: Default canvas font is invalid: 'res == NS_OK',
file content/canvas/src/nsCanvasRenderingContext2D.cpp, line 2941
Assignee: nobody → matspal
Attachment #523873 - Flags: review?(jfkthame)
Blocks: 637245
The assertion is bug 637245, which will be fixed by the patch.
Shouldn't there be a valid default for the font? (10px sans-serif, iirc.) It seems to me like this patch just papers over the problem so that we don't assert or crash, but doesn't actually fix the underlying issue, which is that we apparently don't know how to set up the font without a presshell. We should be fixing that problem, not sweeping it under the carpet, no?
Attached patch fix v2Splinter Review
Try harder to set up a default font.
Attachment #523873 - Attachment is obsolete: true
Attachment #523873 - Flags: review?(jfkthame)
Attachment #523909 - Flags: review?(jfkthame)
Whiteboard: [needs review]
Comment on attachment 523909 [details] [diff] [review]
fix v2

Looks good to me, thanks.
Attachment #523909 - Flags: review?(jfkthame) → review+
Whiteboard: [needs review]
Fixed in Cedar:
http://hg.mozilla.org/projects/cedar/rev/5384e63ae39e
blocking2.0: --- → ?
Flags: in-testsuite+
Whiteboard: [sg:dos] fixed-in-cedar
http://hg.mozilla.org/mozilla-central/rev/5384e63ae39e
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [sg:dos] fixed-in-cedar → [sg:dos]
Target Milestone: --- → mozilla2.2
We will not be taking this for Macaw. If you disagree, please renominate or
send an email to release-drivers@mozilla.org with additional reasoning.
blocking2.0: ? → -
blocking1.9.2: --- → -
Crash Signature: [@ TextRunWordCache::MakeTextRun]
You need to log in before you can comment on or make changes to this bug.