-1

SO I have been developing a program for my wife on my machine, which is windows. She recently finally got a laptop, so I'm working on moving everything onto there for her.

After hours of messing around (NOT a Mac guy, hate them and am very frustrated now haha) I seemed to have everything running, databases working and handing out the info, etc, Except - when you start to use the program, I get segmentation fault 11 and an immediate crash.

I started off trying to use python 26 or 27 as I am using on my machine - installed python and some of the libraries I needed, but whenever I was trying to build PySide it was an epic failure, and either wouldn't work, or would error at importing QtCore or QtGui. Qt4 was A no go as well.

After hours of playing with this I moved on to saying screw it, and installing pyqt5 and adjusting all my code to fit (that was fun). It was at this point I was able to get it running - up until the segmentation fault issues.

Some research led me to info about some deadline error on Mac, saying other versions should have it fixed, or there was a patch I could apply. I tried applying the patch, which itself errors with a line error trying to read it, at the sh ./patch_readline_issue_18458.sh stage.

sh ./patch_readline_issue_18458.sh
./patch_readline_issue_18458.sh: line 1: syntax error near unexpected token `newline'
./patch_readline_issue_18458.sh: line 1: `<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">'

Eventually I said I'd bite a few more bullets and move up to python 3... I mean it says compile for apple IN it, and its new... this couldn't have issues right?

$ python3
Python 3.6.2 (v3.6.2:5fd33b5926, Jul 16 2017, 20:11:06) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

Wrong - still segfaults.

Im at a loss for what to do here... does anyone have any idea how to help a Mac noob?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
aescript
  • 1,775
  • 4
  • 20
  • 30
  • Possible duplicate of [Error: Segmentation fault (core dumped)](https://stackoverflow.com/questions/13654449/error-segmentation-fault-core-dumped) – pjpj Oct 01 '17 at 03:47
  • Did you compile that python3 binary yourself? "GCC 4.2.1 (Apple Inc. build 5666) (dot 3)" was the default compiler of XCode in version 4.1, back in 2011... What version of OS X and build toolchain are you using? It would probably be much, much easier to install everything you need from [MacPorts](https://www.macports.org) (all kinds of open source software) or [Anaconda](https://docs.anaconda.com/anaconda/packages/py2.7_osx-64) (excellent python distribution with lots of default packages). – user8153 Oct 01 '17 at 04:43
  • Turns out the segfault led me in the wrong direction. I thought it was a build issue because all this code worked perfectly fine in py27 and qt4. Turns out the issue was actually the way i was replacing my completer with update results. If i called .deleteLater() on my existing completer, and set the line eidts completer to none before making my new one and assigning it, it all worked fine. Sorry about the false alarm! – aescript Oct 03 '17 at 05:30

1 Answers1

0

Turns out the segfault led me in the wrong direction. I thought it was a build issue because all this code worked perfectly fine in py27 and qt4. Turns out the issue was actually the way i was replacing my completer with update results. If i called .deleteLater() on my existing completer, and set the line eidts completer to none before making my new one and assigning it, it all worked fine. Sorry about the false alarm!

aescript
  • 1,775
  • 4
  • 20
  • 30