Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

wxMac threading crash issues

(1/2) > >>

afb:
"[ 1901956 ] wxMac: TECConvertText not thread safe"


--- Quote ---It seems that the mac carbon function TECConvertText is not thread safe.
This causes problems in applications that use say wxFileExists() and
friends in separate threads. Applications that make calls to
TECConvertText in separate threads crash randomly sooner or later.

--- End quote ---

^ the above would be Code::Blocks

afb:
I have applied the suggested patch to my wxWidgets (libwx_macu_gl-2.8.0.4.0.dylib), so it will go out with the next nightly. It seems to fix the threading issues / application crashes, at least I can't provoke it the same way now.

thomas:
Ah darn, I had just written a Mac-stupefier for those functions in Code::Blocks... but well, it's probably nicer if you just use a patched wxMac and that crap that stays out of our sources. :)

afb:

--- Quote from: thomas on March 17, 2008, 09:59:35 am ---Ah darn, I had just written a Mac-stupefier for those functions in Code::Blocks... but well, it's probably nicer if you just use a patched wxMac and that crap that stays out of our sources. :)

--- End quote ---

Taking a wxMutex on all file access ? Or did you do something that the patch won't fix ?

thomas:

--- Quote ---Taking a wxMutex on all file access ? Or did you do something that the patch won't fix ?
--- End quote ---
No, just that... a self-locking wrapper for the two problematic functions.

But it's of course preferrable to have it patched into wxMac. Not only does it not pollute the Code::Blocks sources that way, but it also requires less changes and fixes yet unknown issues with future contrib plugins (whose authors might not know).

Navigation

[0] Message Index

[#] Next page

Go to full version