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 --- Makefile 17 Jun 2017 11:36:16 -0000 1.24 +++ Makefile 30 Sep 2017 02:52:00 -0000 @@ -2,7 +2,7 @@ COMMENT= ZBar barcode reader DISTNAME= zbar-0.10 -REVISION= 16 +REVISION= 17 SHARED_LIBS= zbar 0.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*