gnucash maint: Bug 798702 - Crash in gnc_plugin_page_focus_idle_destroy() closing...

John Ralls jralls at code.gnucash.org
Wed Jan 4 21:21:53 EST 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/edf5a878 (commit)
	from  https://github.com/Gnucash/gnucash/commit/1085d892 (commit)



commit edf5a8783d22466dca32c158683195f207eaf4cf
Author: John Ralls <jralls at ceridwen.us>
Date:   Wed Jan 4 18:16:23 2023 -0800

    Bug 798702 - Crash in gnc_plugin_page_focus_idle_destroy() closing...
    
    a report before it completes.
    
    The problem was that the progress bar runs the event loop and lets
    tab get destroyed while the stream handler is running, taking the
    page and html objects along with it. Then the stream handler returns
    and the callers try to use the freed page and html objects. Crash.
    
    To avoid this take out weak pointers on the page and html and only
    use the page and html if the respective finalize functions haven't
    NULLed the weak pointer.



Summary of changes:
 gnucash/gnome/gnc-plugin-page-report.c |  8 +++-
 gnucash/html/gnc-html-webkit1.c        | 79 +++++++++++++++++++++-------------
 gnucash/html/gnc-html-webkit2.c        | 39 +++++++++++++----
 3 files changed, 86 insertions(+), 40 deletions(-)



More information about the gnucash-patches mailing list