[Pythonmac-SIG] Weird Carbon: gestalt: wxPython issue/bug

Ronald Oussoren ronaldoussoren at mac.com
Sun Feb 7 11:30:15 CET 2010


On 4 Feb, 2010, at 18:59, Aahz wrote:

> On Thu, Feb 04, 2010, Christopher Barker wrote:
>> 
>> Peter Hanson, on the wxPython list, seems to have identified a bug in  
>> the gestalt module, that may be a Carbon issue. It's a bit of an unusual  
>> case: it freezes up wxPython, when wx is called from other than the main  
>> thread. Robin Dunn suspects that it's a Carbon issue -- gestalt is  
>> calling Carbon, and doing so in the main thread, so you are then trying  
>> to call Carbon from more than one thread, which may be the cause of the  
>> problem. I've confirmed that if you call gestalt from the same thread as  
>> wxPython, there is no failure.
> 
> I've already complained that mac_ver() causes a crash with
> USING_FORK_WITHOUT_EXEC_IS_NOT_SUPPORTED_BY_FILE_MANAGER
> but I'm pretty sure we're not using wx on Mac, just Windows (we're using
> AppHelper).

Have you filed a bug about that?  Not that doing that in the python.org tracker would result result in a satisfying resolution: mac_ver calls OSX APIs that don't work in child processes created with fork (but without exec) and that cannot be changed. This was safe in 10.5 and earlier as well,  10.6 is the first version that loudly complains that you do something unsafe. 

Ronald

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3567 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20100207/238e2c7f/attachment.bin>


More information about the Pythonmac-SIG mailing list