Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in _gui_support.color_ccs() #25

Open
jwilk opened this issue Aug 23, 2019 · 1 comment
Open

Crash in _gui_support.color_ccs() #25

jwilk opened this issue Aug 23, 2019 · 1 comment

Comments

@jwilk
Copy link
Contributor

jwilk commented Aug 23, 2019

When Gamera is built with GCC 9, test_rle.py crashes:

$ pytest test_rle.py
============================= test session starts ==============================
platform linux2 -- Python 2.7.16, pytest-4.6.5, py-1.8.0, pluggy-0.12.0
rootdir: /home/jwilk/gamera
collected 1 item

test_rle.py Segmentation fault

Backtrace:

#0  0x00007fb7e18aa603 in Gamera::RleDataDetail::RLEProxy<Gamera::RleDataDetail::RleVector<unsigned short> >::operator unsigned short (this=<synthetic pointer>) at include/rle_data.hpp:260
#1  Gamera::is_white<Gamera::RleDataDetail::RLEProxy<Gamera::RleDataDetail::RleVector<unsigned short> > > (value=...) at include/pixel.hpp:440
#2  Gamera::color_ccs<Gamera::ImageView<Gamera::RleImageData<unsigned short> > > (m=..., ignore_unlabeled=false) at include/plugins/gui_support.hpp:258
#3  0x00007fb7e18a0d6a in call_color_ccs (self=<optimized out>, args=<optimized out>) at /home/jwilk/gamera/gamera/plugins/_gui_support.cpp:275
#4  0x000056106008e0d9 in call_function (oparg=<optimized out>, pp_stack=0x7fff9951f7e8) at Python/ceval.c:4376
#5  PyEval_EvalFrameEx (f=f@entry=0x7fb7e0bb4050, throwflag=throwflag@entry=0) at Python/ceval.c:3013
...

Python backtrace:

File "/home/jwilk/.local/lib/python2.7/site-packages/gamera/plugins/gui_support.py", line 98, in __call__
  return _gui_support.color_ccs(image, ignore_unlabeled)
File "/home/jwilk/gamera/tests/test_rle.py", line 23, in test_rle1
  assert image1.color_ccs().to_string() == image2.color_ccs().to_string()
...

This was tested with:

  • GCC 9.2.1
  • Python 2.7.16 (built from source)
  • Gamera from git master (c77194d)

The bug was originally reported in Debian:
https://bugs.debian.org/925689

@cdalitz
Copy link
Member

cdalitz commented Aug 27, 2019

Unfortunately, I do not have the opportunity to test this with gcc 9. It seems that the error occurs in is_white(). Could you test whether is_white() generally crashes for Onebit-Images in RLE encoding?

Note that we are currently in the process of porting Gamera to Python 3, which might fix inadvertently some bugs, but presumably will introduce other bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants