Bug 415625 - Crash in transform tool
Summary: Crash in transform tool
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Transform (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords:
: 417176 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-12-27 23:36 UTC by Tiar
Modified: 2020-02-06 08:39 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Backtrace (21.81 KB, text/plain)
2019-12-27 23:36 UTC, Tiar
Details
Full backtrace (40.47 KB, text/plain)
2019-12-27 23:36 UTC, Tiar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiar 2019-12-27 23:36:07 UTC
Created attachment 124750 [details]
Backtrace

SUMMARY
I pressed undo and Krita crashed. Since the crash log is different from the common transform tool crash recently (all logs had the reference to boost), I believe it's a different issue.


STEPS TO REPRODUCE
I don't know how to reproduce it (yet).
I only know that I:
- made a selection
- transformed the content
- deselected
- clicked to transform again
- undid seeing that I don't have selection now
and it crashed.

SOFTWARE/OS VERSIONS
Krita master cf3682662b4d6c7796b2c248b20d3fe9077a5658
Krita

 Version: 4.3.0-prealpha (git cf36826)
 Languages: pl, pl_PL, pl
 Hidpi: true

Qt

  Version (compiled): 5.11.1
  Version (loaded): 5.11.1

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.3.7-050307-generic
  Pretty Productname: Linux Mint 19.2
  Product Type: linuxmint
  Product Version: 19.2

OpenGL Info
 
  Vendor:  "Intel Open Source Technology Center" 
  Renderer:  "Mesa DRI Intel(R) Iris(R) Plus Graphics (Ice Lake 8x8 GT2) " 
  Version:  "3.0 Mesa 19.0.8" 
  Shading language:  "1.30" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, colorSpace QSurfaceFormat::ColorSpace(DefaultColorSpace), profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile)) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, colorSpace QSurfaceFormat::ColorSpace(DefaultColorSpace), profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
     Version: 3.0
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: true 
  isQtPreferOpenGLES: false 

Hardware Information

  GPU Acceleration: auto
  Memory: 15633 Mb
  Number of Cores: 8
  Swap Location: /tmp

Current Settings

  Current Swap Location: /tmp
  Undo Enabled: 1
  Undo Stack Limit: 30
  Use OpenGL: 1
  Use OpenGL Texture Buffer: 1
  Use AMD Vectorization Workaround: 0
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 180
  Use Backup Files: 1
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Use Win8 Pointer Input: 0
  Use RightMiddleTabletButton Workaround: 0
  Levels of Detail Enabled: 1
  Use Zip64: 0



ADDITIONAL INFORMATION
Relevant parts of the backtrace:

Thread 2346 "Thread (pooled)" received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffa8f57700 (LWP 17853)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) thread apply all bt

Thread 2346 (Thread 0x7fffa8f57700 (LWP 17853)):
#0  0x00007ffff4262077 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff4243535 in __GI_abort () at abort.c:79
#2  0x00007ffff46318d7 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#3  0x00007ffff4630d59 in qt_assert_x(char const*, char const*, char const*, int) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff5a15528 in KisStroke::addJob(KisStrokeJobData*) (this=<optimized out>, data=<optimized out>) at /home/tymon/devsec/krita/libs/image/kis_stroke.cpp:84
#5  0x00007ffff5c828e2 in KisStrokesQueue::addJob(QWeakPointer<KisStroke>, KisStrokeJobData*) (this=<optimized out>, id=..., data=0x7fff70097800) at /home/tymon/devsec/krita/libs/image/kis_strokes_queue.cpp:339
#6  0x00007ffff5c8fbc0 in KisUpdateScheduler::addJob(QWeakPointer<KisStroke>, KisStrokeJobData*) (this=0x555575891c30, id=..., data=<optimized out>) at /usr/include/c++/8/bits/atomic_base.h:295
#7  0x00007ffff5cb8e2f in non-virtual thunk to KisImage::addJob(QWeakPointer<KisStroke>, KisStrokeJobData*) () at /usr/include/c++/8/bits/atomic_base.h:295
#8  0x00007ffff5b75bb2 in KisSavedMacroCommand::addCommands(QWeakPointer<KisStroke>, bool) (this=0x7fff581aef10, id=..., undo=<optimized out>) at /usr/include/c++/8/bits/atomic_base.h:295
#9  0x00007ffff5b74802 in KisSavedMacroCommand::performCancel(QWeakPointer<KisStroke>, bool) (this=<optimized out>, id=..., strokeUndo=<optimized out>) at /usr/include/c++/8/bits/atomic_base.h:295
#10 0x00007ffff5c7de85 in KisStrokeStrategyUndoCommandBased::cancelStrokeCallback() (this=0x5555724738a0) at /usr/include/c++/8/bits/atomic_base.h:295
#11 0x00007fffd495c2d5 in TransformStrokeStrategy::<lambda()>::operator() (__closure=0x7fff7001b568, __closure=0x7fff7001b568) at /home/tymon/devsec/krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp:686
#12 0x00007fffd495c2d5 in std::_Function_handler<void (), TransformStrokeStrategy::finishStrokeImpl(bool, ToolTransformArgs const&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) (__functor=...)
    at /usr/include/c++/8/bits/std_function.h:297
#13 0x00007ffff5c7e05b in KisStrokeStrategyUndoCommandBased::doStrokeCallback(KisStrokeJobData*) (this=0x5555724738a0, data=0x7fff7001b540) at /home/tymon/devsec/krita/libs/image/kis_stroke_strategy_undo_command_based.cpp:131
#14 0x00007fffd49605cc in TransformStrokeStrategy::doStrokeCallback(KisStrokeJobData*) (this=0x555572473890, data=0x7fff7001b540) at /home/tymon/devsec/krita/plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp:350
#15 0x00007ffff5e988cc in non-virtual thunk to KisUpdateJobItem::run() () at /usr/include/c++/8/bits/atomic_base.h:295
#16 0x00007ffff466af71 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff4672c87 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#18 0x00007ffff206e164 in start_thread (arg=<optimized out>) at pthread_create.c:486
#19 0x00007ffff433bdef in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

Thread 1 (Thread 0x7fffeb496800 (LWP 10725)):
#0  0x00007ffff43313c7 in ioctl () at ../sysdeps/unix/syscall-template.S:78
#1  0x00007fffe67431e8 in drmIoctl () at /usr/lib/x86_64-linux-gnu/libdrm.so.2
#2  0x00007fffe503888e in  () at /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#3  0x00007fffe502af04 in  () at /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#4  0x00007fffe5151441 in  () at /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#5  0x00007ffff6e3acb5 in Sync::getSync() () at /home/tymon/devsec/krita/libs/ui/opengl/kis_opengl_canvas2_p.h:96
#6  0x00007ffff6e3acb5 in KisOpenGLCanvas2::paintGL() (this=0x555575a26390) at /home/tymon/devsec/krita/libs/ui/opengl/kis_opengl_canvas2.cpp:411
#7  0x00007ffff5238ead in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007ffff52187d8 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007ffff51da4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff51e1ae0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff7005507 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x555575a26390, event=0x7fffffffbc10) at /home/tymon/devsec/krita/libs/ui/KisApplication.cpp:653
#12 0x00007ffff481b499 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff521137a in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff5211c37 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff5212831 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff52118bc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff5212831 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff52118bc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff5212831 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff52118bc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007ffff5212831 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff52118bc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff5212831 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff52118bc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ffff5212831 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007ffff52118bc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007ffff5212831 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff52118bc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007ffff5212831 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007ffff52118bc in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007ffff51e987c in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007ffff51e9a29 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff5200af5 in QWidgetPrivate::syncBackingStore() () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007ffff5218908 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007ffff531ef34 in QMainWindow::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007ffff587f13b in KMainWindow::event(QEvent*) (this=this@entry=0x55555acb4570, ev=ev@entry=0x5555915a5b50) at /home/tymon/devsec/krita/libs/widgetutils/xmlgui/kmainwindow.cpp:765
---Type <return> to continue, or q <return> to quit---
#37 0x00007ffff58c0839 in KXmlGuiWindow::event(QEvent*) (this=0x55555acb4570, ev=0x5555915a5b50) at /home/tymon/devsec/krita/libs/widgetutils/xmlgui/kxmlguiwindow.cpp:125
#38 0x00007ffff51da4a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007ffff51e1ae0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007ffff7005507 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x55555acb4570, event=0x5555915a5b50) at /home/tymon/devsec/krita/libs/ui/KisApplication.cpp:653
#41 0x00007ffff481b499 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x00007ffff481e48b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007ffff486db23 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#44 0x00007ffff0dded5e in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffff0ddeff8 in  () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007ffff0ddf08c in g_main_context_iteration () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007ffff486d143 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x00007fffeabace51 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#49 0x00007ffff481a16b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#50 0x00007ffff48222e2 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#51 0x0000555555e4e4ed in main (argc=<optimized out>, argv=0x7fffffffdfe8) at /home/tymon/devsec/krita/krita/main.cc:586
#52 0x00007ffff424509b in __libc_start_main (main=0x555555e4d0e0 <main>, argc=1, argv=0x7fffffffdfe8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdfd8) at ../csu/libc-start.c:308
#53 0x0000555555e4f84a in _start () at /home/tymon/devsec/krita/krita/main.cc:461
Comment 1 Tiar 2019-12-27 23:36:23 UTC
Created attachment 124751 [details]
Full backtrace
Comment 2 Halla Rempt 2020-01-08 10:06:54 UTC
Git commit 69bc2897bf9fb6b88ef4bb2754f877057c0a3ea7 by Boudewijn Rempt.
Committed on 08/01/2020 at 10:05.
Pushed by rempt into branch 'master'.

Convert Q_ASSERT to KIS_SAFE_ASSERT

This doesn't properly fix bug 415625, but the assert here in addJob
shouldn't be fatal.

M  +3    -3    libs/image/kis_stroke.cpp

https://invent.kde.org/kde/krita/commit/69bc2897bf9fb6b88ef4bb2754f877057c0a3ea7
Comment 3 Halla Rempt 2020-01-08 13:56:23 UTC
Git commit 5e5ded75c9f107ff5e1601f7d3137ce558503901 by Boudewijn Rempt.
Committed on 08/01/2020 at 13:34.
Pushed by rempt into branch 'krita/4.2'.

Convert Q_ASSERT to KIS_SAFE_ASSERT

This doesn't properly fix bug 415625, but the assert here in addJob
shouldn't be fatal.
(cherry picked from commit 69bc2897bf9fb6b88ef4bb2754f877057c0a3ea7)

M  +3    -3    libs/image/kis_stroke.cpp

https://invent.kde.org/kde/krita/commit/5e5ded75c9f107ff5e1601f7d3137ce558503901
Comment 4 Tiar 2020-01-14 22:15:18 UTC
Git commit 8ef04427c4b8e63265ab4bb3456659cf4b0d39a4 by Agata Cacko.
Committed on 14/01/2020 at 22:14.
Pushed by tymond into branch 'master'.

Initialize transform tool args when ending stroke

Before this commit, transform tool would get an
assert when switching to another tool without
any changes.
This commit removes trying to cancel the stroke
in the finishStrokeCallback() call
and initializes m_savedTransformArgs so the finishing
can happen as always.

WARNING: it probably isn't the "proper" solution
for this issue. It does work correctly, but it adds
an unnecessary undo step in the situation when cancelling
should be used instead of finishing the stroke
(for example when the user switches to transform tool
and then immediately to another tool without making any changes).
Related: bug 414672

M  +25   -0    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/kde/krita/commit/8ef04427c4b8e63265ab4bb3456659cf4b0d39a4
Comment 5 Dmitry Kazakov 2020-01-15 12:57:22 UTC
Git commit dcae8c7860efeddd5254aa6377ce75d4c9070b36 by Dmitry Kazakov.
Committed on 15/01/2020 at 12:56.
Pushed by dkazakov into branch 'master'.

Revert "Initialize transform tool args when ending stroke"

This reverts commit 8ef04427c4b8e63265ab4bb3456659cf4b0d39a4.

The patch introduces a data-loss in the following usecase:
1) Select transform tool
2) Click on the canvas to activate it
3) Press Enter to apply
4) Click again
5) Press Enter to apply again
4) Click again
5) Press Esc to cancel
6) Click again

The layer data is lost, it becomes completely blank.

M  +0    -25   plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/kde/krita/commit/dcae8c7860efeddd5254aa6377ce75d4c9070b36
Comment 6 Dmitry Kazakov 2020-01-15 15:31:30 UTC
Git commit a5d92c04c715e8c2a8a45567f17c40df4c3e1e8e by Dmitry Kazakov.
Committed on 15/01/2020 at 15:30.
Pushed by dkazakov into branch 'master'.

Fix safe assert when resetting continued transform

When we reapply the previous transform via m_initialTransformArgs we
should still make sure we initialize m_savedTransformArgs.

It might be related to a reverted commit 8ef04427c4b8e63265.

M  +2    -0    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/kde/krita/commit/a5d92c04c715e8c2a8a45567f17c40df4c3e1e8e
Comment 7 Dmitry Kazakov 2020-01-15 15:31:31 UTC
Git commit f88c8b3529816be7f2be60528955e83483a22a1b by Dmitry Kazakov.
Committed on 15/01/2020 at 15:27.
Pushed by dkazakov into branch 'master'.

Fix assert when the stroke is cancelled in endStrokeCallback()

The patch basically deprecates cancelStrokeId() functionality, which
is now replaced with MutatedStrokeJobsInterface.

We can add new jobs via normal addJob() interface only before the stroke
is finished. After finishing, only addMutatedJob() is available.

M  +0    -5    libs/image/commands_new/kis_saved_commands.cpp
M  +0    -2    libs/image/commands_new/kis_saved_commands.h
M  +1    -1    libs/image/kis_stroke.cpp
M  +0    -15   libs/image/kis_stroke_strategy.h
M  +4    -1    libs/image/kis_stroke_strategy_undo_command_based.cpp
M  +0    -4    libs/image/kis_strokes_queue.cpp

https://invent.kde.org/kde/krita/commit/f88c8b3529816be7f2be60528955e83483a22a1b
Comment 8 Halla Rempt 2020-01-28 09:50:27 UTC
Git commit 4aab942697147c1e3496fa7d4d16e5dd1a8fe99c by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 28/01/2020 at 09:09.
Pushed by rempt into branch 'krita/4.2'.

Fix assert when the stroke is cancelled in endStrokeCallback()

The patch basically deprecates cancelStrokeId() functionality, which
is now replaced with MutatedStrokeJobsInterface.

We can add new jobs via normal addJob() interface only before the stroke
is finished. After finishing, only addMutatedJob() is available.
(cherry picked from commit f88c8b3529816be7f2be60528955e83483a22a1b)

M  +0    -5    libs/image/commands_new/kis_saved_commands.cpp
M  +0    -2    libs/image/commands_new/kis_saved_commands.h
M  +1    -1    libs/image/kis_stroke.cpp
M  +0    -15   libs/image/kis_stroke_strategy.h
M  +4    -1    libs/image/kis_stroke_strategy_undo_command_based.cpp
M  +0    -4    libs/image/kis_strokes_queue.cpp

https://invent.kde.org/kde/krita/commit/4aab942697147c1e3496fa7d4d16e5dd1a8fe99c
Comment 9 Halla Rempt 2020-01-28 09:50:27 UTC
Git commit 4ec9beafc1d40205b82aa50dc6f981cc10891d0f by Boudewijn Rempt, on behalf of Agata Cacko.
Committed on 28/01/2020 at 09:09.
Pushed by rempt into branch 'krita/4.2'.

Initialize transform tool args when ending stroke

Before this commit, transform tool would get an
assert when switching to another tool without
any changes.
This commit removes trying to cancel the stroke
in the finishStrokeCallback() call
and initializes m_savedTransformArgs so the finishing
can happen as always.

WARNING: it probably isn't the "proper" solution
for this issue. It does work correctly, but it adds
an unnecessary undo step in the situation when cancelling
should be used instead of finishing the stroke
(for example when the user switches to transform tool
and then immediately to another tool without making any changes).
Related: bug 414672
(cherry picked from commit 8ef04427c4b8e63265ab4bb3456659cf4b0d39a4)

M  +25   -0    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/kde/krita/commit/4ec9beafc1d40205b82aa50dc6f981cc10891d0f
Comment 10 Halla Rempt 2020-01-28 09:50:28 UTC
Git commit de397bec02778e3613ec29d9af8ad419f9738df0 by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 28/01/2020 at 09:09.
Pushed by rempt into branch 'krita/4.2'.

Fix safe assert when resetting continued transform

When we reapply the previous transform via m_initialTransformArgs we
should still make sure we initialize m_savedTransformArgs.

It might be related to a reverted commit 8ef04427c4b8e63265.
(cherry picked from commit a5d92c04c715e8c2a8a45567f17c40df4c3e1e8e)

M  +2    -0    plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/kde/krita/commit/de397bec02778e3613ec29d9af8ad419f9738df0
Comment 11 Halla Rempt 2020-01-28 09:50:29 UTC
Git commit 0c2d7094d66c6777759b079960cde8302f4e8e5a by Boudewijn Rempt, on behalf of Dmitry Kazakov.
Committed on 28/01/2020 at 09:09.
Pushed by rempt into branch 'krita/4.2'.

Revert "Initialize transform tool args when ending stroke"

This reverts commit 8ef04427c4b8e63265ab4bb3456659cf4b0d39a4.

The patch introduces a data-loss in the following usecase:
1) Select transform tool
2) Click on the canvas to activate it
3) Press Enter to apply
4) Click again
5) Press Enter to apply again
4) Click again
5) Press Esc to cancel
6) Click again

The layer data is lost, it becomes completely blank.
(cherry picked from commit dcae8c7860efeddd5254aa6377ce75d4c9070b36)

M  +0    -25   plugins/tools/tool_transform2/strokes/transform_stroke_strategy.cpp

https://invent.kde.org/kde/krita/commit/0c2d7094d66c6777759b079960cde8302f4e8e5a
Comment 12 Halla Rempt 2020-02-06 08:39:03 UTC
*** Bug 417176 has been marked as a duplicate of this bug. ***