[krita] [Bug 411536] Weird resize crash only when specific values are used

2019-09-13 Thread Dmitry Kazakov
https://bugs.kde.org/show_bug.cgi?id=411536

Dmitry Kazakov  changed:

   What|Removed |Added

  Latest Commit|https://invent.kde.org/kde/ |https://invent.kde.org/kde/
   |krita/commit/0f9c5472581252 |krita/commit/9be377ae3fe84d
   |a6c5e34ec912a292138d960ef8  |8baa1cfa11b95dfdcc5adf4d33

--- Comment #6 from Dmitry Kazakov  ---
Git commit 9be377ae3fe84d8baa1cfa11b95dfdcc5adf4d33 by Dmitry Kazakov.
Committed on 13/09/2019 at 09:00.
Pushed by dkazakov into branch 'krita/4.2'.

Fix crash after cropping a specific image

This patch ends the era of the custom "empty extent" value
QRect(quint32_MAX, quint32_MAX, 0, 0). When I started refactoring
tile engine ten years ago in 2009, this "empty extent" flag was
already present. It was just a result of the way how extent was
calculated those days. I guess it was also considered as
an "optimization", or as "a flag" that could ease debugging a bit
(and it actually did help debugging a couple of times).

Years passed by and I considered to remove this custom value multiple
times. It was always causing troubles, because the QRect is not safe
against integer oveflows. But the problem was, there was code outside
tiles engine that relied on this behavior. So I was always scared of
the actual removal. Even when the tile engine was rewritten again
to become lockfree in 2017, I insisted on keeping the old behavior...

So, it looks like now all code that relies on this custom value is gone,
so it should be safe to remove it.

Funny side, I guess it was one of few artifacts that were still kept
in Krita since 'tiles' and 'tiles_new' days (has anyone ever wondered
why the engine's folder is called 'tiles3'?) ;)

M  +9-9libs/image/tests/kis_iterator_test.cpp
M  +11   -11   libs/image/tests/kis_iterators_ng_test.cpp
M  +10   -10   libs/image/tiles3/KisTiledExtentManager.cpp
M  +14   -4libs/image/tiles3/kis_memento.h
M  +1-1libs/image/tiles3/tests/kis_tiled_data_manager_test.cpp

https://invent.kde.org/kde/krita/commit/9be377ae3fe84d8baa1cfa11b95dfdcc5adf4d33

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 411536] Weird resize crash only when specific values are used

2019-09-06 Thread Dmitry Kazakov
https://bugs.kde.org/show_bug.cgi?id=411536

Dmitry Kazakov  changed:

   What|Removed |Added

  Latest Commit||https://invent.kde.org/kde/
   ||krita/commit/0f9c5472581252
   ||a6c5e34ec912a292138d960ef8
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #5 from Dmitry Kazakov  ---
Git commit 0f9c5472581252a6c5e34ec912a292138d960ef8 by Dmitry Kazakov.
Committed on 06/09/2019 at 13:46.
Pushed by dkazakov into branch 'master'.

Fix crash after cropping a specific image

This patch ends the era of the custom "empty extent" value
QRect(quint32_MAX, quint32_MAX, 0, 0). When I started refactoring
tile engine ten years ago in 2009, this "empty extent" flag was
already present. It was just a result of the way how extent was
calculated those days. I guess it was also considered as
an "optimization", or as "a flag" that could ease debugging a bit
(and it actually did help debugging a couple of times).

Years passed by and I considered to remove this custom value multiple
times. It was always causing troubles, because the QRect is not safe
against integer oveflows. But the problem was, there was code outside
tiles engine that relied on this behavior. So I was always scared of
the actual removal. Even when the tile engine was rewritten again
to become lockfree in 2017, I insisted on keeping the old behavior...

So, it looks like now all code that relies on this custom value is gone,
so it should be safe to remove it.

Funny side, I guess it was one of few artifacts that were still kept
in Krita since 'tiles' and 'tiles_new' days (has anyone ever wondered
why the engine's folder is called 'tiles3'?) ;)

M  +9-9libs/image/tests/kis_iterator_test.cpp
M  +11   -11   libs/image/tests/kis_iterators_ng_test.cpp
M  +10   -10   libs/image/tiles3/KisTiledExtentManager.cpp
M  +14   -4libs/image/tiles3/kis_memento.h
M  +1-1libs/image/tiles3/tests/kis_tiled_data_manager_test.cpp

https://invent.kde.org/kde/krita/commit/0f9c5472581252a6c5e34ec912a292138d960ef8

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 411536] Weird resize crash only when specific values are used

2019-09-06 Thread Dmitry Kazakov
https://bugs.kde.org/show_bug.cgi?id=411536

--- Comment #4 from Dmitry Kazakov  ---
The crash happens because the second "scale" actually scales into exactly the
same pixel size. So there might be some division-by-small-value or something.

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 411536] Weird resize crash only when specific values are used

2019-09-06 Thread Dmitry Kazakov
https://bugs.kde.org/show_bug.cgi?id=411536

Dmitry Kazakov  changed:

   What|Removed |Added

 Status|CONFIRMED   |ASSIGNED

--- Comment #3 from Dmitry Kazakov  ---
The crash looks funny, let's check it :)

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 411536] Weird resize crash only when specific values are used

2019-09-03 Thread Dmitry Kazakov
https://bugs.kde.org/show_bug.cgi?id=411536

Dmitry Kazakov  changed:

   What|Removed |Added

 CC||dimul...@gmail.com
   Assignee|krita-bugs-n...@kde.org |dimul...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 411536] Weird resize crash only when specific values are used

2019-09-03 Thread Boudewijn Rempt
https://bugs.kde.org/show_bug.cgi?id=411536

Boudewijn Rempt  changed:

   What|Removed |Added

 Status|REPORTED|CONFIRMED
 CC||b...@valdyas.org
 Ever confirmed|0   |1

--- Comment #2 from Boudewijn Rempt  ---
This is the assert: 

ASSERT (krita): "row < 0x7FFF && col < 0x7FFF" in file
/home/boud/dev/krita/libs/image/tiles3/kis_tile_hash_table2.h, line 133
KCrash: crashing... crashRecursionCounter = 2
KCrash: Application Name = krita path = /home/boud/dev/i-krita/bin pid = 28237
KCrash: Arguments: /home/boud/dev/i-krita/bin/krita
/home/boud/Downloads/1.41[√2]_420x297mmA3[4962x3509px].kra 
KCrash: Attempting to start /usr/lib/x86_64-linux-gnu/libexec/drkonqi from
kdeinit
sock_file=/run/user/1000/kdeinit5__0
Unable to start Dr. Konqi
Re-raising signal for core dump handling.
Segmentation fault (core dumped)

This is the backtrace: 

0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
#1  0x72875801 in __GI_abort () at abort.c:79
#2  0x7324af2b in QMessageLogger::fatal(char const*, ...) const ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x74ba7858 in kis_assert_common(char const*, char const*, int,
bool, bool) ()
at /usr/include/x86_64-linux-gnu/qt5/QtCore/qarraydata.h:208
#4  0x74ba7c9a in kis_assert_recoverable (
assertion=assertion@entry=0x756ef722 "row < 0x7FFF && col < 0x7FFF", 
file=file@entry=0x756ef5e0
"/home/boud/dev/krita/libs/image/tiles3/kis_tile_hash_table2.h", 
line=line@entry=133) at /home/boud/dev/krita/libs/global/kis_assert.cpp:106
#5  0x75329e00 in KisTileHashTableTraits2::calculateHash
(this=0x6263cc40, row=33554431, 
col=33554431) at /usr/include/c++/8/bits/atomic_base.h:295
#6  KisTileHashTableTraits2::getReadOnlyTileLazy (this=0x6263cc40,
col=33554431, row=33554431, 
existingTile=@0x7fff7b7fd610: true) at
/home/boud/dev/krita/libs/image/tiles3/kis_tile_hash_table2.h:379
#7  0x7534104e in KisTiledDataManager::getTile (writable=, row=33554431, col=33554431, 
this=0x621daee0) at
/home/boud/dev/krita/libs/image/tiles3/kis_tiled_data_manager.h:128
#8  KisTiledDataManager::getTilesPair (oldTile=0x670f0f78,
tile=0x670f0f70, writable=, 
row=33554431, col=33554431, this=0x621daee0)
at /home/boud/dev/krita/libs/image/tiles3/kis_tiled_data_manager.h:107
#9  KisRandomAccessor2::fetchTileData(int, int) ()
at /home/boud/dev/krita/libs/image/tiles3/kis_random_accessor.cc:122
#10 0x7534179a in KisRandomAccessor2::moveTo(int, int) ()
at /home/boud/dev/krita/libs/image/tiles3/kis_random_accessor.cc:89
#11 0x75341d23 in
KisRandomAccessor2::KisRandomAccessor2(KisTiledDataManager*, int, int, int,
int, bool, KisIteratorCompleteListener*) () at
/home/boud/dev/krita/libs/image/tiles3/kis_random_accessor.cc:38
#12 0x755b7c5f in
KisPaintDevice::Private::KisPaintDeviceStrategy::createRandomConstAccessorNG (
this=, x=-2147483648, y=-2147483648)
at /home/boud/dev/krita/libs/image/kis_paint_device_data.h:262
#13 0x755a538b in KisPaintDevice::createRandomConstAccessorNG
(this=this@entry=0x6263c770, 
x=x@entry=-2147483648, y=y@entry=-2147483648) at
/home/boud/dev/krita/libs/image/kis_paint_device.cc:1791
#14 0x755b079f in
Impl::calculateExactBoundsImpl (
device=device@entry=0x6263c770, startRect=..., endRect=...,
compareOp=...)
at /usr/include/x86_64-linux-gnu/qt5/QtCore/qrect.h:372
#15 0x755ab72b in KisPaintDevice::calculateExactBounds(bool) const ()
at /home/boud/dev/krita/libs/image/kis_paint_device.cc:1407
#16 0x755ae8fb in KisLockFreeCache::getValue
(this=0x6263c8c0)
at /usr/include/c++/8/bits/atomic_base.h:468
#17 0x755a770a in KisPaintDeviceCache::exactBounds (this=)
at /home/boud/dev/krita/libs/image/kis_paint_device_cache.h:60
#18 KisPaintDevice::exactBounds (this=)
at /home/boud/dev/krita/libs/image/kis_paint_device.cc:1224
#19 0x7552cc0f in KisLayer::layerExtentImpl(bool) const ()
at /home/boud/dev/krita/libs/image/kis_layer.cc:956
#20 0x755c8658 in KisPaintLayer::exactBounds() const ()
at /home/boud/dev/krita/libs/image/kis_paint_layer.cc:260
#21 0x7fffb8f17aa3 in KisMoveBoundsCalculationJob::run() ()
at
/home/boud/dev/krita/plugins/tools/basictools/KisMoveBoundsCalculationJob.cpp:46
#22 0x756ecc54 in non-virtual thunk to KisUpdateJobItem::run() ()
at /usr/include/c++/8/bits/atomic_base.h:295
#23 0x732733e2 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x7326ec72 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x7fffec42f6db in start_thread (arg=0x7fff7b7fe700) at
pthread_create.c:463
#26 0x7295688f in clone () at
../sysdeps/unix/sysv/lin

[krita] [Bug 411536] Weird resize crash only when specific values are used

2019-09-02 Thread Storm Engineer
https://bugs.kde.org/show_bug.cgi?id=411536

--- Comment #1 from Storm Engineer  ---
New observations:
1. After doing the canvas resize, interacting with Layer 1 in any way also
triggers the crash.
2. If I make a brushstroke on layer 1 before canvas resize, I'm not able to
trigger the crash anymore.

-- 
You are receiving this mail because:
You are watching all bug changes.