Re: More on the crash on exit.

From: Martin Sevior <msevior_at_physics.unimelb.edu.au>
Date: Thu Jan 11 2007 - 08:39:27 CET

On Thu, 2007-01-11 at 15:45 +1100, Martin Sevior wrote:
> The crash on exit occurs with current AbiWord-2.5 on linux.
>
> It occurs because UT_ScriptLibrary::~UT_ScriptLibrary is called twice.
>
> This happens because if the are any plugins AT ALL UT_ScriptLibrary is
> loaded as a plugin as well as being constructed via it's static instance
> pointer.
>
> Upon closing AbiWord, all the plugins are unloaded, which deletes the
> script library once. Then the application shuts downs and hence destroys
> the UT_ScriptLibrary again through the static instance pointer and hence
> the crash.
>
> I'm now trying to understand why the library gets loaded as a plugin,
> which is the origin of the bug. However I've been chasing this bug for
> several days so I my not be successful.
>
> If I hope this info will be valuable to someone else if I can;t find the
> cause.
>

OK I fixed this by changing the access via reference to access via
pointer.

UT_ScriptLibrary is constructed in the XAP_App::initialize() method and
UT_ScriptLibrary::instance() returns a pointer to the class.

I've fixed all uses of UT_ScriptLibrary::instance() in the main tree and
plugins.

I no longer get a crash on exit.

Cheers

Martin

> Cheers
>
> Martin
>
>
Received on Thu Jan 11 09:07:11 2007

This archive was generated by hypermail 2.1.8 : Thu Jan 11 2007 - 09:07:12 CET