• Andrea Azzarone's avatar
    metadata-manager: Remove singleton · 541966f3
    Andrea Azzarone authored
    GeditDocument may attempt to use GeditMetadataManager after GeditApplication has
    already called gedit_data_manager_shutdown. This happens because right now
    _gedit_tab_load is not cancelled when the tab is closed, but it's only cancelled
    if the user dismisses the loading operation from the infobar.
    
    Also cancelling _gedit_tab_load is not enough because GtkSourceFileLoader
    increases the reference count of the source buffer (in the case the
    GeditDocument) until the async operation is completed or cancelled, hence
    GeditDocument will attempt to use GeditMetadataManager in gedit_document_dispose
    after GeditApplication has already called gedit_data_manager_shutdown.
    
    To properly solve this - and avoid similar issues - make GeditMetadataManager
    reference countable and keep an hard reference in each GeditDocument and in the
    GeditApp.
    
    Closes: #145
    541966f3
Name
Last commit
Last update
build-aux Loading commit data...
data Loading commit data...
docs Loading commit data...
gedit Loading commit data...
help Loading commit data...
osx Loading commit data...
plugins Loading commit data...
po Loading commit data...
snap Loading commit data...
subprojects Loading commit data...
tools Loading commit data...
win32 Loading commit data...
.gitlab-ci.yml Loading commit data...
.gitmodules Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
HACKING Loading commit data...
MAINTAINERS Loading commit data...
NEWS Loading commit data...
README.md Loading commit data...
gedit.doap Loading commit data...
logo.png Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...