<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>458941</bug_id>
          
          <creation_ts>2022-09-10 01:23:22 +0000</creation_ts>
          <short_desc>Copy merged crashes the application</short_desc>
          <delta_ts>2022-09-26 16:47:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>krita</product>
          <component>Usability</component>
          <version>5.1.0</version>
          <rep_platform>Appimage</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Pablo">netinfo2k</reporter>
          <assigned_to name="Dmitry Kazakov">dimula73</assigned_to>
          <cc>halla</cc>
    
    <cc>starwarfan14</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/commit/1d9698635a0f8289263bcb057727bf69cb48e8fa</cf_commitlink>
          <cf_versionfixedin></cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2151610</commentid>
    <comment_count>0</comment_count>
    <who name="Pablo">netinfo2k</who>
    <bug_when>2022-09-10 01:23:22 +0000</bug_when>
    <thetext>Selecting all the image that is being edited (ctrl+A) and doing &quot;copy merged&quot; crashes the application.



STEPS TO REPRODUCE
1. Create a new document
2. Select all with ctrl+A
3. Select Copy merged from the Edit menu

OBSERVED RESULT
The following messages is repeated indefinitely in the console (since I start the app from the command line) until application crashes.
SAFE ASSERT (krita): &quot;qAbs(row) &lt; 0x7FFF &amp;&amp; qAbs(col) &lt; 0x7FFF&quot; in file /home/appimage/workspace/Krita_Release_Appimage_Build/krita/libs/image/tiles3/kis_tile_hash_table2.h, line 151

The crash doesn&apos;t occur if part of the image is selected, like using any of the selection tools.


EXPECTED RESULT
The application should be copied with all the layers merged.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2153189</commentid>
    <comment_count>1</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2022-09-16 11:08:33 +0000</bug_when>
    <thetext>Git commit aac9375843b3018564cea285b91f82c7f3b9fda2 by Dmitry Kazakov.
Committed on 16/09/2022 at 11:07.
Pushed by dkazakov into branch &apos;master&apos;.

Fix a crash when trying to copy-paste the background layer

Such layers usually have non-transparent default pixel, which
automatically needs an image for exact bounds calculation, which
doesn&apos;t exist for the detached layers.

The patch saves the copied area bounds on the construction
of mime data, much before the layers become detached.
Related: bug 458890, bug 458857, bug 458248

M  +12   -11   libs/ui/kis_mimedata.cpp
M  +2    -0    libs/ui/kis_mimedata.h

https://invent.kde.org/graphics/krita/commit/aac9375843b3018564cea285b91f82c7f3b9fda2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2153191</commentid>
    <comment_count>2</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2022-09-16 11:09:08 +0000</bug_when>
    <thetext>Git commit 1d9698635a0f8289263bcb057727bf69cb48e8fa by Dmitry Kazakov.
Committed on 16/09/2022 at 11:09.
Pushed by dkazakov into branch &apos;krita/5.1&apos;.

Fix a crash when trying to copy-paste the background layer

Such layers usually have non-transparent default pixel, which
automatically needs an image for exact bounds calculation, which
doesn&apos;t exist for the detached layers.

The patch saves the copied area bounds on the construction
of mime data, much before the layers become detached.
Related: bug 458890, bug 458857, bug 458248


(cherry picked from commit aac9375843b3018564cea285b91f82c7f3b9fda2)

M  +12   -11   libs/ui/kis_mimedata.cpp
M  +2    -0    libs/ui/kis_mimedata.h

https://invent.kde.org/graphics/krita/commit/1d9698635a0f8289263bcb057727bf69cb48e8fa</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2156553</commentid>
    <comment_count>3</comment_count>
    <who name="amyspark">amy</who>
    <bug_when>2022-09-26 16:47:06 +0000</bug_when>
    <thetext>*** Bug 459703 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>