← Back to team overview

kicad-developers team mailing list archive

Re: Warning regarding global wxStrings and thread-safety

 

On 02/08/18 19:01, Jeff Young wrote:
> I finally caught a long-standing but very infrequent crash in the
> debugger.  It’s somewhat harrowing.
> 
> wxString keeps multiple iterators on a string up-to-date with regard to
> editing.  It keeps them in a linked list.  If you reference a global
> string in a thread (/*even*/ in a const manner, such as taking its
> length), wxString will create an interator in your thread, link it into
> the list, and then unlink it when done (with no thread safety).  Sooner
> or later, this */will/* crash.

Hi Jeff,

I've been aware of this bug for quite a while (it manifested itself
during the development of multithreaded zone filler). I should have sent
a warning to the dev list, sorry for not doing that.

Cheers,
Tom


References