Opened 2 years ago

Closed 2 years ago

#17840 closed bug (fixed)

WebPositive (master): WebKit font cache crash on quit

Reported by: vidrep Owned by: pulkomandy
Priority: normal Milestone: R1/beta4
Component: Kits/Web Kit Version: R1/beta3
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

HaikuWebKit 1.8.4 WebKit 614.1.20

Attachments (1)

WebPositive-9790-debug-19-07-2022-22-19-43.report (23.2 KB ) - added by vidrep 2 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 by vidrep, 2 years ago

Summary: WebPositive (master): WebKit font cache crashWebPositive (master): WebKit font cache crash on quit

comment:2 by pulkomandy, 2 years ago

Still happening.

The sequence of events appears to be:

  • Thread global data is destroyed at exit
  • As a result, the font cache (owned by the thread global data) is also destroyed
  • This releases the last reference to the CSS font cache, which is then also destroyed
  • The CSS font cache destructor tries to unregister itself from the font cache. It knows that the font cache might already be destroyed, so it uses threadGlobalData().fontCacheIfNotDestroyed() to access it
  • However, the thread global data is already being destroyed at this point, so threadGlobalData cannot access it anymore. And so the call to threadGlobalData() attempts to re-create it.
  • This is not allowed and we get an assert.

I am not sure how this does not happen in other platforms and I don't know which part of this cycle needs to be broken to avoid this sequence of events.

comment:3 by pulkomandy, 2 years ago

Milestone: UnscheduledR1/beta4

comment:4 by pulkomandy, 2 years ago

Resolution: fixed
Status: newclosed

Fixed in https://github.com/haiku/haikuwebkit/commit/5b4b2b350fa7e811a857a95b60549ea237983792. Will be part of the next HaikuWebKit release.

Note: See TracTickets for help on using tickets.