kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #41562
Re: Fix in LIB_LOGGER to avoid Kicad crash on exit. Need review.
Le 14/07/2019 à 19:28, Jeff Young a écrit :
> Hi JP,
>
> On OSX (at least), when the LIB_LOGGER goes out of scope its
> super-class’s destructor is called, which calls Flush(). So the bug is
> just that the SetActiveTarget( m_previousLogger) is inside the if(
> m_bHasMessages ) block when it shouldn’t be.
>
> That being said, your code is less dependent on the specifics of how
> wxWidgets currently works, so it's more robust. I’m good with it.
>
> Cheers,
> Jeff.
>
OK, Thanks.
FYI, SetActiveTarget( m_previousLogger) cannot be outside the if(
m_bHasMessages ), because, at least on MSW, there are a lot (20 to 30)
of calls to Flush() when starting libedit.
Moving SetActiveTarget() outside the if() was the first thing I tried...
Joy of multi-platform development.
--
Jean-Pierre CHARRAS
References