<?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>381329</bug_id>
          
          <creation_ts>2017-06-17 13:39:43 +0000</creation_ts>
          <short_desc>Kate crashes when pasting content from it to Libreoffice</short_desc>
          <delta_ts>2017-07-24 10:18:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>kate</product>
          <component>general</component>
          <version>17.04.2</version>
          <rep_platform>Ubuntu</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>381997</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>drkonqi</keywords>
          <priority>NOR</priority>
          <bug_severity>crash</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="kamesh">vaddina</reporter>
          <assigned_to name="KWrite Developers">kwrite-bugs-null</assigned_to>
          <cc>christoph</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink></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>1683029</commentid>
    <comment_count>0</comment_count>
    <who name="kamesh">vaddina</who>
    <bug_when>2017-06-17 13:39:43 +0000</bug_when>
    <thetext>Application: kate (17.04.2)

Qt Version: 5.7.1
Frameworks Version: 5.35.0
Operating System: Linux 4.4.0-79-generic x86_64
Distribution: KDE neon User Edition 5.10

-- Information about the crash:
- What I was doing when the application crashed:

I first copied the text from Kate. Kate did not crash. Then when I try to paste it in Libreoffice Calc, Kate crashed.

The crash can be reproduced every time.

-- Backtrace:
Application: Kate (kate), signal: Segmentation fault
Using host libthread_db library &quot;/lib/x86_64-linux-gnu/libthread_db.so.1&quot;.
[Current thread is 1 (Thread 0x7f7d4a96b900 (LWP 17266))]

Thread 2 (Thread 0x7f7d2bc0e700 (LWP 17268)):
#0  0x00007f7d45cd2b5d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f7d40d6438c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f7d40d6449c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f7d468fb75b in QEventDispatcherGlib::processEvents (this=0x7f7d240008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:425
#4  0x00007f7d468a60ba in QEventLoop::exec (this=this@entry=0x7f7d2bc0dc90, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#5  0x00007f7d466d5f64 in QThread::exec (this=&lt;optimized out&gt;) at thread/qthread.cpp:507
#6  0x00007f7d4aa81735 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5
#7  0x00007f7d466dab48 in QThreadPrivate::start (arg=0x7f7d4aaf5d60) at thread/qthread_unix.cpp:368
#8  0x00007f7d42e1f6ba in start_thread (arg=0x7f7d2bc0e700) at pthread_create.c:333
#9  0x00007f7d45cde82d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f7d4a96b900 (LWP 17266)):
[KCrash Handler]
#6  std::__atomic_base&lt;int&gt;::load (__m=std::memory_order_relaxed, this=&lt;error reading variable: Cannot access memory at address 0x0&gt;) at /usr/include/c++/5/bits/atomic_base.h:396
#7  QAtomicOps&lt;int&gt;::load&lt;int&gt; (_q_value=&lt;error reading variable: Cannot access memory at address 0x0&gt;) at ../../../../include/QtCore/../../src/corelib/arch/qatomic_cxx11.h:227
#8  QBasicAtomicInteger&lt;int&gt;::load (this=&lt;error reading variable: Cannot access memory at address 0x0&gt;) at ../../../../include/QtCore/../../src/corelib/thread/qbasicatomic.h:99
#9  QtPrivate::RefCount::isShared (this=&lt;error reading variable: Cannot access memory at address 0x0&gt;) at ../../../../include/QtCore/../../src/corelib/tools/qrefcount.h:101
#10 QMap&lt;unsigned int, INCRTransaction*&gt;::detach (this=0x0) at ../../../../include/QtCore/../../src/corelib/tools/qmap.h:366
#11 QMap&lt;unsigned int, INCRTransaction*&gt;::remove (akey=@0xd3bc3f8: 92274689, this=0x0) at ../../../../include/QtCore/../../src/corelib/tools/qmap.h:936
#12 INCRTransaction::~INCRTransaction (this=0xd3bc3e0, __in_chrg=&lt;optimized out&gt;) at qxcbclipboard.cpp:193
#13 INCRTransaction::~INCRTransaction (this=0xd3bc3e0, __in_chrg=&lt;optimized out&gt;) at qxcbclipboard.cpp:202
#14 INCRTransaction::timerEvent (this=0xd3bc3e0, ev=&lt;optimized out&gt;) at qxcbclipboard.cpp:249
#15 0x00007f7d468d3d53 in QObject::event (this=0xd3bc3e0, e=&lt;optimized out&gt;) at kernel/qobject.cpp:1285
#16 0x00007f7d47653ecc in QApplicationPrivate::notify_helper (this=&lt;optimized out&gt;, receiver=0xd3bc3e0, e=0x7ffd73030da0) at kernel/qapplication.cpp:3799
#17 0x00007f7d4765b8c6 in QApplication::notify (this=0x7ffd730312c0, receiver=0xd3bc3e0, e=0x7ffd73030da0) at kernel/qapplication.cpp:3556
#18 0x00007f7d468a80c8 in QCoreApplication::notifyInternal2 (receiver=0xd3bc3e0, event=event@entry=0x7ffd73030da0) at kernel/qcoreapplication.cpp:988
#19 0x00007f7d468fa68e in QCoreApplication::sendEvent (event=0x7ffd73030da0, receiver=&lt;optimized out&gt;) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#20 QTimerInfoList::activateTimers (this=0x1fbf7b0) at kernel/qtimerinfo_unix.cpp:644
#21 0x00007f7d468fabc1 in timerSourceDispatch (source=&lt;optimized out&gt;) at kernel/qeventdispatcher_glib.cpp:182
#22 0x00007f7d40d64197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007f7d40d643f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007f7d40d6449c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007f7d468fb73f in QEventDispatcherGlib::processEvents (this=0x1fbeeb0, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#26 0x00007f7d468a60ba in QEventLoop::exec (this=this@entry=0x7ffd73030ff0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212
#27 0x00007f7d468ae6cc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1261
#28 0x00007f7d470b024c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1633
#29 0x00007f7d47653e25 in QApplication::exec () at kernel/qapplication.cpp:2975
#30 0x00000000004283ac in main (argc=3, argv=&lt;optimized out&gt;) at /workspace/build/kate/main.cpp:583

Possible duplicates by query: bug 372712.

Reported using DrKonqi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683031</commentid>
    <comment_count>1</comment_count>
    <who name="kamesh">vaddina</who>
    <bug_when>2017-06-17 13:42:52 +0000</bug_when>
    <thetext>The copied text is 1095123 lines</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683036</commentid>
    <comment_count>2</comment_count>
    <who name="kamesh">vaddina</who>
    <bug_when>2017-06-17 14:05:36 +0000</bug_when>
    <thetext>I could not attach the text file as it is too large. But here is the link to it.

https://drive.google.com/open?id=0BzoIenLKgsD5Q0djQ0gtN2EyTkU</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683076</commentid>
    <comment_count>3</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2017-06-17 16:50:41 +0000</bug_when>
    <thetext>Can&apos;t reproduce on Kubuntu 17.04. Can you add detailed steps to reproduce? E.g. exact order that the programs were opened, exact text that makes it crash, etc.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683079</commentid>
    <comment_count>4</comment_count>
    <who name="kamesh">vaddina</who>
    <bug_when>2017-06-17 17:56:01 +0000</bug_when>
    <thetext>Nate@ I have made a video with the steps leading to the crash. Please check the following link. 

https://www.amazon.com/clouddrive/share/wzroY452PSQVXThMw9PuKUmDmhqY9vRPkEUS6E39dXw?ref_=cd_ph_share_link_copy</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683083</commentid>
    <comment_count>5</comment_count>
    <who name="Nate Graham">nate</who>
    <bug_when>2017-06-17 18:22:25 +0000</bug_when>
    <thetext>Thanks for the video, Kamesh. That&apos;s very helpful. I&apos;ve followed your video exactly, and something different happens for me when I paste the huge text into Calc (version 5.3.1.2 for me): It displays the Text Import window that asks me how to handle the enormous clipboard contents. I notice yours doesn&apos;t do that, and Kate crashes instead. I&apos;m willing to bet that this is primarily an issue with Calc, not Kate. It would be best if you could report this upstream on the LibreOffice bugzilla: https://bugs.documentfoundation.org/

In the meantime, I&apos;m going to leave this bug open because Kate shouldn&apos;t crash when LO misbehaves during a paste.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683096</commentid>
    <comment_count>6</comment_count>
    <who name="kamesh">vaddina</who>
    <bug_when>2017-06-17 21:58:08 +0000</bug_when>
    <thetext>I have now filed a bug report on 

https://bugs.documentfoundation.org/show_bug.cgi?id=108596

Also, forgot to mention that not only Kate, but also kwrite crashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1690593</commentid>
    <comment_count>7</comment_count>
    <who name="Christoph Cullmann">christoph</who>
    <bug_when>2017-07-24 10:18:10 +0000</bug_when>
    <thetext>The crash inside Qt is out of scope to fix for us, but yes, there is some issue with large pastes in any case :( bug 381997

*** This bug has been marked as a duplicate of bug 381997 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>