OK, the patch works on x86_64/nvidia (the system my former backtrace was made on), but fails on i386/intel with:
** (process:12615): WARNING **: Invalid string. This should not happen. BTW, both systems are running Debian SID with python 2.5.2-9 :wq buz On Fri, Aug 01, 2008 at 03:04:55PM +0100, Emmanuele Bassi wrote: > On Fri, 2008-08-01 at 15:30 +0200, Bastian Winkler wrote: > > > > if you mean that event after the changes your application segfaults, > > > then a backtrace would be fantastic. > > > > A backtrace of 'import cluttergst' is attached... > > mmh, interesting. it seems you're getting an NULL string object even > after the function checked for validity. > > I use python 2.5 as well, and I've tested on different set ups. > > could you please try cleaning up the clutter modules directories under: > > /usr/local/lib/python2.5/site-packages > > and then reinstall? if that doesn't work, could you try applying the > attached patch and test again? thanks. > > ciao, > Emmanuele. > > -- > Emmanuele Bassi, OpenedHand Ltd. > Unit R, Homesdale Business Centre > 216-218 Homesdale Rd., Bromley - BR12QZ > http://www.o-hand.com > diff --git a/clutter-gst/cluttergstmodule.c b/clutter-gst/cluttergstmodule.c > index adcef0f..5567cc5 100644 > --- a/clutter-gst/cluttergstmodule.c > +++ b/clutter-gst/cluttergstmodule.c > @@ -48,7 +48,14 @@ init_clutter_gst (void) > argv = g_new (char*, argc); > > for (i = 0; i < argc; i++) > - argv[i] = g_strdup (PyString_AsString (PyList_GetItem (av, i))); > + { > + PyObject *arg = PyList_GetItem (av, i); > + > + if (arg && PyString_Check (arg)) > + argv[i] = g_strdup (PyString_AsString (arg)); > + else > + g_warning ("Invalid string. This should not happen."); > + } > } > else > { > @@ -57,19 +64,7 @@ init_clutter_gst (void) > } > > if (!clutter_gst_init (&argc, &argv)) > - { > - if (argv != NULL) > - g_strfreev (argv); > - > - PyErr_SetString (PyExc_RuntimeError, "cluttergst initialization > error"); > - > - /* set the LC_NUMERIC locale back to "C", as Python < 2.4 requires > - * that it be set that way. */ > -#if PY_VERSION_HEX < 0x020400F0 > - setlocale(LC_NUMERIC, "C"); > -#endif > - return; > - } > + PyErr_SetString (PyExc_RuntimeError, "cluttergst initialization error"); > > /* set the LC_NUMERIC locale back to "C", as Python < 2.4 requires that > * it be set that way. */ -- "Software is like sex: it's better when it's free.", Linus Torvalds GnuPG Fingerprint: 2FFF FC48 C7DF 1EA0 00A0 FD53 8C35 FD2E 6908 7B82
signature.asc
Description: Digital signature
