Re: zbar, python module import core dumps
On 2017/09/30 13:00, Jonathan Gray wrote: > On Fri, Sep 29, 2017 at 04:07:08PM -0400, Jiri B wrote: > > Hi, > > > > this simple things make python core dump. Anything more for this > > issue report I could provide? > > > > Jiri > > > > # python2.7 -c 'import zbar' > > Segmentation fault (core dumped) > > Here is a patch from debian that seems to avoid the crash. > I never used the python api back when I actually used zbar. OK for after unlock. > You will need to create the patches directory before applying it. patch -p0 does that automatically, by the way. > Index: Makefile > === > RCS file: /cvs/ports/graphics/zbar/Makefile,v > retrieving revision 1.24 > diff -u -p -r1.24 Makefile > --- Makefile 17 Jun 2017 11:36:16 - 1.24 > +++ Makefile 30 Sep 2017 02:52:00 - > @@ -2,7 +2,7 @@ > > COMMENT= ZBar barcode reader > DISTNAME=zbar-0.10 > -REVISION=16 > +REVISION=17 > > SHARED_LIBS= zbar0.0 \ > zbargtk 0.0 > --- /dev/null Sat Sep 30 12:55:41 2017 > +++ patches/patch-python_imagescanner_c Sat Sep 30 12:53:24 2017 > @@ -0,0 +1,15 @@ > +$OpenBSD$ > + > +Index: python/imagescanner.c > +--- python/imagescanner.c.orig > python/imagescanner.c > +@@ -67,7 +67,8 @@ imagescanner_get_results (zbarImageScanner *self, > + } > + > + static PyGetSetDef imagescanner_getset[] = { > +-{ "results", (getter)imagescanner_get_results, }, > ++{ "results", (getter)imagescanner_get_results, NULL, NULL, NULL}, > ++{NULL} /* Sentinel */ > + }; > + > + static PyObject* >
Re: zbar, python module import core dumps
On Sat, Sep 30, 2017 at 01:00:11PM +1000, Jonathan Gray wrote: > > # python2.7 -c 'import zbar' > > Segmentation fault (core dumped) > > Here is a patch from debian that seems to avoid the crash. > I never used the python api back when I actually used zbar. Thank you, works OK on amd64. Tested with qrtools[1] to decode a sample QR code from internet. [1] https://ralgozino.wordpress.com/2011/06/13/how-to-create-and-decode-a-qr-code-in-python-using-qrtools/ Jiri
Re: zbar, python module import core dumps
On Fri, Sep 29, 2017 at 04:07:08PM -0400, Jiri B wrote: > Hi, > > this simple things make python core dump. Anything more for this > issue report I could provide? > > Jiri > > # python2.7 -c 'import zbar' > Segmentation fault (core dumped) Here is a patch from debian that seems to avoid the crash. I never used the python api back when I actually used zbar. You will need to create the patches directory before applying it. Index: Makefile === RCS file: /cvs/ports/graphics/zbar/Makefile,v retrieving revision 1.24 diff -u -p -r1.24 Makefile --- Makefile17 Jun 2017 11:36:16 - 1.24 +++ Makefile30 Sep 2017 02:52:00 - @@ -2,7 +2,7 @@ COMMENT= ZBar barcode reader DISTNAME= zbar-0.10 -REVISION= 16 +REVISION= 17 SHARED_LIBS= zbar0.0 \ zbargtk 0.0 --- /dev/null Sat Sep 30 12:55:41 2017 +++ patches/patch-python_imagescanner_c Sat Sep 30 12:53:24 2017 @@ -0,0 +1,15 @@ +$OpenBSD$ + +Index: python/imagescanner.c +--- python/imagescanner.c.orig python/imagescanner.c +@@ -67,7 +67,8 @@ imagescanner_get_results (zbarImageScanner *self, + } + + static PyGetSetDef imagescanner_getset[] = { +-{ "results", (getter)imagescanner_get_results, }, ++{ "results", (getter)imagescanner_get_results, NULL, NULL, NULL}, ++{NULL} /* Sentinel */ + }; + + static PyObject*