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

Aahz aahz at pythoncraft.com
Sun Feb 7 15:30:04 CET 2010


On Sun, Feb 07, 2010, Ronald Oussoren wrote:
> 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.

Not yet, I was hoping someone else could confirm the bug before filing.
If you think I should go ahead and file it, I will.  Do you know of any
other way to get the info that gestalt provides?  Are you saying that if
I called mac_ver() in the startup process it should work?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

import antigravity


More information about the Pythonmac-SIG mailing list