wxPython on Mac crashes

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?

Thank you very much in advance to help solving that problem!

···

--

Franz Steinhaeusler

Hi Franz,

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. :slight_smile:

Regards,

Kevin

···

On May 23, 2007, at 2:19 AM, Franz Steinhaeusler wrote:

Thank you very much in advance to help solving that problem!

--

Franz Steinhaeusler

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hi Franz,

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. :slight_smile:

Regards,

Hello Kevin, thank you very much (and also Robin) for answering in the forum!! :slight_smile:

···

On Wed, 23 May 2007 09:11:52 -0700, Kevin Ollivier <kevino@theolliviers.com> wrote:

On May 23, 2007, at 2:19 AM, Franz Steinhaeusler wrote:

Kevin

--
Franz Steinhaeusler

Kevin Ollivier wrote:

Hi Franz,

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. :slight_smile:

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.

···

On May 23, 2007, at 2:19 AM, Franz Steinhaeusler wrote:

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

Hello,

First thanks to all for the swift replys.

Having upgraded both Python and wxPython to the latest versions,
now drPython runs, but unfortunately only half.... which is
better than nothing I agree.

The problem is that it refuses to run any program,
claiming in its shell that execvp, which is a python function,
failed with error 2.
No matter what the program I want to run is, it is the only answer.

Example of shell:
Applications/MacPython 2.5/IDLE.app/Contents/MacOS/Python
-u "/Volumes/Macintosh HD/Users/ag/Desktop/COMPTAS/ECV/nbtest.py"
execvp(/Applications/MacPython, 2.5/IDLE.app/Contents/MacOS/Python, -u,
/Volumes/Macintosh HD/Users/ag/Desktop/COMPTAS/ECV
/nbtest.py) failed with error 2!

If you have good ideas to solve this...
Thank you in advance
Dominique

Dominique wrote:

Hello,

First thanks to all for the swift replys.

Having upgraded both Python and wxPython to the latest versions, now drPython runs, but unfortunately only half.... which is better than nothing I agree.

The problem is that it refuses to run any program, claiming in its shell that execvp, which is a python function, failed with error 2.
No matter what the program I want to run is, it is the only answer.

Example of shell:
Applications/MacPython 2.5/IDLE.app/Contents/MacOS/Python -u "/Volumes/Macintosh HD/Users/ag/Desktop/COMPTAS/ECV/nbtest.py" execvp(/Applications/MacPython, 2.5/IDLE.app/Contents/MacOS/Python, -u,
/Volumes/Macintosh HD/Users/ag/Desktop/COMPTAS/ECV
/nbtest.py) failed with error 2!

If you have good ideas to solve this...

First, why are you using the Python in the IDLE.app bundle? Second, since the pathname of the executable has a space in it then you probably need to enclose it in quotes too.

···

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

Robin Dunn <robin <at> alldunn.com> writes:

First, why are you using the Python in the IDLE.app bundle? Second,
since the pathname of the executable has a space in it then you probably
need to enclose it in quotes too.

Hello,
Thanks Robin for answering.

1) I agree with you. But when I double click on the file drpython.pyw, this
leads me directly not to drPython (just like on my pc) but to the python file
drpython.pyw, which I have to launch with the Menu Run / run Module.
Am I doing something wrong. Do I have to put some preferences in python ? Which
ones ? where ?

2)Now that I installed the latest versions of python and wxpython, another
program that was previously running without problems now has a problem: the
scrollbars on the grid (in a notebook) don't appear anymore...

Thanks for giving me some tips... and for your time
Dominique

Dominique wrote:

Robin Dunn <robin <at> alldunn.com> writes:

First, why are you using the Python in the IDLE.app bundle? Second, since the pathname of the executable has a space in it then you probably need to enclose it in quotes too.

Hello,
Thanks Robin for answering.

1) I agree with you. But when I double click on the file drpython.pyw, this
leads me directly not to drPython (just like on my pc) but to the python file
drpython.pyw, which I have to launch with the Menu Run / run Module.
Am I doing something wrong. Do I have to put some preferences in python ? Which
ones ? where ?

Ah, I see. You can make the PythonLauncher tool be the one associated with .pyw files, then the Mac will know assume that they are PythonLauncher documents and will use it to 'Open' them.

2)Now that I installed the latest versions of python and wxpython, another
program that was previously running without problems now has a problem: the
scrollbars on the grid (in a notebook) don't appear anymore...

Which versions? Sample app?

···

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

Dominique wrote:

1) I agree with you. But when I double click on the file drpython.pyw, this
leads me directly not to drPython (just like on my pc) but to the python file
drpython.pyw, which I have to launch with the Menu Run / run Module.
Am I doing something wrong. Do I have to put some preferences in python ? Which
ones ? where ?

Ah, I see. You can make the PythonLauncher tool be the one associated with .pyw files, then the Mac will know assume that they are PythonLauncher documents and will use it to 'Open' them.

Thanks for the tip Robin.
OK. Done. I reinstalled again everything and now, drpython works fine without problems (except the fonts which causes the terminal to display 10 or 20 times every second the font problem). I'll take care of this later.
Additionally, the file explorer for mac does not display all files and directories, which appear with the drpython file browser. For instance, impossible to see the .drpython directory in the preferences with the mac explorer. Certain directories just don't appear... For someone coming from windows, it is surprising.

2)Now that I installed the latest versions of python and wxpython, another
program that was previously running without problems now has a problem: the
scrollbars on the grid (in a notebook) don't appear anymore...

Which versions? Sample app?

python 2.5.1 and wxpython 2.8.4.0
I wonder if it is not a size problem with the panels/grid/frames/... with the mac. I resized the number of columns of the grid and it displayed the vertical scrollbar. Not the horizontal ones.
On my pc, no problem. I'll tell you more later

Thanks so much for helping
Dominique

Dominique wrote:

Additionally, the file explorer for mac does not display all files and directories, which appear with the drpython file browser. For instance, impossible to see the .drpython directory in the preferences with the mac explorer. Certain directories just don't appear... For someone coming from windows, it is surprising.

Yes, but very Mac-like. THE file browser behaves the same as the Finder, which does not, by default, show you "hidden" files. Files can be hidden for number of reasons, and having a .* name is one of them.

You can change this preference, but not through any GUI tool Apples gives you. I use "TinkerTool" myself.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Christopher Barker <Chris.Barker <at> noaa.gov> writes:

Dominique wrote:
> Additionally, the file explorer for mac does not display all files and
> directories, which appear with the drpython file browser. For instance,
> impossible to see the .drpython directory in the preferences with the
> mac explorer. Certain directories just don't appear... For someone
> coming from windows, it is surprising.

Yes, but very Mac-like. THE file browser behaves the same as the Finder,
which does not, by default, show you "hidden" files. Files can be hidden
for number of reasons, and having a .* name is one of them.

You can change this preference, but not through any GUI tool Apples
gives you. I use "TinkerTool" myself.

-Chris

Thanks a lot Chris. Now drpython works fine on my mac.
In case some others face the same kind of problems, I put an explanation of what
should be done (in my case at least) to have this nice app work on a mac
(specially for people like me who come from Windows and do not know mac a lot).
Here it is:
https://sourceforge.net/forum/forum.php?thread_id=1740090&forum_id=283803

Again thanks to all
Dominique