Package: python-gamera
Version: 3.4.1-1
The attached test program segfaults:
$ python test.py
Segmentation fault
Backtrace:
#0 0xf79392c2 in get (point=..., this=0x8557a30) at
include/connected_components.hpp:177
#1 image_get (self=self@entry=
<Cc(feature_functions=[[], 0], properties=<Properties at remote 0xf6a65c8c>,
last_display=None, name='Untitled', _display=None) at remote 0xf61088ec>, point=...)
at src/imageobject.cpp:764
#2 0xf79397a9 in image_get (
self=<Cc(feature_functions=[[], 0], properties=<Properties at remote
0xf6a65c8c>, last_display=None, name='Untitled', _display=None) at remote
0xf61088ec>, args=((0, 0),))
at src/imageobject.cpp:879
#3 0x081073bd in call_function (oparg=<optimized out>, pp_stack=<optimized
out>) at ../Python/ceval.c:4021
#4 PyEval_EvalFrameEx () at ../Python/ceval.c:2667
#5 0x08105f4d in PyEval_EvalCodeEx () at ../Python/ceval.c:3253
#6 0x0813a88c in PyEval_EvalCode (
locals={'HEURISTIC': 2, 'nested_list_to_image': <function at remote 0xf77bc294>, 'init_gamera': <function at remote 0xf77bc33c>,
'CONFIDENCE_DEFAULT': 0, 'image': <Image(feature_functions=[[], 0], properties=<Properties at remote 0xf6a65bfc>, last_display=None, name='Untitled',
_display=None) at remote 0xf610879c>, 'CONFIDENCE_INVERSEWEIGHT': 2, 'CONFIDENCE_KNNFRACTION': 1, 'COMPLEX': 5, 'RGBPixel': <type at remote
0xf7955e00>, 'GREYSCALE': 1, 'load_image': <function at remote 0xf796bcdc>, 'ImageData': <type at remote 0xf7956040>, 'display_multi':
<function at remote 0xf77bc304>, 'CONFIDENCE_NUN': 4, 'GREY16': 2, '__package__': None, 'UNCLASSIFIED': 0, 'cc': <Cc(feature_functions=[[], 0],
properties=<Properties at remote 0xf6a65c8c>, last_display=None, name='Untitled', _display=None) at remote 0xf61088ec>, 'image_info': <function at
remote 0xf77bc2cc>, 'CONFIDENCE_AVGDISTANCE': 6, '__doc__': None, 'Rect': <type at remote 0xf7955740>, 'Dim': <type at remote 0xf7955600>,
'ONEBIT': 0, 'DENSE': 0, '__builtins__': <modul...(truncated),
globals={'HEURISTIC': 2, 'nested_list_to_image': <function at remote 0xf77bc294>, 'init_gamera': <function at remote 0xf77bc33c>,
'CONFIDENCE_DEFAULT': 0, 'image': <Image(feature_functions=[[], 0], properties=<Properties at remote 0xf6a65bfc>, last_display=None, name='Untitled',
_display=None) at remote 0xf610879c>, 'CONFIDENCE_INVERSEWEIGHT': 2, 'CONFIDENCE_KNNFRACTION': 1, 'COMPLEX': 5, 'RGBPixel': <type at remote
0xf7955e00>, 'GREYSCALE': 1, 'load_image': <function at remote 0xf796bcdc>, 'ImageData': <type at remote 0xf7956040>, 'display_multi':
<function at remote 0xf77bc304>, 'CONFIDENCE_NUN': 4, 'GREY16': 2, '__package__': None, 'UNCLASSIFIED': 0, 'cc': <Cc(feature_functions=[[], 0],
properties=<Properties at remote 0xf6a65c8c>, last_display=None, name='Untitled', _display=None) at remote 0xf61088ec>, 'image_info': <function at
remote 0xf77bc2cc>, 'CONFIDENCE_AVGDISTANCE': 6, '__doc__': None, 'Rect': <type at remote 0xf7955740>, 'Dim': <type at remote 0xf7955600>,
'ONEBIT': 0, 'DENSE': 0, '__builtins__': <modul...(truncated), co=0xf7ce7ba8)
at ../Python/ceval.c:667
#7 run_mod.lto_priv () at ../Python/pythonrun.c:1371
#8 0x08131578 in PyRun_FileExFlags () at ../Python/pythonrun.c:1357
#9 0x08130725 in PyRun_SimpleFileExFlags () at ../Python/pythonrun.c:949
#10 0x080daaa7 in Py_Main () at ../Modules/main.c:640
#11 0x080da50b in main (argc=2, argv=0xffffd884) at ../Modules/python.c:23
It might or might not be related to #757168, which also involves
connected components of RLE images.
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64
Kernel: Linux 3.16-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages python-gamera depends on:
ii dpkg 1.17.13
ii libc6 2.19-11
ii libgcc1 1:4.9.1-15
ii libgomp1 4.9.1-15
ii libpng12-0 1.2.50-2
ii libstdc++6 4.9.1-15
ii libtiff5 4.0.3-10
ii python 2.7.8-1
Versions of packages python-gamera recommends:
ii python-imaging 2.5.3-1
ii python-numpy 1:1.8.2-2
ii python-wxgtk2.8 2.8.12.1+dfsg2-2
--
Jakub Wilk
#!/usr/bin/python
from gamera.core import *
init_gamera()
image = Image(Point(0, 0), Point(10, 10), ONEBIT, RLE)
image.set((0, 0), 1)
for cc in image.cc_analysis():
print cc.get((0, 0))