5

I'm running into this (apparently old) issue. Small, insignificant changes in my code cause my program to crash and throw

Segmentation fault 11.

I'm using Python 3.4.4 and Kivy 1.9 on OS 10.11. (EDIT: Investigation reveals that Kivy was bundled with 3.5.0)

EDIT: The minor change was that I had a method that created a Popup and then edited the properties after creation. I originally called this method in my game object's init statement. I wanted to clean this up so I sub-classed Popup and put the properties in the new class's init statement, and then called its constructor in the same place. I went from this:

self.create_start_game_popup()
     #within the method is "self.startpopup = Popup()"

to this:

self.startpopup = StartPopup()

EDIT: As requested, here's the fixes I tried so as not to rely on external links.

I've tried this fix so far, as suggested in another Stackoverflow post:

cd /Library/Frameworks/Python.framework/Versions/3.3
cd ./lib/python3.3/lib-dynload 
sudo mv readline.so readline.so.disabled  

I found this resolved bug referring to OS 10.9, tried the patch recommended in this comment but haven't found anything specific to OS 10.11 or that actually works for me.

The patch was a temporary fix as suggested in a comment on a Python bug ticket while the bug was being fixed between Python 3.3.2 and 3.3.3. It was verified fixed in 3.3.3 on OS 10.9

Until the updated readline module is available in python.org 2.7.6 and 3.3.3 maintenance releases, here is a script that will check python.org versions of Python 2.7.x, 3.2.x, 3.3.x, and 3.4.x for interactive crashes and will patch around the problem as needed. On most systems you will need to run it under an account with administrator privileges.

To use it, open a terminal session in Terminal.app (or other shell), then enter:

curl -O http://bugs.python.org/file32324/patch_readline_issue_18458.sh
openssl sha1 patch_readline_issue_18458.sh
#the digest should be 7cb0ff57820a027dd4ca242eb2418930f8f46b4c)
sh ./patch_readline_issue_18458.sh

Any ideas on what to do next?

Community
  • 1
  • 1
KSully2
  • 149
  • 1
  • 13
  • 1
    write a bit more and don't rely on external links that may go down. – Untitled123 Feb 19 '16 at 16:20
  • Do you have xcode installed? If yes, try running the python interpreter from within LLDB. Simply like `lldb /Path/to/Python/bin/python`, and from within there, `process launch -- myscript.py` - this should provide you with a stacktrace, try getting it with `bt`. It's not as great as a Python-Stacktrace, but might give clues. – deets Feb 20 '16 at 18:07

0 Answers0