Free stock patterns before FontFactory destructor
Applying a pattern fill to object would cause Inkscape to crash on exit due to stock pattern documents destruction after FontFactory
. This MR adds them to a list of Statics
lifetime of which is controlled.
There's no explicit instantiation, but it happens after FontFactory
creation, so reverse order destruction works as it should now in predictable manner.
Merge request reports
Activity
- Resolved by PBS
Have I got the logic correct:
Documents
manages documents so requiresFontFactory
to exist. But sinceFontFactory
needs special early destruction viaInkscape::Static
, this 'infects'Documents
and requires it to be managed viaInkscape::Static
too.If that's the case, it would be good to register the dependency of
Documents
onFontFactory
explicitly by inserting a call toFontFactory::get()
just before the linestatic auto factory = Inkscape::Util::Static<Documents>();
Is there a similar dependency of
PatternManager
onDocuments
?Sadly I can't seem to get this crash to happen, so I haven't tested any of this.
Edited by PBS
added 1 commit
- 73af0c71 - Free stock patterns before FontFactory destructor
added 24 commits
-
73af0c71...f862e6e8 - 23 commits from branch
inkscape:master
- 3577b05e - Free stock patterns before FontFactory destructor
-
73af0c71...f862e6e8 - 23 commits from branch
enabled an automatic merge when the pipeline for aa5537a9 succeeds
added 3 commits
-
3577b05e...5f372a72 - 2 commits from branch
inkscape:master
- aa0fcfb0 - Free stock patterns before FontFactory destructor
-
3577b05e...5f372a72 - 2 commits from branch
added 5 commits
-
aa0fcfb0...695e68d6 - 4 commits from branch
inkscape:master
- 4648735e - Free stock patterns before FontFactory destructor
-
aa0fcfb0...695e68d6 - 4 commits from branch
enabled an automatic merge when the pipeline for d1757d65 succeeds
mentioned in merge request !6360 (merged)