Re: [Gimp-developer] shift plug-in segfaults

2007-09-30 Thread Sven Neumann
Hi,

On Fri, 2007-09-28 at 11:47 +0400, Alexandre Prokoudine wrote:

> Here is what I see when trying to run Shift plug-in on GIMP 2.4 RC3 + SVN:
> 
> /usr/lib/gimp/2.0/plug-ins/shift: fatal error: Segmentation fault

>  What further information do you need from me?

A detailed description of what exactly you are doing. This includes the
size and type of the image and drawable you are working with, whether
you have an active selection or not and what values you are using in the
plug-in. It would also be nice to tell us exactly when the plug-in
crashes and it would be even better to provide a stack trace. With all
this information, please file a bug report in our bug-tracker.


Sven


___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] python api leak

2007-09-30 Thread Manish Singh
On Thu, Aug 16, 2007 at 08:25:17PM +1000, Campbell Barton wrote:
> was looking at the gimps python API, svn - gimp-pdb.c:311
> 
> GimpParam *
> pygimp_param_from_tuple(PyObject *args, const GimpParamDef *ptype, int 
> nparams)
> {
>  PyObject *tuple, *item, *r, *g, *b, *x, *y, *w, *h;
>  GimpParam *ret;
>  int i, j, len;
>  gint32 *i32a; gint16 *i16a; guint8 *i8a; gdouble *fa; gchar **sa;
> 
>  if (nparams == 0)
>   tuple = PyTuple_New(0);
>  else if (!PyTuple_Check(args) && nparams == 1)
>   tuple = Py_BuildValue("(O)", args);
>  else {
>   Py_INCREF(args);
>   tuple = args;
>  }
>  if (!PyTuple_Check(tuple)) {
>   PyErr_SetString(PyExc_TypeError, "wrong type of parameter");
>   return NULL;
>  }
> 
>  if (PyTuple_Size(tuple) != nparams) {
>   PyErr_SetString(PyExc_TypeError, "wrong number of parameters");
>   return NULL;
>  }
> --- snip
> 
> Notice that tuple is always created, but error values dont free, I think 
> both "return NULL;"'s need a Py_DECREF(tuple); before them.

Thanks for noticing, you are indeed correct. This is now fixed in SVN.

Next time, filing a bug in bugzilla with a patch for these obvious sorts
of things would be much preferred.

-Yosh
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer