<?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>490636</bug_id>
          
          <creation_ts>2024-07-22 05:59:20 +0000</creation_ts>
          <short_desc>krita 5.2.3 seg faults when trying to paste a pic that was copied from another Krita tab</short_desc>
          <delta_ts>2025-09-28 15:45:07 +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.2.3-beta1</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></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>1</everconfirmed>
          <reporter name="Ralf">silver.bullet</reporter>
          <assigned_to name="Krita Bugs">krita-bugs-null</assigned_to>
          <cc>arksbadge1</cc>
    
    <cc>dimula73</cc>
    
    <cc>emilydg2001</cc>
    
    <cc>halla</cc>
    
    <cc>info</cc>
    
    <cc>k86gdz4ezhsd5b</cc>
    
    <cc>sebastian</cc>
    
    <cc>simongcc.tala</cc>
    
    <cc>zooomfg</cc>
          
          <cf_commitlink>https://invent.kde.org/graphics/krita/-/commit/bd541c7c28c1e96aff466cc5c691d0e2014d2094</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>2339064</commentid>
    <comment_count>0</comment_count>
    <who name="Ralf">silver.bullet</who>
    <bug_when>2024-07-22 05:59:20 +0000</bug_when>
    <thetext>Hi,

krita 5.2.3-1 seg faults each time I try to copy and paste a pic from one Krita tab to another. The seg fault happens a little bit delayed shortly after pushing Ctrl+V or using the paste option of the menu. The last time I used Krita for exactly the same work but without this issue was 2024-05-12, so that time I used 5.2.2-9.  IOW between 2024-05-12 and 2024-07-21 something changed.

The GNU Debugger output is posted at
https://gitlab.archlinux.org/archlinux/packaging/packages/krita/-/issues/4 .

• rocketmouse@archlinux ~ 
$ lsb_release -dr
Description:	Arch Linux
Release:	rolling
• rocketmouse@archlinux ~ 
$ grep \ Driver /etc/X11/xorg.conf
        Driver     &quot;modesetting&quot;
• rocketmouse@archlinux ~ 
$ pacman -Q krita 
krita 5.2.3-1
• rocketmouse@archlinux ~ 
$ wmctrl -m
Name: Openbox
Class: 
PID: N/A
Window manager&apos;s &quot;showing the desktop&quot; mode: OFF

Regards,
Ralf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2339067</commentid>
    <comment_count>1</comment_count>
    <who name="Ralf">silver.bullet</who>
    <bug_when>2024-07-22 06:07:10 +0000</bug_when>
    <thetext>$ pacman -Q xf86-video-intel
xf86-video-intel 1:2.99.917+923+gb74b67f0-2</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2339433</commentid>
    <comment_count>2</comment_count>
    <who name="Ralf">silver.bullet</who>
    <bug_when>2024-07-23 05:32:59 +0000</bug_when>
    <thetext>I have created a package for your appimage and I&apos;m encountering the same problem when using the appimage.
Inserting an image results in a seg fault.

• rocketmouse@archlinux /mnt/winos10/share/.archive/krita 
$ krita ipad2+pro_1228x5_921x3_2024-07-20.kra 
QObject::startTimer: Timers cannot have negative intervals
Could not find platform independent libraries &lt;prefix&gt;
Could not find platform dependent libraries &lt;exec_prefix&gt;
Consider setting $PYTHONHOME to &lt;prefix&gt;[:&lt;exec_prefix&gt;]
/tmp/.mount_kritadktvTy/usr/lib/krita-python-libs/krita added to PYTHONPATH
Segmentation fault (core dumped)
• rocketmouse@archlinux /mnt/winos10/share/.archive/krita 
$ pacman -Qi krita | head -8
Name            : krit
Version         : 5.2.3-1.3
Description     : Edit and paint images with the Krita Appimage
Architecture    : x86_64
URL             : https://krita.org
Licenses        : GPL3
Groups          : None
Provides        : kritaI have created a package for your appimage and I&apos;m encountering the same problem when using the appimage.
Inserting an image results in a seg error.

• rocketmouse@archlinux /mnt/winos10/share/.archive/krita 
$ krita ipad2+pro_1228x5_921x3_2024-07-20.kra 
QObject::startTimer: Timers cannot have negative intervals
Could not find platform independent libraries &lt;prefix&gt;
Could not find platform dependent libraries &lt;exec_prefix&gt;
Consider setting $PYTHONHOME to &lt;prefix&gt;[:&lt;exec_prefix&gt;]
/tmp/.mount_kritadktvTy/usr/lib/krita-python-libs/krita added to PYTHONPATH
Segmentation fault (core dumped)
• rocketmouse@archlinux /mnt/winos10/share/.archive/krita 
$ pacman -Qi krita | head -8
Name            : krit
Version         : 5.2.3-1.3
Description     : Edit and paint images with the Krita Appimage
Architecture    : x86_64
URL             : https://krita.org
Licenses        : GPL3
Groups          : None
Provides        : krita</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2339435</commentid>
    <comment_count>3</comment_count>
    <who name="Ralf">silver.bullet</who>
    <bug_when>2024-07-23 05:41:59 +0000</bug_when>
    <thetext>&quot;Inserting an image results in a seg fault&quot; should read &quot;Pasting an image results in a seg fault&quot;. My apologies for the duplicated text by Comment 2. Is it possible to edit comments? I don&apos;t see an option to do so.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2339504</commentid>
    <comment_count>4</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2024-07-23 12:48:01 +0000</bug_when>
    <thetext>I cannot reproduce this issue on Windows. It seems like it is something linux-specific.

Ralf, could you tell, do you use X11 or Wayland?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2339515</commentid>
    <comment_count>5</comment_count>
    <who name="Ralf">silver.bullet</who>
    <bug_when>2024-07-23 13:12:56 +0000</bug_when>
    <thetext>Hi Dmitry,

I&apos;m still a X user. 

From comment 1:
$ grep \ Driver /etc/X11/xorg.conf
        Driver     &quot;modesetting&quot;

A copy of comment 2:
$ pacman -Q xf86-video-intel
xf86-video-intel 1:2.99.917+923+gb74b67f0-2

And FWIW additional info. CPU with integrated GPU:
$ hwinfo --cpu | grep Model | sort -u
  Model: 6.191.5 &quot;13th Gen Intel(R) Core(TM) i3-13100&quot;

Kernel:
$ uname -r
6.10.0-arch1-1

Kernel parameters:
$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-linux root=/dev/disk/by-label/m1.archlinux ro threadirqs ibt=off

Regards,
Ralf</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2339714</commentid>
    <comment_count>6</comment_count>
    <who name="Halla Rempt">halla</who>
    <bug_when>2024-07-24 08:16:55 +0000</bug_when>
    <thetext>I can reproduce this with the 5.2.3 appimage. I also see

krita(3726868)/(default) kis_assert_common: SAFE ASSERT (krita): &quot;!nodes.isEmpty()&quot; in file /home/halla/dev/5.2/libs/image/kis_layer_utils.cpp, line 1599

And lots of

krita(3727282)/(krita.general) KisToolRectangleBase::endStroke: Unexpected tool event has come to endStroke while being mode 0 !
krita(3727282)/(krita.general) KisToolRectangleBase::endStroke: Unexpected tool event has come to endStroke while being mode 0 !

I cannot reproduce the crash in gdb, though, so I don&apos;t have a backtrace.

ctrl-a; ctrl-c; ctrl-tab; ctrl-v doesn&apos;t paste anything, even though the paste is enabled.

(Oh, and trying to right-click in the layerbox to paste the clipboard doesn&apos;t toggle the menu unless I click on an existing layer.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2341165</commentid>
    <comment_count>7</comment_count>
    <who name="Ralek Kolemios">info</who>
    <bug_when>2024-07-30 01:02:35 +0000</bug_when>
    <thetext>*** Bug 490995 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2341166</commentid>
    <comment_count>8</comment_count>
    <who name="Ralek Kolemios">info</who>
    <bug_when>2024-07-30 01:15:10 +0000</bug_when>
    <thetext>As Freya pointed out on the forums, this seems to be related to bug #490843. Trying to paste Krita layer contents into a document with no actively selected layer leads to the segfault.
I can consistently get the crash so long as I can get to a state with no active layer selected (by switching tabs)
The crash never happens so long as I ensure a layer is selected before pasting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2341587</commentid>
    <comment_count>9</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2024-07-31 08:47:31 +0000</bug_when>
    <thetext>Thanks Freya and Ralek!

I can confirm that this bug has the same cause as bug 490843 and is fixed with its fix.

*** This bug has been marked as a duplicate of bug 490843 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2341594</commentid>
    <comment_count>10</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2024-07-31 09:10:23 +0000</bug_when>
    <thetext>Git commit 0e0bcc3c614220f96747fd30bbc099afaee88291 by Dmitry Kazakov.
Committed on 31/07/2024 at 09:09.
Pushed by dkazakov into branch &apos;master&apos;.

Make clip-pasting code a bit more robust

We should check if the active layer is actually non-null when pasting
a mime-data. It is possible that no layer is selected, but it we still
shouldn&apos;t crash because of that.

M  +4    -2    libs/ui/kis_mimedata.cpp
M  +1    -1    libs/ui/kis_node_manager.cpp

https://invent.kde.org/graphics/krita/-/commit/0e0bcc3c614220f96747fd30bbc099afaee88291</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2341596</commentid>
    <comment_count>11</comment_count>
    <who name="Dmitry Kazakov">dimula73</who>
    <bug_when>2024-07-31 09:11:39 +0000</bug_when>
    <thetext>Git commit bd541c7c28c1e96aff466cc5c691d0e2014d2094 by Dmitry Kazakov.
Committed on 31/07/2024 at 09:11.
Pushed by dkazakov into branch &apos;krita/5.2&apos;.

Make clip-pasting code a bit more robust

We should check if the active layer is actually non-null when pasting
a mime-data. It is possible that no layer is selected, but it we still
shouldn&apos;t crash because of that.

M  +4    -2    libs/ui/kis_mimedata.cpp
M  +1    -1    libs/ui/kis_node_manager.cpp

https://invent.kde.org/graphics/krita/-/commit/bd541c7c28c1e96aff466cc5c691d0e2014d2094</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2344205</commentid>
    <comment_count>12</comment_count>
    <who name="Freya Lupen">penguinflyer2222</who>
    <bug_when>2024-08-08 20:06:44 +0000</bug_when>
    <thetext>*** Bug 491408 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2344207</commentid>
    <comment_count>13</comment_count>
    <who name="Freya Lupen">penguinflyer2222</who>
    <bug_when>2024-08-08 20:06:50 +0000</bug_when>
    <thetext>*** Bug 491414 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2344209</commentid>
    <comment_count>14</comment_count>
    <who name="Freya Lupen">penguinflyer2222</who>
    <bug_when>2024-08-08 20:06:56 +0000</bug_when>
    <thetext>*** Bug 491418 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2346194</commentid>
    <comment_count>15</comment_count>
    <who name="Freya Lupen">penguinflyer2222</who>
    <bug_when>2024-08-16 20:23:14 +0000</bug_when>
    <thetext>*** Bug 491793 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2346825</commentid>
    <comment_count>16</comment_count>
    <who name="Freya Lupen">penguinflyer2222</who>
    <bug_when>2024-08-19 19:36:59 +0000</bug_when>
    <thetext>*** Bug 491877 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2458212</commentid>
    <comment_count>17</comment_count>
    <who name="arksbadge">arksbadge1</who>
    <bug_when>2025-09-28 15:45:07 +0000</bug_when>
    <thetext>This doesn&apos;t appear to be resolved?
Behavior remains in Krita 5.2.10 and 5.2.13.
The behavior also applies often to images copied from other sources in general, such as from a browser.(firefox:right click -&gt; copy image -&gt; krita:edit -&gt; paste), and can also apply to copying and pasting entire layers.

Moreover, this bug appears to be retroactive; it now appears in appimages of Krita 5.1.4 and 5.0.6, so it&apos;s probably something to do with how Krita is interacting with something else, or some kind of breakage in Qt in general.

I&apos;ve also seen some corelation of XFCE4 in other reports, so it may be some interaction with XFCE4 and Qt.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>