[krita] [Bug 466963] Filter Mask window crashes when choosing Map > Palettize

2023-06-19 Thread Dmitry Kazakov
https://bugs.kde.org/show_bug.cgi?id=466963

Dmitry Kazakov  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED
  Latest Commit||https://invent.kde.org/grap
   ||hics/krita/-/commit/62f0e49
   ||a770557c8ccf52027605eb617dc
   ||d7758d

--- Comment #3 from Dmitry Kazakov  ---
Git commit 62f0e49a770557c8ccf52027605eb617dcd7758d by Dmitry Kazakov.
Committed on 19/06/2023 at 10:52.
Pushed by dkazakov into branch 'master'.

Fix crash in Palettize filter

The patch just wraps the d-poitner structure into
std::experimental::propagate_const, which disables detaching
of the QMap on every color-swatch access.

This propagate_const is still in 'experimental' land, the patch
also includes a fallback inmplementation from Jonathan B. Coe,
from GitHub: https://github.com/jbcoe/propagate_const

A  +427  -0libs/global/3rdparty/propagate_const.h  *
A  +15   -0libs/global/KisPropagateConstWrapper.h [License: GPL(v2.0+)]
M  +1-1libs/pigment/resources/KisSwatchGroup.cpp
M  +7-2libs/pigment/resources/KisSwatchGroup.h

The files marked with a * at the end have a non valid license. Please read:
https://community.kde.org/Policies/Licensing_Policy and use the headers which
are listed at that page.


https://invent.kde.org/graphics/krita/-/commit/62f0e49a770557c8ccf52027605eb617dcd7758d

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

[krita] [Bug 466963] Filter Mask window crashes when choosing Map > Palettize

2023-04-17 Thread Bug Janitor Service
https://bugs.kde.org/show_bug.cgi?id=466963

Bug Janitor Service  changed:

   What|Removed |Added

 Status|CONFIRMED   |ASSIGNED

--- Comment #2 from Bug Janitor Service  ---
A possibly relevant merge request was started @
https://invent.kde.org/graphics/krita/-/merge_requests/1786

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

[krita] [Bug 466963] Filter Mask window crashes when choosing Map > Palettize

2023-03-29 Thread Freya Lupen
https://bugs.kde.org/show_bug.cgi?id=466963

Freya Lupen  changed:

   What|Removed |Added

 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1
 CC||penguinflyer2...@gmail.com

--- Comment #1 from Freya Lupen  ---
Confirming that the Palettize filter dialog has a tendency to stop responding
or crash, whether viewed through the Filters menu or the Filter Mask dialog, on
5.1.5 and 5.2.x. (Mostly tested on 5.2.x.)
On Windows it usually stops responding. Turning off HiDPI support seems to let
the Filter dialog work, but the Filter Mask dialog still crashes. On Linux it
sometimes works and sometimes crashes.

I tried turning HiDPI off because the backtrace while the Filter dialog hangs
shows KisIconWidget::paintEvent() calling for DPI metrics.
> frame #5: 0x7fff28362bfc Qt5Gui.dll`QWindow::devicePixelRatio() const 
> at qwindow.cpp:1322:52
> frame #6: 0x7fff5b1caf25 
> Qt5Widgets.dll`QWidget::metric(QPaintDevice::PaintDeviceMetric) const at 
> qwidget.cpp:12598:51
> frame #7: 0x7fff14d11a0f 
> libkritaui.dll`std::__1::__function::__func  std::__1::allocator, void 
> (QPainter&)>::operator()(QPainter&) [inlined] 
> QPaintDevice::devicePixelRatioF(this=0x01718d952100) const at 
> qpaintdevice.h:87:47

The Filter Mask dialog seems to crash in QMapData of KisSwatch, from
KisFilterPalettize::processImpl().
> * thread #122, stop reason = Exception 0xc005 encountered at address 
> 0x7fff09194d86: Access violation reading location 0x
>   * frame #0: 0x7fff09194d86 libkritapigment.dll`QMapData KisSwatch>::createNode(int const&, KisSwatch const&, QMapNode KisSwatch>*, bool) [inlined] int 
> std::__1::__cxx_atomic_load[abi:v15000](__a=0xfeeefeeefeeefeee, 
> __order=memory_order_relaxed) at atomic:958:12
> frame #1: 0x7fff09194d86 libkritapigment.dll`QMapData KisSwatch>::createNode(int const&, KisSwatch const&, QMapNode KisSwatch>*, bool) [inlined] std::__1::__atomic_base false>::load[abi:v15000](this=0xfeeefeeefeeefeee, __m=memory_order_relaxed) 
> const at atomic:1588:17
> frame #2: 0x7fff09194d86 libkritapigment.dll`QMapData KisSwatch>::createNode(int const&, KisSwatch const&, QMapNode KisSwatch>*, bool) [inlined] int 
> QAtomicOps::loadRelaxed(_q_value=0xfeeefeeefeeefeee) at 
> qatomic_cxx11.h:239:25
> frame #3: 0x7fff09194d86 libkritapigment.dll`QMapData KisSwatch>::createNode(int const&, KisSwatch const&, QMapNode KisSwatch>*, bool) [inlined] 
> QBasicAtomicInteger::loadRelaxed(this=0xfeeefeeefeeefeee) const at 
> qbasicatomic.h:107:45
> frame #4: 0x7fff09194d86 libkritapigment.dll`QMapData KisSwatch>::createNode(int const&, KisSwatch const&, QMapNode KisSwatch>*, bool) [inlined] 
> QtPrivate::RefCount::ref(this=0xfeeefeeefeeefeee) at qrefcount.h:55:28
> frame #5: 0x7fff09194d86 libkritapigment.dll`QMapData KisSwatch>::createNode(int const&, KisSwatch const&, QMapNode KisSwatch>*, bool) [inlined] QMap QVariant>::QMap(this=0x01c2c40d9298, other=0x01c2f629d3f8) at 
> qmap.h:631:22
> frame #6: 0x7fff09194d82 libkritapigment.dll`QMapData KisSwatch>::createNode(int const&, KisSwatch const&, QMapNode KisSwatch>*, bool) [inlined] KoColor::KoColor(this=0x01c2c40d9260, 
> rhs=0x01c2f629d3c0) at KoColor.h:54:11
> frame #7: 0x7fff09194d74 libkritapigment.dll`QMapData KisSwatch>::createNode(int const&, KisSwatch const&, QMapNode KisSwatch>*, bool) [inlined] KisSwatch::KisSwatch(this=0x01c2c40d9260, 
> (null)=0x01c2f629d3c0) at KisSwatch.h:17:27
> frame #8: 0x7fff09194d74 libkritapigment.dll`QMapData KisSwatch>::createNode(this=0x01c2c7f22ea0, k=0x01c2f629d3b8, 
> v=0x01c2f629d3c0, parent=, left=) at 
> qmap.h:231:33
> frame #9: 0x7fff09194cc9 libkritapigment.dll`QMapNode KisSwatch>::copy(this=0x01c2f629d3a0, d=0x01c2c7f22ea0) const at 
> qmap.h:259:30
> frame #10: 0x7fff09194cf0 libkritapigment.dll`QMapNode KisSwatch>::copy(this=0x01c2c3dc3e70, d=0x01c2c7f22ea0) const at 
> qmap.h:262:31
> frame #11: 0x7fff09194cf0 libkritapigment.dll`QMapNode KisSwatch>::copy(this=0x01c2fad216e0, d=0x01c2c7f22ea0) const at 
> qmap.h:262:31
> frame #12: 0x7fff09195317 libkritapigment.dll`QMap KisSwatch>::detach_helper(this=0x01c2fab47db8) at qmap.h:976:63
> frame #13: 0x7fff091939ff 
> libkritapigment.dll`KisSwatchGroup::getSwatch(int, int) const [inlined] 
> QMap::detach(this=0x01c2fab47db8) at qmap.h:361:51
> frame #14: 0x7fff091939ec 
> libkritapigment.dll`KisSwatchGroup::getSwatch(int, int) const [inlined] 
> QMap::operator[](this=0x01c2fab47db8, 
> akey=0x0082c47fe91c) at qmap.h:680:5
> frame #15: 0x7fff091939ec 
> libkritapigment.dll`KisSwatchGroup::getSwatch(this=, column=2, 
> row=0)