Re: koffice/krita/image

View: New views
15 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: koffice/krita/image

by Cyrille Berger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tuesday 22 September 2009, you wrote:
> Hi, Cyrille! Could you tell me, what is the reason of this change?!
> selection() can easily not to have PixelSelection but to have a Vector one!
hum good question.

> Why do you check for this?
The problem is that the datamanager of KisSelection get destroyed when
KisTransparencyMask::apply() work. You can see the valgrind trace in
attachement. Maybe a more proper fix would be for the transparancy mask to
block the replacement of the datamanager, or iterators should hold a smart
point to the data manager (why don't they ?)

--
Cyrille Berger

==5174== Thread 2:                                                                                                                                          
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D197: QMutex::lock() (qmutex.cpp:152)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0xf2b41a8 is 32 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid read of size 1                                                                                                                              
==5174==    at 0x409D199: QMutex::lock() (qmutex.cpp:152)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1430 is 0 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D232: QMutex::lock() (qmutex.cpp:154)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0xf2b41a8 is 32 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D234: QMutex::lock() (qmutex.cpp:154)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee143c is 12 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D241: QMutex::lock() (qatomic_i386.h:163)                                                                                                
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1434 is 4 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D24C: QMutex::lock() (qmutex.cpp:177)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0xf2b41a8 is 32 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid write of size 4                                                                                                                            
==5174==    at 0x409D24E: QMutex::lock() (qmutex.cpp:177)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee143c is 12 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D251: QMutex::lock() (qmutex.cpp:178)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1440 is 16 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x451F488: KisTile::removeReader() const (kis_tile.cc:153)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==    by 0x41A3E0F: QObject::event(QEvent*) (qobject.cpp:1110)                                                                                        
==5174==  Address 0xf2b4194 is 12 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid write of size 4                                                                                                                            
==5174==    at 0x451F490: KisTile::removeReader() const (kis_tile.cc:153)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==    by 0x41A3E0F: QObject::event(QEvent*) (qobject.cpp:1110)                                                                                        
==5174==  Address 0xf2b4194 is 12 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409CF9D: QMutex::unlock() (qmutex.cpp:375)                                                                                                  
==5174==    by 0x451F4AD: KisTile::removeReader() const (kis_tile.cc:155)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0xf2b41a8 is 32 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid read of size 1                                                                                                                              
==5174==    at 0x409CF9F: QMutex::unlock() (qmutex.cpp:375)                                                                                                  
==5174==    by 0x451F4AD: KisTile::removeReader() const (kis_tile.cc:155)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1430 is 0 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409CFA4: QMutex::unlock() (qmutex.cpp:376)                                                                                                  
==5174==    by 0x451F4AD: KisTile::removeReader() const (kis_tile.cc:155)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1440 is 16 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid write of size 4                                                                                                                            
==5174==    at 0x409CFAC: QMutex::unlock() (qmutex.cpp:376)                                                                                                  
==5174==    by 0x451F4AD: KisTile::removeReader() const (kis_tile.cc:155)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1440 is 16 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid write of size 4                                                                                                                            
==5174==    at 0x409CFB1: QMutex::unlock() (qmutex.cpp:377)                                                                                                  
==5174==    by 0x451F4AD: KisTile::removeReader() const (kis_tile.cc:155)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee143c is 12 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409CFC5: QMutex::unlock() (qatomic_i386.h:144)                                                                                              
==5174==    by 0x451F4AD: KisTile::removeReader() const (kis_tile.cc:155)                                                                                    
==5174==    by 0x451FE6E: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:116)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1434 is 4 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D197: QMutex::lock() (qmutex.cpp:152)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0xf2b41a8 is 32 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid read of size 1                                                                                                                              
==5174==    at 0x409D199: QMutex::lock() (qmutex.cpp:152)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1430 is 0 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D232: QMutex::lock() (qmutex.cpp:154)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0xf2b41a8 is 32 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D234: QMutex::lock() (qmutex.cpp:154)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee143c is 12 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D241: QMutex::lock() (qatomic_i386.h:163)                                                                                                
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1434 is 4 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D24C: QMutex::lock() (qmutex.cpp:177)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0xf2b41a8 is 32 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid write of size 4                                                                                                                            
==5174==    at 0x409D24E: QMutex::lock() (qmutex.cpp:177)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee143c is 12 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x409D251: QMutex::lock() (qmutex.cpp:178)                                                                                                    
==5174==    by 0x451F487: KisTile::removeReader() const (kis_tile.cc:152)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==  Address 0x18ee1440 is 16 bytes inside a block of size 96 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x409D32F: QMutex::~QMutex() (qmutex.cpp:134)                                                                                                
==5174==    by 0x451FCD5: KisTile::~KisTile() (kis_tile.cc:107)                                                                                              
==5174==    by 0x451B5D1: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==                                                                                                                                                    
==5174== Invalid read of size 4                                                                                                                              
==5174==    at 0x451F488: KisTile::removeReader() const (kis_tile.cc:153)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==    by 0x41A3E0F: QObject::event(QEvent*) (qobject.cpp:1110)                                                                                        
==5174==  Address 0xf2b4194 is 12 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)                                                                    
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)                                                                                      
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)                                                                    
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)                                                                                          
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)                                                                          
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)                    
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)                                                              
==5174==                                                                                                                                                    
==5174== Invalid write of size 4                                                                                                                            
==5174==    at 0x451F490: KisTile::removeReader() const (kis_tile.cc:153)                                                                                    
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)                                                              
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)                                                            
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)                                                                      
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)                            
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)            
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)                                                            
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)                                            
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)                                          
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)                                              
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)                                                                          
==5174==    by 0x41A3E0F: QObject::event(QEvent*) (qobject.cpp:1110)                                                                                        
==5174==  Address 0xf2b4194 is 12 bytes inside a block of size 36 free'd                                                                                    
==5174==    at 0x40249DA: operator delete(void*) (vg_replace_malloc.c:342)                                                                                  
==5174==    by 0x451B5D9: KisTiledDataManager::~KisTiledDataManager() (kis_tileddatamanager.cc:140)                                                          
==5174==    by 0x45CBBE9: KisSelection::setPixelSelection(KisSharedPtr<KisPixelSelection>) (kis_datamanager.h:48)                                            
==5174==    by 0x45CBD79: KisSelection::getOrCreatePixelSelection() (kis_selection.cc:286)                                                                  
==5174==    by 0x43A0E76: KisMaskManager::activeDevice() (kis_mask_manager.cc:172)                                                                          
==5174==    by 0x43A88B1: KisNodeManager::activePaintDevice() (kis_node_manager.cpp:109)
==5174==    by 0x43DF212: KisView2::activeDevice() (kis_view2.cpp:410)
==5174==    by 0x43CFBD3: KisSelectionManager::updateGUI() (kis_selection_manager.cc:260)
==5174==    by 0x43DED71: KisView2::updateGUI() (kis_view2.cpp:577)
==5174==    by 0x439E154: KisMaskManager::masksUpdated() (kis_mask_manager.cc:533)
==5174==    by 0x43A3B54: KisMaskManager::createTransparencyMask(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>) (kis_mask_manager.cc:205)
==5174==    by 0x43AB8B6: KisNodeManager::createNode(QString const&) (kis_node_manager.cpp:254)
==5174==
==5174== Invalid write of size 1
==5174==    at 0x4524587: KisTileManager::maySwapTile(KisTile const*) (kis_tilemanager.cc:244)
==5174==    by 0x451F4A5: KisTile::removeReader() const (kis_tile.cc:154)
==5174==    by 0x451FE7D: KisTiledIterator::fetchTileData(int, int) (kis_tilediterator.cc:118)
==5174==    by 0x451A559: KisTiledHLineIterator::operator+=(int) (kis_tiledhlineiterator.cc:153)
==5174==    by 0x458B752: KisHLineConstIterator::operator+=(int) (kis_iterator.cc:154)
==5174==    by 0x45E08C0: KisTransparencyMask::apply(KisSharedPtr<KisPaintDevice>, QRect const&) const (kis_iterators_pixel.h:66)
==5174==    by 0x458ED46: KisLayer::applyEffectMasks(KisSharedPtr<KisPaintDevice>, KisSharedPtr<KisPaintDevice>, QRect const&) (kis_layer.cc:301)
==5174==    by 0x45AA381: KisPaintLayer::updateProjection(QRect const&) (kis_paint_layer.cc:179)
==5174==    by 0x45D476B: KisTopDownUpdateStrategy::setDirty(QRect const&) (kis_top_down_update_strategy.cpp:327)
==5174==    by 0x45BD6E9: KisImageUpdater::startUpdate(KisSharedPtr<KisNode>, QRect const&) (kis_projection.cc:165)
==5174==    by 0x45BD84D: KisImageUpdater::qt_metacall(QMetaObject::Call, int, void**) (kis_projection.moc:132)
==5174==    by 0x41A233A: QMetaCallEvent::placeMetaCall(QObject*) (qobject.cpp:477)
==5174==  Address 0x1f is not stack'd, malloc'd or (recently) free'd
KCrash: Application 'krita' crashing...
sock_file=/home/cyrille/.kde/socket-blade/kdeinit4__0
==5174==
==5174== ERROR SUMMARY: 3586632 errors from 42 contexts (suppressed: 3852 from 8)
==5174== malloc/free: in use at exit: 96,976,401 bytes in 574,721 blocks.
==5174== malloc/free: 3,714,117 allocs, 3,139,396 frees, 730,725,630 bytes allocated.
==5174== For counts of detected errors, rerun with: -v
==5174== Use --track-origins=yes to see where uninitialised values come from
==5174== searching for pointers to 574,721 not-freed blocks.
==5174== checked 144,213,428 bytes.
==5174==
==5174== LEAK SUMMARY:
==5174==    definitely lost: 460,305 bytes in 11,403 blocks.
==5174==      possibly lost: 1,046,081 bytes in 10,298 blocks.
==5174==    still reachable: 95,470,015 bytes in 553,020 blocks.
==5174==         suppressed: 0 bytes in 0 blocks.
==5174== Rerun with --leak-check=full to see details of leaked memory.
zsh: killed     valgrind krita
1:15 cyrille@blade ~/kde4%


_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Parent Message unknown Re: koffice/krita/image

by Boudewijn Rempt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 25 September 2009, Dmitry Kazakov wrote:

> Already fixed in my patch.

We need to discuss this patch -- given that there's another beta and that it
seems that the proper fix for the projection issues needs this work (or else
would conflict with this work), we might want to apply this in time for the
beta release. And if that makes it possible to enable the pyramid (did I
understand correctly that the pyramid is dependent on this work?), I think we
should aim for that, too. Using the pyramid will likely fix
https://bugs.kde.org/show_bug.cgi?id=208141, since that seems an out-of-memory
error caused by the QImage cache.

So -- could you give us a high-level overview of what you've done, and a todo-
list?
--
Boudewijn Rempt | http://www.valdyas.org
_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Bugzilla from dimula73@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Already fixed in my patch.

We need to discuss this patch -- given that there's another beta and that it
seems that the proper fix for the projection issues needs this work (or else
would conflict with this work), we might want to apply this in time for the
beta release.

 
And if that makes it possible to enable the pyramid (did I
understand correctly that the pyramid is dependent on this work?),

It is dependent on the third part of the work - synchronization and scheduling =)
More than that, after adding synchronization, i'll have to port the scheduler to kis_view to parallelize pyramid at the higher level, as it's quite slow now.
 
I think we
should aim for that, too. Using the pyramid will likely fix
https://bugs.kde.org/show_bug.cgi?id=208141, since that seems an out-of-memory
error caused by the QImage cache.

I'm not sure the bug is related to OOM and to projection cache at all. There are the following reasons:
1) It happens on the side of KisImage, not on the side of KisView2.
2) I can't imagine OOM case on any modern system. 2000px as was said in the bug report is about 2000x3000*4 (rgba - CS of QImage), that is about 24 megabytes. That is too small to cause any sane OOM.
3) [and most probable] The backtrace is almost identical to https://bugs.kde.org/show_bug.cgi?id=205210, that is surely NOT OOM bug.

 
So -- could you give us a high-level overview of what you've done, and a todo-
list?

I've not finished it yet. Hope, i'll finish it today.



--
Dmitry Kazakov

_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Parent Message unknown Re: koffice/krita/image

by Bugzilla from dimula73@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Sat, Sep 26, 2009 at 10:11 AM, Boudewijn Rempt <boud@...> wrote:
SVN commit 1028181 by rempt:

Fix layer test

We used to leak the KisProjection, which meant that for every image opened
and closed we would leave a thread with an eventloop running. However, stopping
that thread reliably is quite hard, so try really hard to stop it.

 M  +3 -1      kis_image.cc
 M  +11 -1     kis_projection.cc
 M  +1 -0      kis_projection.h
 M  +4 -0      tests/kis_layer_test.cpp

 
+void KisProjection::stop()
+{
+    quit();
+    while(isRunning()) {
+        qApp->processEvents();
+    }
+    setTerminationEnabled(true);
+    terminate();
+}
+

This 'while' loop with processEvents() causes infinite loop in KisCropVisitorTest. Please check this! =)

 


--
Dmitry Kazakov

_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Parent Message unknown Re: koffice/krita/image

by Boudewijn Rempt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 02 October 2009, you wrote:

> SVN commit 1030020 by rempt:
>
> fix convolution based filters and masks
>
>  M  +6 -1      kis_mask.cc
>
>
> --- trunk/koffice/krita/image/kis_mask.cc #1030019:1030020
> @@ -111,8 +111,13 @@
>         KisPaintDeviceSP cacheDevice =
>             new KisPaintDevice(projection->colorSpace());
>
> +        // some filters only write out selected or affected pixels to dst,
> so copy
> +        KisPainter p1(cacheDevice);
> +
>  p1.setCompositeOp(cacheDevice->colorSpace()->compositeOp(COMPOSITE_COPY));
> +        p1.bitBlt(rc.topLeft(), projection, rc);
> +        p1.end();
> +
>         KisPainter gc(projection);
> -        //gc.beginTransaction("");
>         QRect updatedRect = decorateRect(projection, cacheDevice, rc);
>
>         /**
>

I'll cc the the mailing list, since this is a broader issue.

> Could you explain me how does this change help blur filter?

Not really, maybe Cyrille can -- it's something to do with the convolution
painter.

> The point is, we can't do a bitBlt() here as needRect of the filter might
>  be much bigger than actual rc, given to this function. Actual needRect is
>  calculated in KisLayer::updateProjection and is know only there.

Maybe it's better to have it in kis_filter_mask instead? For now it's
unfortunately needed, and I think a refactor of this thing should wait until
2.2.

> Why does a filter needs a destination device to be prepared? Doesn't it
>  mean that the filter reads source information from it?

Not necessarily, the reason why the dst device needs to be a copy of the src
device is that not all filters copy all pixels, even the ones they don't
touch, to the dst device.

--
Boudewijn Rempt | http://www.valdyas.org
_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Parent Message unknown Re: koffice/krita/image

by Boudewijn Rempt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Moving discussion to the mailing list again...


> > I'll cc the the mailing list, since this is a broader issue.
> >
> > > Could you explain me how does this change help blur filter?
> >
> > Not really, maybe Cyrille can -- it's something to do with the
> > convolution painter.
>
> Cyrille, ping!
>
> > > The point is, we can't do a bitBlt() here as needRect of the filter
> > > might be much bigger than actual rc, given to this function. Actual
> > > needRect
> >
> > is
> >
> > >  calculated in KisLayer::updateProjection and is know only there.
> >
> > Maybe it's better to have it in kis_filter_mask instead? For now it's
> > unfortunately needed, and I think a refactor of this thing should wait
> > until
> > 2.2.
>
> Unfortunately, not. NeedRects of all the masks have to be be calculated
> together. Take a look at KisLayer::masksChangeRect/masksNeedRect functions.

Fortunately, it works for those filters that need a copy, namely the
convolution filters.


> It means that filters do not conform KisFilter's interface of src and dst.
> And we shouldn't introduce workaround for it. We just need to make the
> filter follow the rules and fix it =) (i hope, blur filter is the only
>  one?)

All convolution filters have the same problem. It's not a problem with the
filters per se, but with the convolution painter.


--
Boudewijn Rempt | http://www.valdyas.org
_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Bugzilla from dimula73@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Fri, Oct 2, 2009 at 5:12 PM, Boudewijn Rempt <boud@...> wrote:
Moving discussion to the mailing list again...


> > I'll cc the the mailing list, since this is a broader issue.
> >
> > > Could you explain me how does this change help blur filter?
> >
> > Not really, maybe Cyrille can -- it's something to do with the
> > convolution painter.
>
> Cyrille, ping!
>
> > > The point is, we can't do a bitBlt() here as needRect of the filter
> > > might be much bigger than actual rc, given to this function. Actual
> > > needRect
> >
> > is
> >
> > >  calculated in KisLayer::updateProjection and is know only there.
> >
> > Maybe it's better to have it in kis_filter_mask instead? For now it's
> > unfortunately needed, and I think a refactor of this thing should wait
> > until
> > 2.2.
>
> Unfortunately, not. NeedRects of all the masks have to be be calculated
> together. Take a look at KisLayer::masksChangeRect/masksNeedRect functions.

Fortunately, it works for those filters that need a copy, namely the
convolution filters.

It depends on a type of a bug inside convolution painter. If it reads out of dst device, then we'll get the same border-effect problem that i have been fixing for about a month. If it just uses dst as a default value, it'll work, but we can get even more subtle problems in the future, like a difference between changeRect of a filter and rc-value transmitted to the decorateRect() function.
 
> It means that filters do not conform KisFilter's interface of src and dst.
> And we shouldn't introduce workaround for it. We just need to make the
> filter follow the rules and fix it =) (i hope, blur filter is the only
>  one?)

All convolution filters have the same problem. It's not a problem with the
filters per se, but with the convolution painter.

damn!
Well, Boud, isn't it easier to fix a bug in convolution painter than to create a garbage from our KisLayer/Mask code?
 

PS:
I simply can't understand, why are you going to fix KisLayer and KisMask, if you know exactly that real problem is inside KisConvolutionPainter?

I don't understand something, do i?

--
Dmitry Kazakov

_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Boudewijn Rempt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 02 October 2009, Dmitry Kazakov wrote:

> It depends on a type of a bug inside convolution painter. If it reads out
> of dst device, then we'll get the same border-effect problem that i have
> been fixing for about a month. If it just uses dst as a default value,
> it'll work, but we can get even more subtle problems in the future, like a
> difference between changeRect of a filter and rc-value transmitted to the
> decorateRect() function.

Since originally the paint device we were writing to was empty, that shouldn't
matter. Most filters will overwrite everything, for the others it won't
matter, should it?

> damn!

Please work from a basic assumption of competence in the rest of the team,
i.e., assume we know what we are doing with the code we have been working on
for years. I'd like this project to stay a friendly place.

> Well, Boud, isn't it easier to fix a bug in convolution painter than to
> create a garbage from our KisLayer/Mask code?

No, definitely not. I took a look at the code of the convolution painter and
couldn't find any reason for this behaviour.

Besides, this commit makes the way the filter mask applies filters consistent
with the way the manual filter application works and so offers a better
starting point for refactoring after the release.

> PS:
> I simply can't understand, why are you going to fix KisLayer and KisMask,
>  if you know exactly that real problem is inside KisConvolutionPainter?

I do not know what the problem is in the convolution painter.

> I don't understand something, do i?

Besides, there is nothing in the api of KisFilter that explicitly declares
that filters always need to write all pixels, changed an unchanged to dst, so
dst should be prepared with a copy of src.

Whether that is a good api or not, I don't have an opinion about: I'll let you
and Cyrille discuss that. We have had a single-paint device api before, and
that didn't work out either.

--
Boudewijn Rempt | http://www.valdyas.org
_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Cyrille Berger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 02 October 2009, Boudewijn Rempt wrote:
> We have had a single-paint device api before, and  that didn't work out
> either.
I think it was at a time when copying data was (considered) too expensive. But
the src,dst has always been just half working. That's why, I think it's worth
to have single-paint device and investigate cheap copying of data (or even
better, no copy at all with shared tiles).

--
Cyrille Berger
_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Bugzilla from dimula73@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Fri, Oct 2, 2009 at 6:00 PM, Boudewijn Rempt <boud@...> wrote:
On Friday 02 October 2009, Dmitry Kazakov wrote:

> It depends on a type of a bug inside convolution painter. If it reads out
> of dst device, then we'll get the same border-effect problem that i have
> been fixing for about a month. If it just uses dst as a default value,
> it'll work, but we can get even more subtle problems in the future, like a
> difference between changeRect of a filter and rc-value transmitted to the
> decorateRect() function.

Since originally the paint device we were writing to was empty, that shouldn't
matter. Most filters will overwrite everything, for the others it won't
matter, should it?

Do you mean that for most of the filters this bitBlt() is simply a waste of time, right? ;)

We do already have several bitBlts during one merge operation, i think this one is superfluous.
If a filter doesn't want to write to some area he should declare this with changeRect() function, but not just not write there.


 

> damn!

Please work from a basic assumption of competence in the rest of the team,
i.e., assume we know what we are doing with the code we have been working on
for years. I'd like this project to stay a friendly place.

Sorry. I was wrong.

I just want Krita's code to be clean and understandable. And i don't want to see any crutches there. I think if some (old) code is broken it should be fixed or disabled. And we mustn't break any new code too, only for the reason of "giving a crutch to the old one".
I'm continuously trying to explain this idea... And it seems that i fail... :(

 
> Well, Boud, isn't it easier to fix a bug in convolution painter than to
> create a garbage from our KisLayer/Mask code?

No, definitely not. I took a look at the code of the convolution painter and
couldn't find any reason for this behaviour.

Have you got the proof of wrong behavior of convolution painter?

 
Besides, this commit makes the way the filter mask applies filters consistent
with the way the manual filter application works and so offers a better
starting point for refactoring after the release.

hmm.. What do you mean by "manual filter application"? I thought if we apply a filter directly through Filters-menu they are added as a TemporaryMask and merged to the layer then, aren't they?

 
> PS:
> I simply can't understand, why are you going to fix KisLayer and KisMask,
>  if you know exactly that real problem is inside KisConvolutionPainter?

I do not know what the problem is in the convolution painter.

=)
 
> I don't understand something, do i?

Besides, there is nothing in the api of KisFilter that explicitly declares
that filters always need to write all pixels, changed an unchanged to dst, so
dst should be prepared with a copy of src.

Quite illogic, i think. Every process-unit has in-point and out-point. It reads from in- and writes to out-point. And no pre-assumptions.

 
Whether that is a good api or not, I don't have an opinion about: I'll let you
and Cyrille discuss that. We have had a single-paint device api before, and
that didn't work out either.

I don't think it's good to have one, especially if we continue using bitBlt for selections.
In such a case we'll have four loops through entire rc instead of three.

"double-paintdevice" loops:
1-st - bitBlt'ing an image in KisLayer::applyMasks
2-nd - KisFilter's loop ( src ----filtering----> dst )
3-rd - bitBlt'ing in KisMask::apply() to take a selection into account

"single-paintdevice" loops:
1-st - bitBlt'ing an image in KisLayer::applyMasks
2-nd - bitBlt'in in KisImage to leave an original copy untouched by a filter (for applying a selection then)
3-rd - KisFilter's loop ( src ----filtering----> src )
4-th- bitBlt'ing in KisMask::apply() to take a selection into account

 

--
Dmitry Kazakov

_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Bugzilla from dimula73@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Fri, Oct 2, 2009 at 6:19 PM, Cyrille Berger <cberger@...> wrote:
On Friday 02 October 2009, Boudewijn Rempt wrote:
> We have had a single-paint device api before, and  that didn't work out
> either.
I think it was at a time when copying data was (considered) too expensive. But
the src,dst has always been just half working.


What do you mean by "half-working"?




cheap copying of data (or even
better, no copy at all with shared tiles).

Cheap copying can be easily done by tile-manager (at least in tiles3). Especially if we needn't set extent() of a newly created device exactly. I mean, if we ask to copy some rect, for example (10,10 60x60), we can easily copy a bit more than was requested (0,0 128x128). This operation will simply create a set of shared tiles, those will be pre-cached by a tile-pooler quite fast.

We could call those operations like:
cloneDevice(QRect rc) - can clone a bit more
cloneDeviceExactly(QRect rc) - crops the area that was not requested.



BUT, there is a heavy disadvantage in this ("easy duplication") approach.

Clone operation will still be quite expensive, because of creation of a hash-table. It's size is quite big now and it's tends to be even bigger in the future. It is >8192 bytes on 32-bit and >16386 bytes on 64-bit machine now. Just imagine, to make a copy of a couple of pixels, you'll have to allocate that much.


Well, it doesn't mean that we shouldn't use shared copies at all, it just means that we should think well before introducing yet another clone of data and try to eliminate them at all.




--
Dmitry Kazakov

_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Boudewijn Rempt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 02 October 2009, Dmitry Kazakov wrote:

> Do you mean that for most of the filters this bitBlt() is simply a waste of
> time, right? ;)

Yes. Unfortunately, most of the filters _are_ convolution filters or otherwise
broken (like the old artistic filters). I briefly considered, way back, to add
a flag to indicate this sort of brokenness, needsCopy() or something like
that, but decided that that would just be compounding the problem.

> We do already have several bitBlts during one merge operation, i think this
> one is superfluous.

It makes blur work in 2.1, so it's pretty useful :-)

> If a filter doesn't want to write to some area he should declare this with
> changeRect() function, but not just not write there.

The area where a filter doesn't write isn't always a rect. Look at the funny
results of the raindrops filter we had previously:
http://rempt.xs4all.nl/fading/index.cgi/hacking/krita/amusing.comments.

> > > damn!

> I just want Krita's code to be clean and understandable. And i don't want
>  to see any crutches there. I think if some (old) code is broken it should
>  be fixed or disabled. And we mustn't break any new code too, only for the
>  reason of "giving a crutch to the old one".

That depends a lot on the phase of the project: we're now trying to stabilize
2.1 and get it ready for release. That means really big refactorings are
really risky, so I'm not prepared to go for a refactoring of the filter api.
After 2.1 is branched, I'll happily consider any refactoring scheme again.

I'm totally happy with placing a big "XXX!!! Why do we need this copy! Fix
after 2.1" in both places where we do this copy.

> I'm continuously trying to explain this idea... And it seems that i fail...

Well, sometimes you're expressing yourself a little forcefully, which leads to
friction. And remember the prime rule of software development: there is always
life after the release!

> Have you got the proof of wrong behavior of convolution painter?

I haven't yet written a unittest for it, no. I was too busy actually fixing
other bugs.

> hmm.. What do you mean by "manual filter application"? I thought if we
>  apply a filter directly through Filters-menu they are added as a
>  TemporaryMask and merged to the layer then, aren't they?

KisFilterHandler defers to KisFilterJob which applies the filter directly. We
had the idea once to simply swap projection and original if there were no
other masks than the temporary mask, but that was never implemented. Also, if
we ever implement region-of-interest recomposition (i.e., recomposite only the
visible area) that will fail.

> I don't think it's good to have one, especially if we continue using bitBlt
> for selections.

I'm fine with any discussions on improving this after 2.1 -- there are still
44 bugs to fix first. After 2.1, I'll probably be happy with anything you and
Cyrille agree on since my main task will be finishing the paintop preset
saving and loading and general performance tuning.
--
Boudewijn Rempt | http://www.valdyas.org
_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Bugzilla from dimula73@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Sat, Oct 3, 2009 at 12:12 PM, Boudewijn Rempt <boud@...> wrote:
On Friday 02 October 2009, Dmitry Kazakov wrote:

> Do you mean that for most of the filters this bitBlt() is simply a waste of
> time, right? ;)

Yes. Unfortunately, most of the filters _are_ convolution filters

like colorsfilters, right? :p
 
or otherwise
broken (like the old artistic filters). I briefly considered, way back, to add
a flag to indicate this sort of brokenness, needsCopy()

no-no-no =) Just fix that.
 
or something like
that, but decided that that would just be compounding the problem.

> We do already have several bitBlts during one merge operation, i think this
> one is superfluous.

It makes blur work in 2.1, so it's pretty useful :-)

> If a filter doesn't want to write to some area he should declare this with
> changeRect() function, but not just not write there.

The area where a filter doesn't write isn't always a rect. Look at the funny
results of the raindrops filter we had previously:
http://rempt.xs4all.nl/fading/index.cgi/hacking/krita/amusing.comments.

The filter can check whether dst==src and optimize it's work... Just an idea...


 
> > > damn!

> I just want Krita's code to be clean and understandable. And i don't want
>  to see any crutches there. I think if some (old) code is broken it should
>  be fixed or disabled. And we mustn't break any new code too, only for the
>  reason of "giving a crutch to the old one".

That depends a lot on the phase of the project: we're now trying to stabilize
2.1 and get it ready for release.

The code should be clean and tidy all the time, not depending on the phase of the Moon =) Otherwise it will never be good.
And, i think, there is no reason to be stabilizing code for several months, and then refactor it completely right after release to make it unstable again. There is no reason to make the same work twice. The code should be clean since the beginning.
 
That means really big refactorings are
really risky, so I'm not prepared to go for a refactoring of the filter api.
After 2.1 is branched, I'll happily consider any refactoring scheme again.

Filter api is absolutely ok. KisConvolutionPainter simply has a bug, and you are suggesting to fix a mask to hide this problem.
 

I'm totally happy with placing a big "XXX!!! Why do we need this copy! Fix
after 2.1" in both places where we do this copy.

Please do this.


 
> I'm continuously trying to explain this idea... And it seems that i fail...

Well, sometimes you're expressing yourself a little forcefully, which leads to
friction. And remember the prime rule of software development: there is always
life after the release!

"Never put off till tomorrow what you can do today". Hiding a problem is even worse.
 
 
> Have you got the proof of wrong behavior of convolution painter?

I haven't yet written a unittest for it, no. I was too busy actually fixing
other bugs.

> hmm.. What do you mean by "manual filter application"? I thought if we
>  apply a filter directly through Filters-menu they are added as a
>  TemporaryMask and merged to the layer then, aren't they?

KisFilterHandler defers to KisFilterJob which applies the filter directly. We
had the idea once to simply swap projection and original if there were no
other masks than the temporary mask, but that was never implemented. Also, if
we ever implement region-of-interest recomposition (i.e., recomposite only the
visible area) that will fail.

We should join "manual" application and masks application. That is another code duplication.


--
Dmitry Kazakov

_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Cyrille Berger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 02 October 2009, Dmitry Kazakov wrote:

> "double-paintdevice" loops:
> 1-st - bitBlt'ing an image in KisLayer::applyMasks
> 2-nd - KisFilter's loop ( src ----filtering----> dst )
> 3-rd - bitBlt'ing in KisMask::apply() to take a selection into account
>
> "single-paintdevice" loops:
> 1-st - bitBlt'ing an image in KisLayer::applyMasks
> 2-nd - bitBlt'in in KisImage to leave an original copy untouched by a
>  filter (for applying a selection then)
> 3-rd - KisFilter's loop ( src ----filtering----> src )
> 4-th- bitBlt'ing in KisMask::apply() to take a selection into account
Keep in mind that with double-paintdevice we iterate twice, and can't use
KisRectIterator but have to use the much slower KisH/VLineIterator (until they
are fixed to cache tiles, but I am rather sure the Rect one will remains
fater).
And I also said that we need to investigate making copy cheaper, with for
instance copy-on-write tiles for when you clone paint device, but could
probably be usefull when bitBlting a copy. So the 2nd, could just be made by
having a PaintDevice pointing to the old tiles, and I expect that operation to
be reasonnably cheap.

I have been a strong advocate of the src/dst API, based on the assumption that
copying was expensive, and that for features such as masks or paint with filter
the copying would be a burden. But now, based on the experience we have build
with that API, I see significant drawback:
1) not possible to use KisRectIterator
2) double the number of tiles retrieval (or even mutliply the number of
retrieval by 2*64 for the current non optimized KisH/VLineIterator)
3) confusing API, since iterators already include a src/dst mechanism with the
oldRawData/rawData functions, and as we can see it, making filters work
correctly with that API is quiet difficult

The drawback of having single-src:
1) the need to first copy the data

But if copy get cheap, and I trully think it can be cheap, then I think we can
get significant improvement. Both API and performance wise.

--
Cyrille Berger
_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop

Re: koffice/krita/image

by Bugzilla from dimula73@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Keep in mind that with double-paintdevice we iterate twice, and can't use
KisRectIterator but have to use the much slower KisH/VLineIterator (until they
are fixed to cache tiles, but I am rather sure the Rect one will remains
fater).

Hm.. Maybe you are right, though i don't understand you fully =)

If you have a single-paintdevice system, nevertheless you have to create _two_ iterators: one for read and one for write, what is the difference with double-paintdevice system? Could you explain it a bit more?

 
And I also said that we need to investigate making copy cheaper, with for
instance copy-on-write tiles for when you clone paint device, but could
probably be usefull when bitBlting a copy. So the 2nd, could just be made by
having a PaintDevice pointing to the old tiles, and I expect that operation to
be reasonnably cheap.

Ermm.. That is exactly the thing i was writing two letters above :)

We can't make it infinitely cheaper, because _creation_ of a datamanager object is quite expensive operation itself (because of initial creation of a hash table (see two letters above)).


Adding shared tiles to a bitBlt operation is an extremely good idea, but it should take into account colorspaces. Do you have an idea how to solve this?
(we could discuss it on sprint)


 
I have been a strong advocate of the src/dst API, based on the assumption that
copying was expensive, and that for features such as masks or paint with filter
the copying would be a burden. But now, based on the experience we have build
with that API, I see significant drawback:
1) not possible to use KisRectIterator

Isn't it possible to fix KisRectIterator instead?

 
2) double the number of tiles retrieval (or even mutliply the number of
retrieval by 2*64 for the current non optimized KisH/VLineIterator)

How is it connected to an API? Could you explain?
 
3) confusing API, since iterators already include a src/dst mechanism with the
oldRawData/rawData functions, and as we can see it, making filters work
correctly with that API is quiet difficult

oldRawData/rawData are not src/dst really. They are oldRawData and rawData actually! :)

 
The drawback of having single-src:
1) the need to first copy the data

But if copy get cheap, and I trully think it can be cheap, then I think we can
get significant improvement. Both API and performance wise.

Please read above.
But in this very case, cheap copy would help, because we already create additional paintDevice nevertheless.

--
Dmitry Kazakov

_______________________________________________
kimageshop mailing list
kimageshop@...
https://mail.kde.org/mailman/listinfo/kimageshop