Closed Bug 647480 Opened 10 years ago Closed 10 years ago
Crash [@ Text
Run Word Cache::Make Text Run] with canvas moz Draw Text, moz Path Text, moz Text Along Path
###!!! ASSERTION: Default canvas font is invalid: 'res == NS_OK', file content/canvas/src/nsCanvasRenderingContext2D.cpp, line 2941 (like in bug 637245) Crash [@ TextRunWordCache::MakeTextRun]
OS: Mac OS X → All
Hardware: x86 → All
Summary: Crash [@ TextRunWordCache::MakeTextRun] with canvas mozDrawText → Crash [@ TextRunWordCache::MakeTextRun] with canvas mozDrawText, mozPathText, mozTextAlongPath
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)
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?
Try harder to set up a default font.
Comment on attachment 523909 [details] [diff] [review] fix v2 Looks good to me, thanks.
Attachment #523909 - Flags: review?(jfkthame) → review+
Fixed in Cedar: http://hg.mozilla.org/projects/cedar/rev/5384e63ae39e
blocking2.0: --- → ?
Whiteboard: [sg:dos] fixed-in-cedar
Status: NEW → RESOLVED
Closed: 10 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 email@example.com with additional reasoning.
blocking2.0: ? → -
Crash Signature: [@ TextRunWordCache::MakeTextRun]
You need to log in before you can comment on or make changes to this bug.