Bug 391368 - Gradient button in scratchpad crash
Summary: Gradient button in scratchpad crash
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Microsoft Windows Microsoft Windows
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: release_blocker
Depends on:
Blocks:
 
Reported: 2018-03-04 06:04 UTC by Scott Petrovic
Modified: 2018-03-05 10:56 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott Petrovic 2018-03-04 06:04:14 UTC
I am on my surface pro 4 building from source. Clicking the gradient button on the scratchpad is crashing krita. Dr. Mingw doesn't have anything, I attached a debugger to Krita and this is the last step I could see before my QtCreator locked up.

kis_scratch_pad.cpp: 489
Comment 1 mvowada 2018-03-04 10:01:13 UTC
I can confirm on Ubuntu. I had to reboot the OS since both Krita and the Desktop were locked.
Comment 2 wolthera 2018-03-04 13:04:11 UTC
Here on the 4.1 pre-alpha as well(master)

I think dmitry may ave made a mistake when he was fixing the filter slowdown, because they both mention the sequential iterator:

https://phabricator.kde.org/R37:907f88b9445e32425ddf384e4c99815b853bf680

Gonna assign him and release blocker to this because at the very least the scratchpad needs to have the gradient button hidden.

Thread 1 (Thread 0x7f3b50558900 (LWP 1390)):
[KCrash Handler]
#6  0x00007f3b4ab4806d in ProxyBasedProgressPolicy::setRange (maximum=1205, minimum=<optimized out>, this=<synthetic pointer>) at /home/wolthera/krita/src/libs/image/KisSequentialIteratorProgress.h:34
#7  KisSequentialIteratorBase<WritableIteratorPolicy<DevicePolicy>, DevicePolicy, ProxyBasedProgressPolicy>::KisSequentialIteratorBase (progressPolicy=..., rect=..., source=..., this=<optimized out>) at /home/wolthera/krita/src/libs/image/kis_sequential_iterator.h:209
#8  KisGradientPainter::paintGradient (this=this@entry=0x7ffc9ebc6a30, gradientVectorStart=..., gradientVectorEnd=..., repeat=<optimized out>, repeat@entry=KisGradientPainter::GradientRepeatNone, antiAliasThreshold=antiAliasThreshold@entry=0.20000000000000001, reverseGradient=reverseGradient@entry=false, applyRect=...) at /home/wolthera/krita/src/libs/image/kis_gradient_painter.cc:714
#9  0x00007f3b4ab490b6 in KisGradientPainter::paintGradient (this=this@entry=0x7ffc9ebc6a30, gradientVectorStart=..., gradientVectorEnd=..., repeat=repeat@entry=KisGradientPainter::GradientRepeatNone, antiAliasThreshold=antiAliasThreshold@entry=0.20000000000000001, reverseGradient=reverseGradient@entry=false, startx=startx@entry=0, starty=0, width=644, height=1205) at /home/wolthera/krita/src/libs/image/kis_gradient_painter.cc:615
#10 0x00007f3b4fd6c732 in KisScratchPad::fillGradient (this=0xc730ac0) at /home/wolthera/krita/src/libs/ui/widgets/kis_scratch_pad.cpp:494
#11 0x00007f3b4fefb555 in KisScratchPad::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/wolthera/krita/build/libs/ui/moc_kis_scratch_pad.cpp:131
#12 0x00007f3b4d9f6489 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007f3b4e8009e2 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f3b4e800c14 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007f3b4e8028be in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007f3b4e802a3d in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f3b4e748f88 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f3b4e709acc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f3b4e71203b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007f3b4fe21687 in KisApplication::notify (this=<optimized out>, receiver=0xc73d1e0, event=0x7ffc9ebc7160) at /home/wolthera/krita/src/libs/ui/KisApplication.cpp:601
#21 0x00007f3b4d9c93c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007f3b4e7109df in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f3b4e763350 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007f3b4e76597b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007f3b4e709acc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007f3b4e711417 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f3b4fe21687 in KisApplication::notify (this=<optimized out>, receiver=0xc3500d0, event=0x7ffc9ebc75e0) at /home/wolthera/krita/src/libs/ui/KisApplication.cpp:601
#28 0x00007f3b4d9c93c8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#29 0x00007f3b4df61ef0 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#30 0x00007f3b4df63e45 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#31 0x00007f3b4df3d8fb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#32 0x00007f3b378091ab in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#33 0x00007f3b4d9c764a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007f3b4d9d0854 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00000000004054d3 in main (argc=1, argv=0x7ffc9ebc7ef8) at /home/wolthera/krita/src/krita/main.cc:349
Comment 3 Dmitry Kazakov 2018-03-05 09:36:08 UTC
Git commit a7f3a67fed20101d5eefe2631480dd77b459f0e3 by Dmitry Kazakov.
Committed on 05/03/2018 at 09:35.
Pushed by dkazakov into branch 'master'.

Implement KoFakeProgressProxy to avoid crashes when the user is not interested in progress reporting

M  +2    -1    libs/image/KisSequentialIteratorProgress.h
M  +1    -0    libs/widgetutils/CMakeLists.txt
A  +56   -0    libs/widgetutils/KoFakeProgressProxy.cpp     [License: GPL (v2+)]
A  +47   -0    libs/widgetutils/KoFakeProgressProxy.h     [License: GPL (v2+)]

https://commits.kde.org/krita/a7f3a67fed20101d5eefe2631480dd77b459f0e3
Comment 4 Halla Rempt 2018-03-05 10:56:24 UTC
Git commit 14c2ade5f46d4ce0dbe15f0a0f835c49bd7e6d15 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 05/03/2018 at 10:56.
Pushed by rempt into branch 'krita/4.0'.

Implement KoFakeProgressProxy to avoid crashes when the user is not interested in progress reporting
(cherry picked from commit a7f3a67fed20101d5eefe2631480dd77b459f0e3)

M  +2    -1    libs/image/KisSequentialIteratorProgress.h
M  +1    -0    libs/widgetutils/CMakeLists.txt
A  +56   -0    libs/widgetutils/KoFakeProgressProxy.cpp     [License: GPL (v2+)]
A  +47   -0    libs/widgetutils/KoFakeProgressProxy.h     [License: GPL (v2+)]

https://commits.kde.org/krita/14c2ade5f46d4ce0dbe15f0a0f835c49bd7e6d15