aferrero2707 / PhotoFlow

A fully non-destructive photo retouching program providing a complete layer-based workflow including RAW image development.
http://aferrero2707.github.io/PhotoFlow
GNU General Public License v3.0
315 stars 36 forks source link

Closing last image via 'X' kill icon on tab generates SIGSEGV #10

Closed grosgood closed 9 years ago

grosgood commented 10 years ago

Hi Andrea built with: commit 2c1b6df3563a546e7f8c40aeeffc03f738ce1797 Author: Ferrero Andrea aferrero1975@gmail.com Date: Fri Nov 7 08:24:55 2014 +0100 Hardware: See issue #8 Clean Debug build. Running under gdb. Back to using GTK3mm. In trying to reproduce SIGSEGV from tearing scrolling, stumbled on another way to SIGSEGV every time. Closing an image via its Tab ('X') icon when it is the only image loaded in the application kicks off a segment violation. Done this about six or seven times now. If there are a number of images loaded, I can delete them in any order up until the last one.

Begin dump:

PF::MainWindow::remove_tab() called.

Pipeline::~Pipeline() called. pf_object_unref(): PF::Pipeline::~Pipeline() unref image of layer background object=0x22b4e10 ref_count before: 3 ref_count after: 2 pf_object_unref(): PF::Pipeline::~Pipeline() unref blended image of layer background object=0x22b4e10 ref_count before: 2 ref_count after: 1 ~OpParBase(): deleting operation 0x7fffe0001160 ~ProcessorBase(): deleting 0x7fffe0001160 pf_object_unref(): PF::Pipeline::~Pipeline() unref image of layer background object=0x7fffe079a1b0 ref_count before: 3 ref_count after: 2 pf_object_unref(): PF::Pipeline::~Pipeline() unref blended image of layer background object=0x7fffe079a1b0 ref_count before: 2 ref_count after: 1 ~OpParBase(): deleting operation 0x7fffe08e9d00 ~ProcessorBase(): deleting 0x7fffe08e9d00 pf_object_unref(): PF::Pipeline::~Pipeline() unref image of layer background object=0x7fffe0909af0 ref_count before: 3 ref_count after: 2 pf_object_unref(): PF::Pipeline::~Pipeline() unref blended image of layer background object=0x7fffe0909af0 ref_count before: 2 ref_count after: 1 ~OpParBase(): deleting operation 0x7fffe07a6250 ~ProcessorBase(): deleting 0x7fffe07a6250 Pipeline::~Pipeline() called. pf_object_unref(): PF::Pipeline::~Pipeline() unref image of layer background object=0x7fffe05c9c90 ref_count before: 3 ref_count after: 2 pf_object_unref(): PF::Pipeline::~Pipeline() unref blended image of layer background object=0x7fffe05c9c90 ref_count before: 2 ref_count after: 1 pf_object_unref(): PF::ImagePyramid::~ImagePyramid() levels[1].image object=0x7fffe05c9c90 ref_count before: 1 ref_count after: 0 ~OpParBase(): deleting operation 0x7fffe05e9710 ~ProcessorBase(): deleting 0x7fffe05e9710 pf_object_unref(): PF::Pipeline::~Pipeline() unref image of layer background object=0x7fffe0909000 ref_count before: 3 ref_count after: 2 pf_object_unref(): PF::Pipeline::~Pipeline() unref blended image of layer background object=0x7fffe0909000 ref_count before: 2 ref_count after: 1 pf_object_unref(): PF::ImagePyramid::~ImagePyramid() levels[1].image object=0x7fffe0909000 ref_count before: 1 ref_count after: 0 ~OpParBase(): deleting operation 0x7fffe08fb8f0 ~ProcessorBase(): deleting 0x7fffe08fb8f0 pf_object_unref(): PF::Pipeline::~Pipeline() unref image of layer background object=0x7fffe09cf010 ref_count before: 5 ref_count after: 4 pf_object_unref(): PF::Pipeline::~Pipeline() unref blended image of layer background object=0x7fffe09cf010 ref_count before: 4 ref_count after: 3 pf_object_unref(): PF::ImagePyramid::~ImagePyramid() levels[1].image object=0x7fffe09cf010 ref_count before: 3 ref_count after: 2 ~OpParBase(): deleting operation 0x7fffe09c7ac0 ~ProcessorBase(): deleting 0x7fffe09c7ac0 Deleting image area pf_object_unref(): ImageArea::~ImageArea() object=0x7fffe05f5a10 ref_count before: 1 ref_count after: 0 pf_object_unref(): ImageArea::~ImageArea() object=0x7fffe0909190 ref_count before: 1 ref_count after: 0 pf_object_unref(): ImageArea::~ImageArea() object=0x7fffe0604000 ref_count before: 2 ref_count after: 1 ~OpParBase(): deleting operation 0x21cd2b0 ~ProcessorBase(): deleting 0x21cd2b0 ~OpParBase(): deleting operation 0x21d6be0 ~ProcessorBase(): deleting 0x21d6be0 ~OpParBase(): deleting operation 0x21d57f0 ~ProcessorBase(): deleting 0x21d57f0 ~OpParBase(): deleting operation 0x21ce420 ~ProcessorBase(): deleting 0x21ce420 ~Layer(): "background" destructor called. ~OpParBase(): deleting operation 0x2247010 ~ProcessorBase(): deleting 0x2247010 ~OpParBase(): deleting operation 0x2240ac0 ~ProcessorBase(): deleting 0x2240ac0 ~Layer(): "background" destructor called. ~OpParBase(): deleting operation 0x23a0ca0 ~ProcessorBase(): deleting 0x23a0ca0 ~OpParBase(): deleting operation 0x23733d0 ~ProcessorBase(): deleting 0x23733d0 ~Layer(): "background" destructor called. ~OpParBase(): deleting operation 0x251e260 ~ProcessorBase(): deleting 0x251e260 ~OpParBase(): deleting operation 0x2520fb0 ~ProcessorBase(): deleting 0x2520fb0 PF::ImageProcessor::run(): image destroyed.

Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fffe7f82700 (LWP 29909)] Python Exception <type 'exceptions.IndexError'> list index out of range: 0x0000000000c6c457 in PF::LayerManager::get_cache_buffer (this=0x213e128, list=std::list) at /home/gosgood/PhotoFlow/src/base/layermanager.cc:334 334 PF::Layer* l = *li; (gdb) backtrace

0 0x0000000000c6c457 in PF::LayerManager::get_cache_buffer (this=0x213e128,

Python Exception <type 'exceptions.IndexError'> list index out of range: list=std::list) at /home/gosgood/PhotoFlow/src/base/layermanager.cc:334

1 0x0000000000c6c40e in PF::LayerManager::get_cache_buffer (this=0x213e128)

at /home/gosgood/PhotoFlow/src/base/layermanager.cc:326

2 0x0000000000c8752f in PF::ImageProcessor::run (this=0x20ac270)

at /home/gosgood/PhotoFlow/src/base/imageprocessor.cc:100

3 0x0000000000c87258 in run_image_processor (data=0x0)

at /home/gosgood/PhotoFlow/src/base/imageprocessor.cc:38

4 0x00007ffff3b25caf in vips_thread_run (data=0x20ac5c0) at threadpool.c:173

5 0x00007ffff44c1495 in ?? () from /usr/lib64/libglib-2.0.so.0

6 0x00007fffef584f22 in start_thread () from /lib64/libpthread.so.0

7 0x00007fffef87f07d in clone () from /lib64/libc.so.6

(gdb)

aferrero2707 commented 10 years ago

Thanks! I will look into that also...

aferrero2707 commented 9 years ago

Bug is fixed in development branch. While investigating this issue, I've also found and fixed an incorrect duplication of the bottom layer when switching between tabs.

Thanks for reporting!