[wxPython-users] wxPython on Mac crashes

Robin Dunn robin at alldunn.com
Wed May 23 14:41:23 PDT 2007


Kevin Ollivier wrote:
> Hi Franz,
> 
> On May 23, 2007, at 2:19 AM, Franz Steinhaeusler wrote:
> 
>> Hello, a user in the drpython-help forum reported a bug.
>>
>> http://sourceforge.net/forum/forum.php?thread_id=1740090&forum_id=283803
>>
>> Starting up, python opens the drpython menubar and then crashes.
>>
>> - Mac OS X 10.4.8 with PPC G5 1,8Ghz,
>> - Python 2.5
>> - wxpython 2.8.3.0 MAC Unicode py 2.5
>>
>> Thread 0 Crashed:
>> 0 libwx_macud-2.8.0.dylib 0x02738ab8 wxFontRefData::MacFindFont() + 
>> 744 (icplusplus.c:28)
>> 1 libwx_macud-2.8.0.dylib 0x02738e14 wxFont::RealizeResource() + 20 
>> (icplusplus.c:28)
>> 2 libwx_macud-2.8.0.dylib 0x0273a0f0 wxFont::SetFaceName(wxString 
>> const&) + 64 (icplusplus.c:28)
>> 3 _gdi_.so 0x031c6e50 _wrap_Font_SetFaceName + 608 (_gdi_wrap.cpp:14931)
>> etc ..................
>>
>>
>> Any ideas?
> 
> Thanks, I went ahead and posted to that forum topic with some 
> suggestions. I have a feeling that upgrading to the latest versions will 
> at least remove the crash. I think there are still issues with DrPython 
> trying to pick non-existent fonts but I posted more info about that on 
> the board. :-)

Just for completeness of this archive, here is Kevin's response and also 
mine:

       RE: Mac OSX Installation
       By: Kevin Ollivier (kollivier) - 2007-05-23 09:06
       Hi,

       The first thing I'd recommend you try is upgrading both your 
Python and wxPython releases. I don't have Python 2.5 myself, but I 
noticed it says "alpha" in the Python version number, so I suspect that 
was one of the initial Python 2.5 releases for Mac.

       On wxPython 2.8.4.0 on Python 2.4, when I run DrPython I don't 
get any errors, but I do get a bunch of debug warnings because DrPython 
is trying to set the font to faces/configurations that don't exist on 
the OS X system I'm running it on. The offending font names seem to be 
"Courier 10 Pitch", "Sans" and "Sans Serif". Also, the latter two seem 
very odd to me as those aren't really face names, they're font families 
- specifically, the wxFONTFAMILY_ROMAN and wxFONTFAMILY_SWISS families.

       Anyway, please let me know if it is still crashing for you with 
wxPython 2.8.4.0 and the latest Python 2.5. If so, I'll make a note of 
it on the wxPython lists and hopefully someone setup for 2.5 can take a 
look at it.

       Thanks,

       Kevin


       RE: Mac OSX Installation
       By: Robin Dunn (robind) - 2007-05-23 11:59
       "Sans" and "Sans Serif" are typical aliases that are used on 
Linux systems, and the user can have whatever are their favorite fonts 
aliased to these names. They are not real font face names, but this is a 
common trap that Linux programmers fall into. IMO the best thing to do 
for any wx app to do is to default only to font families and not hard 
code any face names at all if possible. Then let the user choose which 
fonts to use and save those face names in a config file. Even then it's 
still a good idea to verify the names saved in the config file with the 
wx.FontEnumerator.




-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list