[Qgis-user] Mac OS X: QGIS 1.0 Preview 2 Crashes

Dan Dittmann qgis at dandittmann.org
Thu Nov 13 18:55:35 PST 2008


On Nov 13, 2008, at 8:35 PM, William Kyngesburye wrote:

> On Nov 13, 2008, at 7:55 PM, Dan Dittmann wrote:
>
>> 11/13/08 7:43:08 PM [0x0-0x1f01f].org.qgis.qgis[273] Warning:  
>> Object::connect:  (receiver name: 'QgsComposerBase')
>> 11/13/08 7:43:08 PM [0x0-0x1f01f].org.qgis.qgis[273] Fatal Python  
>> error: Interpreter not initialized (version mismatch?)
>>
>> The last message indicated the possibility of a problem relating to  
>> Python. A few months ago, I had updated to python.org's version and  
>> been using that rather than the system default. On that thought, I  
>> first updated to version 2.6 -- no change. I then tried the system  
>> default. To accomplish this, I removed the nonsystem version from  
>> my path, then restarted the system. After restart, my path checked  
>> out as expected and running which python showed me /usr/bin/python.  
>> Doing so however made no difference as QGIS still crashed with the  
>> same console messages.
>>
> On OSX Qgis is very particular about which Python is used at  
> runtime.  Unfortunately, PyQt/SIP, and the Qgis python libraries,  
> link directly to the Python framework binary, so only that Python  
> binary can be used to load the Qgis python bindings.
>
> Unlike other systems, on OSX a proper plugin/extension links in a  
> different way to its parent than normal dynamic libraries - there is  
> no direct link to the parent binary.  It expects to be loaded by  
> that parent, and thus find all the functions it needs from the parent.
>
> This makes it simple to to move the parent around (ie Python,  
> Apache, PHP) or use different builds (but same version) of the  
> parent (ie Apple Python 2.5 vs python.org Python 2.5).
>
> How this affects Qgis/python: say Qgis is built with the Apple  
> Python (like my Leopard Qgis), but you have the python.org python  
> (2.5 or 2.6) in your shell PATH.  Qgis starts up python, and finds  
> python.org's python.  But the Qgis python binary parts link to the  
> system python - total binary confusion, even though they may be the  
> same version, and Qgis crashes.
>
> So, installing Python 2.6 will cause trouble, if Qgis was built with  
> either the system python or python.org python 2.5.  If Qgis was  
> built with the python.org python 2.5, removing it will cause trouble  
> also.

This is sort of the idea I was operating on when I chose to remove  
python.org's version from my path.

> It would be nice if PyQt/SIP and Qgis properly linked to python (I  
> think Qgis takes its cue from SIP), then it would be easier to  
> switch between the system python 2.5 and python.org 2.5.
>
>> Does anyone have any thoughts as to what else I should look at?
>>
> If Qgis crashed, look in Console.app for the crashlog.  If it's just  
> quitting with no crash, turning on Qgis debugging may help find the  
> problem (sorry, I don't remember how to do that).

If I get ambitious, I'll poke around for this.
>
>
>> My set up is on Mac OS 10.5.5 + all security updates. The system  
>> version of python is 2.5.1. In addition, I have trashed the pref  
>> file as well as moved ~/.qgis temporarily to a different directory.
>>
>
> Which Qgis are you using - mine (framework-based) or Tom's all-in-one?

Tom's All in one.

I did just download your frameworks and your build of QGIS. That  
version works as expected.


Dan



More information about the Qgis-user mailing list