Bug 407045 - Assert in tile manager when using the halftone filter
Summary: Assert in tile manager when using the halftone filter
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Tile manager (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression, release_blocker
Depends on:
Blocks:
 
Reported: 2019-04-29 09:33 UTC by Halla Rempt
Modified: 2019-05-01 09:26 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2019-04-29 09:33:56 UTC
The halftone filter crashes through an assert in the tile manager as soon as it's used. The crash can be reproduced manually as well as through the kis_crash_filter test.

_GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x00007ffff2908801 in __GI_abort () at abort.c:79
#2  0x00007ffff32dde7b in QMessageLogger::fatal(char const*, ...) const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff4c3080e in kis_assert_common (
    assertion=assertion@entry=0x7ffff570739b "hash != KeyTraits::NullHash", 
    file=file@entry=0x7ffff5707328 "/home/boud/dev/krita/libs/image/3rdparty/lock_free_map/leapfrog.h", 
    line=line@entry=161, throwException=throwException@entry=false, isIgnorable=isIgnorable@entry=false)
    at /home/boud/dev/krita/libs/global/kis_assert.cpp:90
#4  0x00007ffff4c3092a in kis_assert_recoverable (
    assertion=assertion@entry=0x7ffff570739b "hash != KeyTraits::NullHash", 
    file=file@entry=0x7ffff5707328 "/home/boud/dev/krita/libs/image/3rdparty/lock_free_map/leapfrog.h", 
    line=line@entry=161) at /home/boud/dev/krita/libs/global/kis_assert.cpp:103
#5  0x00007ffff533de38 in Leapfrog<ConcurrentMap<unsigned int, KisTile*, DefaultKeyTraits<unsigned int>, DefaultValueTraits<KisTile*> > >::find (table=0x7fff6811f8d0, hash=<optimized out>)
    at /home/boud/dev/krita/libs/image/3rdparty/lock_free_map/leapfrog.h:161
#6  ConcurrentMap<unsigned int, KisTile*, DefaultKeyTraits<unsigned int>, DefaultValueTraits<KisTile*> >::get (
    key=<optimized out>, this=<optimized out>)
    at /home/boud/dev/krita/libs/image/3rdparty/lock_free_map/concurrent_map.h:264
#7  KisTileHashTableTraits2<KisTile>::getTileLazy (this=0x555562f1de80, col=<optimized out>, 
    row=<optimized out>, newTile=<optimized out>)
    at /home/boud/dev/krita/libs/image/tiles3/kis_tile_hash_table2.h:320
#8  0x00007ffff534b14b in KisTiledDataManager::getTile (writable=<optimized out>, row=-16777216, col=-16777216, 
    this=0x555562f229c0) at /home/boud/dev/krita/libs/image/tiles3/kis_tiled_data_manager.h:120
#9  KisTiledDataManager::getTilesPair (oldTile=0x7fff07fff030, tile=0x7fff07fff028, writable=<optimized out>, 
    row=-16777216, col=-16777216, this=0x555562f229c0)
    at /home/boud/dev/krita/libs/image/tiles3/kis_tiled_data_manager.h:107
#10 KisHLineIterator2::fetchTileDataForCache (this=this@entry=0x7fff680089e0, kti=..., col=col@entry=-16777216, 
    row=row@entry=-16777216) at /home/boud/dev/krita/libs/image/tiles3/kis_hline_iterator.cpp:206
#11 0x00007ffff534d79c in KisHLineIterator2::KisHLineIterator2 (this=0x7fff680089e0, 
    dataManager=<optimized out>, x=<optimized out>, y=<optimized out>, w=<optimized out>, 
    offsetX=<optimized out>, offsetY=0, writable=true, competionListener=0x555562f22bc0, 
    __in_chrg=<optimized out>, __vtt_parm=<optimized out>)
    at /home/boud/dev/krita/libs/image/tiles3/kis_hline_iterator.cpp:63
#12 0x00007ffff55c50e9 in KisPaintDevice::Private::KisPaintDeviceStrategy::createHLineIteratorNG (
    this=this@entry=0x555560a71bd0, dataManager=0x555562f229c0, x=x@entry=-1073741824, y=y@entry=-1073741824, 
    w=w@entry=2147483647, offsetX=0, offsetY=0)
    at /home/boud/dev/krita/libs/image/kis_paint_device_strategies.h:92
#13 0x00007ffff55b33da in KisPaintDevice::createHLineIteratorNG (this=this@entry=0x555562f27d90, x=-1073741824, 
    y=-1073741824, w=2147483647) at /home/boud/dev/krita/libs/image/kis_paint_device.cc:1752
#14 0x00007ffff55b5ee3 in KisPaintDevice::clearSelection (this=0x555562f27d90, selection=...)
    at /home/boud/dev/krita/libs/image/kis_paint_device.cc:1806
#15 0x00007fffbe1c03a5 in KisHalftoneFilter::processImpl (this=<optimized out>, device=..., applyRect=..., 
    config=..., progressUpdater=0x7fff68005f00)
    at /home/boud/dev/krita/plugins/filters/halftone/kis_halftone_filter.cpp:172
#16 0x00007ffff6aa0ae8 in KisFilterStrokeStrategy::doStrokeCallback (this=0x55555b3ec2d0, data=<optimized out>)
    at /home/boud/dev/krita/libs/ui/tool/strokes/kis_filter_stroke_strategy.cpp:145
#17 0x00007ffff5704b03 in non-virtual thunk to KisUpdateJobItem::run() ()
   from /home/boud/dev/i-krita/lib/x86_64-linux-gnu/libkritaimage.so.18
Comment 1 Dmitry Kazakov 2019-05-01 09:26:25 UTC
Git commit 6830e66a8da1f454371c95cac355bbe7b21968a4 by Dmitry Kazakov.
Committed on 01/05/2019 at 09:25.
Pushed by dkazakov into branch 'master'.

Fix crash in halftone filter

When using pixelSelection->invert() we must ensure that selection's
default bounds object is initialized properly.

M  +1    -1    plugins/filters/halftone/kis_halftone_filter.cpp

https://invent.kde.org/kde/krita/commit/6830e66a8da1f454371c95cac355bbe7b21968a4