[Pythonmac-SIG] trouble making a standalone app with Python 2.4

Kevin Dangoor kid at kendermedia.com
Wed Feb 23 15:50:40 CET 2005


Bob Ippolito wrote:

>
> On Feb 23, 2005, at 9:08, Kevin Dangoor wrote:
>
>> For a few reasons, I am moving my app to Python 2.4. It runs fine 
>> when I use py2app -A, but it doesn't work when I try to build a full 
>> standalone application. At first, "doesn't work" meant that Twisted's 
>> cfreactor couldn't find _CarbonEvt. If I specifically ask to include 
>> _CarbonEvt, I get a bus error.
>
>
> You didn't mention what version of Twisted this was.  Twisted 1.3.0 
> has a broken cfreactor that assumes broken PyObjC 1.0 behavior, so you 
> will need to use Twisted from SVN (or at least the cfsupport module) too.


I'm using the Twisted 2.0 pre-alpha that was sort of released a few days 
back (as in the tarballs were stuck up on radix's page).

>
> Are you sure it's not that WebKit namespace collision again? :)  What 
> was the rest of that backtrace?

Pretty sure about that one. Near the top of my main .py file, before 
Cheetah has a chance to get at anything, I have an "import WebKit" to 
make sure that WebKit is installed safely.

I added some more logging statements in Python to narrow the problem 
down to reactor.listenTCP(....). So, this is after the cfreactor has 
been installed, but before reactor.run() was called.

Here is the full backtrace from gdb. It doesn't tell me anything, but 
maybe it will say something to you:

#0  0x007615e4 in PyObjCFFI_BuildResult (methinfo=0xbd3940, argOffset=2, 
pRetval=0x77e088, byref=0xbd4950, byref_out_count=0, self=0x1f820f0, 
flags=0) at Modules/objc/libffi_support.m:929
#1  0x00761ef8 in PyObjCFFI_Caller (aMeth=0x1f89188, self=0x1f820f0, 
args=0x0) at Modules/objc/libffi_support.m:1241
#2  0x00772a24 in objcsel_call (self=0x1f89188, args=0x2c5030) at 
Modules/objc/selector.m:502
#3  0x1000c798 in PyObject_Call (func=0x1, arg=0x77e088, kw=0x57fb) at 
Objects/abstract.c:1746
#4  0x1007cd2c in do_call (func=0x1f89188, pp_stack=0xbfffda5c, na=0, 
nk=7869788) at Python/ceval.c:3755
#5  0x1007ca24 in call_function (pp_stack=0x0, oparg=7856264) at 
Python/ceval.c:3570
#6  0x1007a488 in PyEval_EvalFrame (f=0x0) at Python/ceval.c:2163
#7  0x1007b5cc in PyEval_EvalCodeEx (co=0x0, globals=0x77e088, 
locals=0x1, args=0x0, argcount=1227680, kws=0x1007a478, kwcount=1, 
defs=0x1392ac, defcount=1, closure=0x0) at Python/ceval.c:2730
#8  0x1007cc14 in fast_function (func=0x1, pp_stack=0xbfffda5c, n=0, 
na=268756608, nk=2) at Python/ceval.c:3640
#9  0x1007ca0c in call_function (pp_stack=0xbfffdcac, oparg=7856264) at 
Python/ceval.c:3568
#10 0x1007a488 in PyEval_EvalFrame (f=0xbfffdcac) at Python/ceval.c:2163
#11 0x1007b5cc in PyEval_EvalCodeEx (co=0x1, globals=0x77e088, 
locals=0x1, args=0x1, argcount=1227680, kws=0x1007a478, kwcount=1, 
defs=0x1392ac, defcount=0, closure=0x0) at Python/ceval.c:2730
#12 0x10026738 in function_call (func=0x1f89188, arg=0x12bba0, 
kw=0xbfffdcac) at Objects/funcobject.c:550
#13 0x1000c798 in PyObject_Call (func=0x1, arg=0x77e088, kw=0x57fb) at 
Objects/abstract.c:1746
#14 0x10015ed8 in instancemethod_call (func=0x1952d70, arg=0x1f68210, 
kw=0x0) at Objects/classobject.c:2431
#15 0x1000c798 in PyObject_Call (func=0x1, arg=0x77e088, kw=0x57fb) at 
Objects/abstract.c:1746
#16 0x10059fac in slot_tp_init (self=0x6850f0, args=0x1f54c60, kwds=0x0) 
at Objects/typeobject.c:4752
#17 0x100531e8 in type_call (type=0x1a621e8, args=0x6850f0, 
kwds=0x1f54c60) at Objects/typeobject.c:435
#18 0x1000c798 in PyObject_Call (func=0x1, arg=0x77e088, kw=0x57fb) at 
Objects/abstract.c:1746
#19 0x1007cd2c in do_call (func=0xb40b00, pp_stack=0xbfffe38c, na=0, 
nk=7869788) at Python/ceval.c:3755
#20 0x1007ca24 in call_function (pp_stack=0x0, oparg=7856264) at 
Python/ceval.c:3570
#21 0x1007a488 in PyEval_EvalFrame (f=0x0) at Python/ceval.c:2163
#22 0x1007cb84 in fast_function (func=0x1, pp_stack=0xbfffe38c, n=0, 
na=268756608, nk=2) at Python/ceval.c:3629
#23 0x1007ca0c in call_function (pp_stack=0xbfffe53c, oparg=7856264) at 
Python/ceval.c:3568
#24 0x1007a488 in PyEval_EvalFrame (f=0xbfffe53c) at Python/ceval.c:2163
#25 0x1007cb84 in fast_function (func=0x1, pp_stack=0x0, n=3, 
na=268756608, nk=2) at Python/ceval.c:3629
#26 0x1007ca0c in call_function (pp_stack=0xbfffe6ec, oparg=7856264) at 
Python/ceval.c:3568
#27 0x1007a488 in PyEval_EvalFrame (f=0xbfffe6ec) at Python/ceval.c:2163
#28 0x1007cb84 in fast_function (func=0x1, pp_stack=0x0, n=2, 
na=268756608, nk=2) at Python/ceval.c:3629
#29 0x1007ca0c in call_function (pp_stack=0xbfffe89c, oparg=7856264) at 
Python/ceval.c:3568
#30 0x1007a488 in PyEval_EvalFrame (f=0xbfffe89c) at Python/ceval.c:2163
#31 0x1007cb84 in fast_function (func=0x1, pp_stack=0x0, n=1, 
na=268756608, nk=2) at Python/ceval.c:3629
#32 0x1007ca0c in call_function (pp_stack=0xbfffea4c, oparg=7856264) at 
Python/ceval.c:3568
#33 0x1007a488 in PyEval_EvalFrame (f=0xbfffea4c) at Python/ceval.c:2163
#34 0x1007b5cc in PyEval_EvalCodeEx (co=0x1, globals=0x77e088, 
locals=0x1, args=0x1, argcount=1227680, kws=0x1007a478, kwcount=1, 
defs=0x1392ac, defcount=2, closure=0x0) at Python/ceval.c:2730
#35 0x1007cc14 in fast_function (func=0x1, pp_stack=0x0, n=1, 
na=268756608, nk=2) at Python/ceval.c:3640
#36 0x1007ca0c in call_function (pp_stack=0xbfffec9c, oparg=7856264) at 
Python/ceval.c:3568
#37 0x1007a488 in PyEval_EvalFrame (f=0xbfffec9c) at Python/ceval.c:2163
#38 0x1007cb84 in fast_function (func=0x1, pp_stack=0x0, n=3, 
na=268756608, nk=2) at Python/ceval.c:3629
#39 0x1007ca0c in call_function (pp_stack=0xbfffee4c, oparg=7856264) at 
Python/ceval.c:3568
#40 0x1007a488 in PyEval_EvalFrame (f=0xbfffee4c) at Python/ceval.c:2163
#41 0x1007b5cc in PyEval_EvalCodeEx (co=0x0, globals=0x77e088, 
locals=0x1, args=0x0, argcount=1227680, kws=0x1007a478, kwcount=1, 
defs=0x1392ac, defcount=0, closure=0x0) at Python/ceval.c:2730
#42 0x1007e9c0 in PyEval_EvalCode (co=0x1, globals=0x77e088, 
locals=0x57fb) at Python/ceval.c:484
#43 0x100b31f8 in run_node (n=0x0, filename=0x77e088 "", globals=0x0, 
locals=0x0, flags=0x1f4b000) at Python/pythonrun.c:1264
#44 0x10070e44 in builtin_execfile (self=0x1, args=0x77e088) at 
Python/bltinmodule.c:620
#45 0x1007c934 in call_function (pp_stack=0xbfffee4c, oparg=7856264) at 
Python/ceval.c:3547
#46 0x1007a488 in PyEval_EvalFrame (f=0xbfffee4c) at Python/ceval.c:2163
#47 0x1007b5cc in PyEval_EvalCodeEx (co=0x33bf30, globals=0x77e088, 
locals=0x1, args=0x12bba0, argcount=1227680, kws=0x1007a478, kwcount=1, 
defs=0x1392ac, defcount=0, closure=0x0) at Python/ceval.c:2730
#48 0x1007cc14 in fast_function (func=0x1, pp_stack=0x12bba0, n=1227680, 
na=268756608, nk=2) at Python/ceval.c:3640
#49 0x1007ca0c in call_function (pp_stack=0xbffff3fc, oparg=7856264) at 
Python/ceval.c:3568
#50 0x1007a488 in PyEval_EvalFrame (f=0xbffff3fc) at Python/ceval.c:2163
#51 0x1007b5cc in PyEval_EvalCodeEx (co=0x1, globals=0x77e088, 
locals=0x1, args=0x1, argcount=1227680, kws=0x1007a478, kwcount=1, 
defs=0x1392ac, defcount=0, closure=0x0) at Python/ceval.c:2730
#52 0x1007e9c0 in PyEval_EvalCode (co=0x1, globals=0x77e088, 
locals=0x57fb) at Python/ceval.c:484
#53 0x100b31f8 in run_node (n=0x1, filename=0x77e088 "", globals=0x1, 
locals=0x0, flags=0x1f4b000) at Python/pythonrun.c:1264
#54 0x100b2984 in PyRun_SimpleFileExFlags (fp=0xa0009818, 
filename=0x201c000 
"/Users/tazzzzz/projects/news/dist/myapp.app/Contents/Resources/__boot__.py", 
closeit=-1073744900, flags=0xb40b00) at Python/pythonrun.c:859



More information about the Pythonmac-SIG mailing list