Re: strange problem using NSWorkspace/NSTask to start PyObjC apps

Ronald Oussoren <[email protected]>
Newsgroups gmane.comp.python.pyobjc.devel
Message-ID <[email protected]>
On 21 Nov, 2011, at 7:08, Robert Klep wrote:

> Hey all,
> 
> I'm running into a strange problem with PyObjC-based apps.
> 
> The situation: I'm working on a .mailbundle (a plug-in for Apple Mail). From that plug-in, I want to start a PyObjC-based application. No matter what, this fails: the application gets a SIGSEGV (I'll post some more information below).
> 
> I've used pretty much all methods of starting the application (NSWorkspace, NSTask, even executing "open -a APP" from the Python subprocess module), and it keeps failing. Of course, the app works without problems when started manually. Starting the app from a Python-shell using [NSWorkspace launchApplication:] works, too. Just not from within the plug-in.

If I'd have to guess I'd say that py2app doesn't fully reset the environment and some bits of the environment that py2app sets to communicate with the bundle code leaks into application bundle and causes problems there.

What happens when you add "os.delenv('PYOBJC_BUNDLE_ADDRESS')" before you try to open the bundle? 

Ronald

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d

_______________________________________________
Pyobjc-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
smime.p7s (application/pkcs7-signature, 4.7 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.