Bug 423196 - Move tool does not move layer
Summary: Move tool does not move layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Tools/Move (show other bugs)
Version: 4.3.0
Platform: Other Android 8.x
: NOR normal
Target Milestone: ---
Assignee: sh_zam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-18 23:58 UTC by spaceotter
Modified: 2020-10-06 11:37 UTC (History)
2 users (show)

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 spaceotter 2020-06-18 23:58:13 UTC
SUMMARY

Selecting the Move tool on Krita running on Android does not move layer. When attempting to move a layer, only a bounding box is visibly moved but the contents of the selected layer remain unchanged.

STEPS TO REPRODUCE
1. select a paint layer with content
2. select the Move tool
3. with the default tool settings in place, drag layer

OBSERVED RESULT

A bounding box of the appropriate dimension is shown as moving along; layer's content does not follow along.

EXPECTED RESULT

content of the selected layer should follow cursor. 

SOFTWARE/OS VERSIONS
 
Android: 8.0.0
Krita 4.3 (3b71809)
Qt 5.12.8


ADDITIONAL INFORMATION

Workaround: Select > Select All and then Move tool
Comment 1 Ahab Greybeard 2020-06-19 11:00:02 UTC
I can confirm this for 4.3.0 (git 3b71809) running on a Chromebook with Android 9.0.
Comment 2 sh_zam 2020-09-28 13:07:02 UTC
Okay, this is another RTTI bugs. According to the Android's ABI standard this shouldn't happen, but here we are.

I have narrowed the bug to `MoveStrokeStrategy::Data` hierarchy, apparently for some reason, the vtable doesn't seem to be emitted. I'll try to get more info about the ``type_info` and try to see if updating the NDK will fix this.
Comment 3 Halla Rempt 2020-10-03 09:01:30 UTC
Git commit f87e30cae132d4bf5247a765d2fb471a945b2b24 by Boudewijn Rempt, on behalf of Sharaf Zaman.
Committed on 03/10/2020 at 08:10.
Pushed by szaman into branch 'krita/4.3'.

Bugfix: Move tool does not move layer

For reasons that I couldn't properly understand.
dynamic_cast would fail on Android because the type_info*
would point to two separate locations in two separate
DSOs.
By making a strong symbol, we'll have one and only one
location to point to, which fixes the issue.

M  +5    -0    libs/ui/tool/strokes/move_stroke_strategy.cpp
M  +1    -3    libs/ui/tool/strokes/move_stroke_strategy.h

https://invent.kde.org/graphics/krita/commit/f87e30cae132d4bf5247a765d2fb471a945b2b24
Comment 4 sh_zam 2020-10-05 17:58:26 UTC
Git commit 70ba74259880de2f7ee06f13268d001d0d1912d1 by Sharaf Zaman.
Committed on 05/10/2020 at 17:53.
Pushed by szaman into branch 'master'.

Bugfix: Move tool does not move layer

For reasons that I couldn't properly understand.
dynamic_cast would fail on Android because the type_info*
would point to two separate locations in two separate
DSOs.
By making a strong symbol, we'll have one and only one
location to point to, which fixes the issue.

(cherry picked from commit f87e30cae132d4bf5247a765d2fb471a945b2b24)

M  +5    -0    libs/ui/tool/strokes/move_stroke_strategy.cpp
M  +1    -3    libs/ui/tool/strokes/move_stroke_strategy.h

https://invent.kde.org/graphics/krita/commit/70ba74259880de2f7ee06f13268d001d0d1912d1
Comment 5 Dmitry Kazakov 2020-10-06 11:37:36 UTC
Git commit 8fa2ec84ae7ff6f5945c9f3beecf81e68e7252fb by Dmitry Kazakov, on behalf of Sharaf Zaman.
Committed on 06/10/2020 at 11:36.
Pushed by dkazakov into branch 'krita/4.4.0'.

Bugfix: Move tool does not move layer

For reasons that I couldn't properly understand.
dynamic_cast would fail on Android because the type_info*
would point to two separate locations in two separate
DSOs.
By making a strong symbol, we'll have one and only one
location to point to, which fixes the issue.

M  +5    -0    libs/ui/tool/strokes/move_stroke_strategy.cpp
M  +1    -3    libs/ui/tool/strokes/move_stroke_strategy.h

https://invent.kde.org/graphics/krita/commit/8fa2ec84ae7ff6f5945c9f3beecf81e68e7252fb