Bug 58229 - Assertion failure in CanvasRenderingContext2D::State::fontsNeedUpdate when invalidating the font cache after opening canvas/philip/tests/initial.reset.2dstate.html (occurs on Qt debug test bot)
Summary: Assertion failure in CanvasRenderingContext2D::State::fontsNeedUpdate when in...
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P1 Critical
Assignee: Nobody
Depends on:
Reported: 2011-04-11 06:15 PDT by Csaba Osztrogonác
Modified: 2011-04-11 10:46 PDT (History)
2 users (show)

See Also:

$ cat crash.log | c++filt (3.65 KB, text/plain)
2011-04-11 06:15 PDT, Csaba Osztrogonác
no flags Details
Patch (4.13 KB, patch)
2011-04-11 10:32 PDT, mitz
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Csaba Osztrogonác 2011-04-11 06:15:33 PDT
Created attachment 88998 [details]
$ cat crash.log | c++filt

It doesn't crash in itself, but we can easily reproduce the crash:
$ Tools/Scripts/run-webkit-tests --debug canvas/philip/tests/initial.reset.2dstate.html canvas/philip/tests/initial.reset.clip.html
Comment 1 Csaba Osztrogonác 2011-04-11 06:16:32 PDT
This crash caused or revealed by http://trac.webkit.org/changeset/83396
Comment 2 Csaba Osztrogonác 2011-04-11 06:24:20 PDT
I cc-ed Beth and Dan, the author and the reviewer of r83396.

Could you check it please if it is a regression caused by r83396,
or a Qt specific/platform independent bug revealed by r83396?
Comment 3 mitz 2011-04-11 07:19:56 PDT
This is an assertion failure in code added in r83396.
Comment 4 mitz 2011-04-11 07:37:43 PDT
I can reproduce this on Mac OS X by opening canvas/philip/tests/initial.reset.2dstate.html in Safari, and then using Font Book to disable or enable a font (which invalidates the font cache).
Comment 5 mitz 2011-04-11 10:02:37 PDT
r83396 is wrong in that it uses pointers to State instances, but State is copyable.
Comment 6 mitz 2011-04-11 10:32:09 PDT
Created attachment 89023 [details]
Comment 7 Alexey Proskuryakov 2011-04-11 10:43:04 PDT
Comment on attachment 89023 [details]

Is m_font.fontSelector() never null here?
Comment 8 mitz 2011-04-11 10:44:21 PDT
(In reply to comment #7)
> (From update of attachment 89023 [details])
> Is m_font.fontSelector() never null here?

If m_realizedFont is true, then m_font.fontSelector() should never be null.
Comment 9 mitz 2011-04-11 10:46:19 PDT
Fixed in r83451. <http://trac.webkit.org/changeset/83451>