Python crashing when loading wxPython on Lion

Hi all,

I just recently got a Lion laptop, and while setting up my wxPython development environment, I’ve found that everytime I do the equivalent of:

python -c ‘import wx’

python itself crashes. Here is a snippet of the crash log. Any idea on what is going on here?

Process: Python-32 [58694]

Path: /Users/USER/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python-32

Identifier: Python-32

Version: ??? (???)

Code Type: X86 (Native)

Parent Process: bash [11094]

Date/Time: 2012-04-30 19:00:52.067 -0700

OS Version: Mac OS X 10.7.3 (11D50b)

Report Version: 9

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BREAKPOINT (SIGTRAP)

Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:

/Users/rishisharma/Library/Frameworks/wx/libwx_osx_cocoau-2.9.3.0.0.dylib

objc[58694]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0 com.apple.CoreFoundation 0x9aa36ac6 CFRetain + 22

1 libwx_osx_cocoau-2.9.3.0.0.dylib 0x01027b8a wxStandardPathsCF::wxStandardPathsCF() + 106

2 libwx_osx_cocoau-2.9.3.0.0.dylib 0x0102d086 __static_initialization_and_destruction_0(int, int) + 54

3 dyld 0x8feb0203 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 251

4 dyld 0x8feafd68 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 64

5 dyld 0x8fead2c8 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 256

6 dyld 0x8fead25e ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 150

7 dyld 0x8feae268 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 62

8 dyld 0x8fea231d dyld::runInitializers(ImageLoader*) + 91

9 dyld 0x8fea917b dlopen + 585

10 libdyld.dylib 0x97f66a95 dlopen + 70

11 org.python.python 0x000c6520 _PyImport_GetDynLoadFunc + 336

Hi Rish,

Hi all,

I just recently got a Lion laptop, and while setting up my wxPython development environment, I’ve found that everytime I do the equivalent of:

python -c ‘import wx’

python itself crashes. Here is a snippet of the crash log. Any idea on what is going on here?

I’m not quite sure what’s going on, but if you’re using the wxPython builds off of wxpython.org, 2.6 + Cocoa is not a valid combination. The Cocoa builds are for 2.7 only. If you’re building your own, or using another build, we’d probably need more information to get a better idea what’s going on.

Regards,

Kevin

···

On Apr 30, 2012, at 7:03 PM, Rish wrote:

Process: Python-32 [58694]

Path: /Users/USER/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python-32

Identifier: Python-32

Version: ??? (???)

Code Type: X86 (Native)

Parent Process: bash [11094]

Date/Time: 2012-04-30 19:00:52.067 -0700

OS Version: Mac OS X 10.7.3 (11D50b)

Report Version: 9

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BREAKPOINT (SIGTRAP)

Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:

/Users/rishisharma/Library/Frameworks/wx/libwx_osx_cocoau-2.9.3.0.0.dylib

objc[58694]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

0 com.apple.CoreFoundation 0x9aa36ac6 CFRetain + 22

1 libwx_osx_cocoau-2.9.3.0.0.dylib 0x01027b8a wxStandardPathsCF::wxStandardPathsCF() + 106

2 libwx_osx_cocoau-2.9.3.0.0.dylib 0x0102d086 __static_initialization_and_destruction_0(int, int) + 54

3 dyld 0x8feb0203 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 251

4 dyld 0x8feafd68 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 64

5 dyld 0x8fead2c8 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 256

6 dyld 0x8fead25e ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 150

7 dyld 0x8feae268 ImageLoader::runInitializers(ImageLoader::LinkContext const&, ImageLoader::InitializerTimingList&) + 62

8 dyld 0x8fea231d dyld::runInitializers(ImageLoader*) + 91

9 dyld 0x8fea917b dlopen + 585

10 libdyld.dylib 0x97f66a95 dlopen + 70

11 org.python.python 0x000c6520 _PyImport_GetDynLoadFunc + 336

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

It happens with python 2.7 as well:

rocess: Python [28607]
Path:
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [28524]

PlugIn Path:
/Users/USER/Library/Frameworks/wx/libwx_osx_cocoau-2.9.3.0.0.dylib
PlugIn Identifier: libwx_osx_cocoau-2.9.3.0.0.dylib
PlugIn Version: ??? (???)

Date/Time: 2012-05-01 10:02:58.901 -0700
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
/Users/rishisharma/Library/Frameworks/wx/libwx_osx_cocoau-2.9.3.0.0.dylib
objc[28607]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fff92556a52 CFRetain + 18
1 libwx_osx_cocoau-2.9.3.0.0.dylib 0x0000000105594101
wxStandardPathsCF::wxStandardPathsCF() + 113
2 libwx_osx_cocoau-2.9.3.0.0.dylib 0x00000001055998f4
__static_initialization_and_destruction_0(int, int) + 36
3 dyld 0x00007fff63ba4da6
ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&)
+ 218
4 dyld 0x00007fff63ba4af2
ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) +
46
5 dyld 0x00007fff63ba22e4
ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) + 260
6 dyld 0x00007fff63ba227d
ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) + 157
7 dyld 0x00007fff63ba30b7
ImageLoader::runInitializers(ImageLoader::LinkContext const&,
ImageLoader::InitializerTimingList&) + 59
8 dyld 0x00007fff63b981b9
dyld::runInitializers(ImageLoader*) + 97
9 dyld 0x00007fff63b9e657 dlopen + 540
10 libdyld.dylib 0x00007fff8bd9095b dlopen + 57

···

On Mon, Apr 30, 2012 at 9:01 PM, Kevin Ollivier <kevin-lists@theolliviers.com> wrote:

Hi Rish,

On Apr 30, 2012, at 7:03 PM, Rish wrote:

Hi all,

I just recently got a Lion laptop, and while setting up my wxPython
development environment, I've found that everytime I do the equivalent of:

python -c 'import wx'

python itself crashes. Here is a snippet of the crash log. Any idea on what
is going on here?

I'm not quite sure what's going on, but if you're using the wxPython builds
off of wxpython.org, 2.6 + Cocoa is not a valid combination. The Cocoa
builds are for 2.7 only. If you're building your own, or using another
build, we'd probably need more information to get a better idea what's going
on.

Regards,

Kevin

Process: Python-32 [58694]
Path:
/Users/USER/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python-32
Identifier: Python-32
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: bash [11094]

Date/Time: 2012-04-30 19:00:52.067 -0700
OS Version: Mac OS X 10.7.3 (11D50b)
Report Version: 9

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000

Application Specific Information:
/Users/rishisharma/Library/Frameworks/wx/libwx_osx_cocoau-2.9.3.0.0.dylib
objc[58694]: garbage collection is OFF

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x9aa36ac6 CFRetain + 22
1 libwx_osx_cocoau-2.9.3.0.0.dylib 0x01027b8a
wxStandardPathsCF::wxStandardPathsCF() + 106
2 libwx_osx_cocoau-2.9.3.0.0.dylib 0x0102d086
__static_initialization_and_destruction_0(int, int) + 54
3 dyld 0x8feb0203
ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 251
4 dyld 0x8feafd68
ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 64
5 dyld 0x8fead2c8
ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) + 256
6 dyld 0x8fead25e
ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&,
unsigned int, ImageLoader::InitializerTimingList&) + 150
7 dyld 0x8feae268
ImageLoader::runInitializers(ImageLoader::LinkContext const&,
ImageLoader::InitializerTimingList&) + 62
8 dyld 0x8fea231d
dyld::runInitializers(ImageLoader*) + 91
9 dyld 0x8fea917b dlopen + 585
10 libdyld.dylib 0x97f66a95 dlopen + 70
11 org.python.python 0x000c6520 _PyImport_GetDynLoadFunc + 336

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Please try with the Python 2.7 from Python.org instead of Apple's Python. (They can both be installed without affecting each other.)

···

On 5/1/12 10:04 AM, Rishi Sharma wrote:

It happens with python 2.7 as well:

rocess: Python [28607]
Path:
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [28524]

--
Robin Dunn
Software Craftsman

For anyone interested, this was due to my python instance defaulting
to 64 bit. Once I found that out, it works great with the 32 bit
version.

-R

···

On Tue, May 1, 2012 at 10:44 AM, Robin Dunn <robin@alldunn.com> wrote:

On 5/1/12 10:04 AM, Rishi Sharma wrote:

It happens with python 2.7 as well:

rocess: Python [28607]
Path:

/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: bash [28524]

Please try with the Python 2.7 from Python.org instead of Apple's Python.
(They can both be installed without affecting each other.)

--
Robin Dunn
Software Craftsman
http://wxPython.org

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en