Bug 44384

Summary: [Qt] Crash when purging the scratch buffer for the shadow
Product: WebKit Reporter: Ariya Hidayat <ariya.hidayat>
Component: Layout and RenderingAssignee: Ariya Hidayat <ariya.hidayat>
Severity: Normal CC: hausmann, kling
Priority: P2 Keywords: Qt, QtTriaged
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
Patch kenneth: review+

Description Ariya Hidayat 2010-08-21 15:21:13 PDT
The purge timer might stop or fire after the application is destroyed, and thus causes a crash.
Comment 1 Ariya Hidayat 2010-08-21 16:11:29 PDT
Created attachment 65036 [details]
Comment 2 Ariya Hidayat 2010-08-21 17:04:33 PDT
Comment on attachment 65036 [details]

Andreas kindly suggested on IRC that the problem is solved easier by making ShadowBuffer a child of QCoreApplication::instance().

This leads me into thinking, maybe we should fix our shared timer instead so that application destruction stops and closes pending timers.

Clearing the review flag while thinking about this.
Comment 3 Ariya Hidayat 2010-08-22 21:20:37 PDT
Apparently the problem is because TimerBase/Timer relies on thread global data, which is gone already after the application instance is destroyed. Thus, any static object can't use TimerBase/Timer with a risk of crashing.
Comment 4 Ariya Hidayat 2010-08-22 21:41:56 PDT
Created attachment 65073 [details]
Comment 5 Andreas Kling 2010-08-22 21:45:50 PDT
Comment on attachment 65073 [details]

LGTM, feels like the best approach to this problem.
Comment 6 Kenneth Rohde Christiansen 2010-08-23 00:26:01 PDT
Comment on attachment 65073 [details]

Oh that is a bit sad...
Comment 7 Ariya Hidayat 2010-08-23 01:16:21 PDT
Committed r65795: <http://trac.webkit.org/changeset/65795>