hsnr-gamera / gamera-4

Gamera 4 for Python 3
GNU General Public License v2.0
10 stars 8 forks source link

test_rle.py::test_rle1 Fatal Python error: Segmentation fault #47

Closed Apteryks closed 2 years ago

Apteryks commented 2 years ago

Hello,

When running the test suite, I get:

test_rle.py::test_rle1 Fatal Python error: Segmentation fault

Current thread 0x00007ffff7831340 (most recent call first):
  File "/gnu/store/5svj6vddh96rn46wgfx196vhwrh1wm1m-python-gamera-4.0.0/lib/python3.9/site-packages/gamera/plugins/gui_support.py", line 98 in __call__
  File "/tmp/guix-build-python-gamera-4.0.0.drv-0/gamera-4.0.0/tests/test_rle.py", line 25 in test_rle1
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/python.py", line 183 in pytest_pyfunc_call
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/python.py", line 1641 in runtest
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 162 in pytest_runtest_call
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 255 in <lambda>
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 311 in from_call
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 254 in call_runtest_hook
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 215 in call_and_report
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 126 in runtestprotocol
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/runner.py", line 109 in pytest_runtest_protocol
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/main.py", line 348 in pytest_runtestloop
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/main.py", line 323 in _main
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/main.py", line 269 in wrap_session
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/main.py", line 316 in pytest_cmdline_main
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/callers.py", line 187 in _multicall
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 84 in <lambda>
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/manager.py", line 93 in _hookexec
  File "/gnu/store/1dh3ra00qakpp27jpl88m36rl1ij495z-python-pluggy-0.13.1/lib/python3.9/site-packages/pluggy/hooks.py", line 286 in __call__
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/config/__init__.py", line 162 in main
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/lib/python3.9/site-packages/_pytest/config/__init__.py", line 185 in console_main
  File "/gnu/store/rj9gyaqi2ijkll5495jgp7kbfqh02167-python-pytest-6.2.5/bin/.pytest-real", line 33 in <module>
error: in phase 'check': uncaught exception:
%exception #<&invoke-error program: "pytest" arguments: ("-vv" "--ignore" "test_plugins.py") exit-status: #f term-signal: 11 stop-signal: #f> 
phase `check' failed after 3.5 seconds
command "pytest" "-vv" "--ignore" "test_plugins.py" failed with signal 11

This seems to occur on every run.

Any ideas what could be causing it?

The direct input versions are: dependencies: libpng@1.6.37 libtiff@4.3.0 python-pytest@6.2.5 zlib@1.2.11

cdalitz commented 2 years ago

Is this with the latest version of test_rel.py? We had noticed a segfault with color_ccs for RLE encoded images, and as we could not quickly find the cuase, we simply decided to comment out this unit test. RLE images are defined, but nowhere used in Gamera, and finding the error might not be worth the trouble.

Can you verify that calling color_ccs` on a onebit image that has been defined with runlenght encoding segfaults?

cdalitz commented 2 years ago

As I cannot reproduce the error on my computers, I have tried a fix based on speculations. Can you please pull the latest version from git, recompile Gamera and check whether the issue is now solved?

cdalitz commented 2 years ago

As checked by someone else, the segfault no longer occurs when running the unit tests. I will thus close this issue. Thanks for reporting it.