Red Sweater Forums
It looks like you're new here. If you want to get involved, click one of these buttons!
Why does Python keep crashing
edited September 2010
Python keeps crashing and deleting my blog entries. Thankfully Wordpress has a back up feature you need since Marsedit does'nt.
Hi - can you be a bit more more specific? How is Python crashing, and how is it involved in your blog entries getting deleted? Do you have a crash log or something you can share about the crash? When Python crashes does it take down all of MarsEdit as well, or just Python?
edited September 2010
Just Python crashes. I update my blog and try to send it to Wordpress and Python Crashes. Does'nt happen on a regular basis but it happens.
Process: Python 
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: MarsEdit 
Date/Time: 2010-09-06 18:36:09.230 -0700
OS Version: Mac OS X 10.6.4 (10F569)
Report Version: 6
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000100029f9e
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 ??? 0x0000000100029f9e 0 + 4295139230
1 com.apple.CoreFoundation 0x00007fff8253a18f _CFBundleCopyDirectoryContentsAtPath + 1599
2 com.apple.CoreFoundation 0x00007fff82539821 _CFBundleURLLooksLikeBundleVersion + 65
3 com.apple.CoreFoundation 0x00007fff8253877d _CFBundleCreate + 333
4 com.apple.CoreFoundation 0x00007fff8253367d _CFBundleGetMainBundleAlreadyLocked + 173
5 com.apple.CoreFoundation 0x00007fff82533569 CFBundleGetMainBundle + 105
6 com.apple.CoreFoundation 0x00007fff8253342c cacheBundleInfo + 12
7 com.apple.CoreFoundation 0x00007fff82533410 _CFAppVersionCheckLessThan + 144
8 com.apple.CoreFoundation 0x00007fff8252e0a6 __CFInitialize + 1702
9 dyld 0x00007fff5fc0d5ce ImageLoaderMachO::doImageInit(ImageLoader::LinkContext const&) + 138
10 dyld 0x00007fff5fc0d607 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 27
11 dyld 0x00007fff5fc0bcec ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 236
12 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
13 dyld 0x00007fff5fc0bc9d ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int) + 157
14 dyld 0x00007fff5fc0bda6 ImageLoader::runInitializers(ImageLoader::LinkContext const&) + 58
15 dyld 0x00007fff5fc0210e dyld::initializeMainExecutable() + 133
16 dyld 0x00007fff5fc06981 dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**) + 2993
17 dyld 0x00007fff5fc016d2 dyldbootstrap::start(macho_header const*, int, char const**, long) + 799
18 dyld 0x00007fff5fc01052 _dyld_start + 42
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00007fff70fd2778 rbx: 0x0000000000000042 rcx: 0x00007fff87c9bfd2 rdx: 0x00007fff5fbfa8bc
rdi: 0x000000000000140b rsi: 0x000000010002a030 rbp: 0x00007fff5fbfc250 rsp: 0x00007fff5fbfa8a8
r8: 0x0000000000000001 r9: 0x0000000100206400 r10: 0x00007fff70fd2630 r11: 0x0000000000000202
r12: 0x00007fff5fbfc370 r13: 0x0000000100004008 r14: 0x00007fff70fd25c0 r15: 0x00007fff70539084
rip: 0x0000000100029f9e rfl: 0x0000000000010246 cr2: 0x0000000100029f9e
0x100000000 - 0x100000ff7 org.python.python.app 2.6 (2.6) /System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
0x100035000 - 0x100145ff7 org.python.python 2.6.1 (2.6.1) /System/Library/Frameworks/Python.framework/Versions/2.6/Python
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) /usr/lib/dyld
0x7fff813f5000 - 0x7fff81406ff7 libz.1.dylib 1.2.3 (compatibility 1.0.0) /usr/lib/libz.1.dylib
0x7fff8252c000 - 0x7fff826a1ff7 com.apple.CoreFoundation 6.6.3 (550.29) <48810602-63C3-994D-E563-DD02B16E76E1> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
0x7fff82a4d000 - 0x7fff82a51ff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <95718673-FEEE-B6ED-B127-BCDBDB60D4E5> /usr/lib/system/libmathCommon.A.dylib
0x7fff83eac000 - 0x7fff83ef8fff libauto.dylib ??? (???) <205CE82B-3DE0-4A9D-CEB9-F6A3DDA22ED4> /usr/lib/libauto.dylib
0x7fff83efb000 - 0x7fff83f78fef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <35ECA411-2C08-FD7D-11B1-1B7A04921A5C> /usr/lib/libstdc++.6.dylib
0x7fff8440d000 - 0x7fff845cbfff libicucore.A.dylib 40.0.0 (compatibility 1.0.0) <0E53A4A6-AC06-1B61-2285-248F534EE356> /usr/lib/libicucore.A.dylib
0x7fff85212000 - 0x7fff852c8fff libobjc.A.dylib 227.0.0 (compatibility 1.0.0) /usr/lib/libobjc.A.dylib
0x7fff87c91000 - 0x7fff87e51fef libSystem.B.dylib 125.2.0 (compatibility 1.0.0) <95E02DD0-ADEA-745B-E7FA-ABA064E4658C> /usr/lib/libSystem.B.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) <95E02DD0-ADEA-745B-E7FA-ABA064E4658C> /usr/lib/libSystem.B.dylib
Thank you for the crash log. It confirms that Python is crashing, and that MarsEdit is the parent process. I'll look into this. It's the first time I've seen any such report. Let me know if you think of anything unusual about your setup i.e. if you have a custom Python installed or if you have modified your preview text filter.
When you say your posts are being deleted, do you mean they turn blank in MarsEdit? The posts on the blog shouldn't be deleted because of Python crashing when MarsEdit tries to run it.
It actually looks like Python is crashing before it even gets to the script that MarsEdit is passing it. I'm concerned there might be something corrupted on your system. I'll Google for more clues.
It looks like there are other people who experience similar crashes with other apps besides MarsEdit. The issues all seem to begin on Snow Leopard (10.6). I wonder if it has to do with running Python (and other scripting languages) in 64-bit mode.
I honestly can't say, but yes just before the crash the post goes blank before Python crashes and you can not retrieve it, unless of course you go back to Wordpress to fin a older one.
Have you talked with Apple at all about this?
I haven't talked to Apple because there isn't really an obvious communication channel for this kind of thing. I can bring it up on the Apple Developer Forums though and see if anybody chimes in with helpful advice.
I have a workaround for you, which is to go back to using the older version of the Convert Line Breaks filter, which is written in Perl instead of Python. It's a bit less fancy than the newer Python one, but it hopefully won't crash on you!
1. Download this zip archive:
2. Unzip the archive to get a folder called "Convert Breaks Classic"
3. Copy the whole folder to your home directory, where MarsEdit keeps its text filters:
[Home] -> Library -> Application Support -> MarsEdit -> TextFilters
4. Back in MarsEdit, open up the blog settings for your blog, and look under "Editing" tab.
5. Change the default Preview Text Filter setting to "Convert Breaks Classic"
From this point on you should at least be free of the Python crashes. Let me know how this works for you, if you try it!