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

RESOLVED FIXED in Firefox 5

Status

()

Core
Canvas: 2D
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Jesse Ruderman, Assigned: mats)

Tracking

(Blocks: 1 bug, {crash, testcase})

Trunk
mozilla5
crash, testcase
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox5 fixed, blocking2.0 -, blocking1.9.2 -)

Details

(Whiteboard: [sg:dos], crash signature)

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

7 years ago
Created attachment 523817 [details]
testcase (crashes Firefox when loaded)

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

Crash [@ TextRunWordCache::MakeTextRun]
(Reporter)

Comment 1

7 years ago
Created attachment 523818 [details]
stack traces
(Assignee)

Updated

7 years ago
OS: Mac OS X → All
Hardware: x86 → All
Summary: Crash [@ TextRunWordCache::MakeTextRun] with canvas mozDrawText → Crash [@ TextRunWordCache::MakeTextRun] with canvas mozDrawText, mozPathText, mozTextAlongPath
(Assignee)

Comment 2

7 years ago
Created attachment 523873 [details] [diff] [review]
fix

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)
(Assignee)

Updated

7 years ago
Blocks: 637245
(Assignee)

Comment 3

7 years ago
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?
(Assignee)

Comment 5

7 years ago
Created attachment 523909 [details] [diff] [review]
fix v2

Try harder to set up a default font.
Attachment #523873 - Attachment is obsolete: true
Attachment #523873 - Flags: review?(jfkthame)
Attachment #523909 - Flags: review?(jfkthame)
(Assignee)

Updated

7 years ago
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]
(Assignee)

Comment 7

7 years ago
Fixed in Cedar:
http://hg.mozilla.org/projects/cedar/rev/5384e63ae39e
blocking2.0: --- → ?
Flags: in-testsuite+
Whiteboard: [sg:dos] fixed-in-cedar

Comment 8

7 years ago
http://hg.mozilla.org/mozilla-central/rev/5384e63ae39e
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [sg:dos] fixed-in-cedar → [sg:dos]
Target Milestone: --- → mozilla2.2

Comment 9

7 years ago
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: ? → -
status-firefox5: --- → fixed
blocking1.9.2: --- → -
Crash Signature: [@ TextRunWordCache::MakeTextRun]
You need to log in before you can comment on or make changes to this bug.