Bug 77735 - EDITING: Paste special with Skip empty cells freezes
Summary: EDITING: Paste special with Skip empty cells freezes
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.3.3 release
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:4.3.0 target:4.2.5
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-21 17:22 UTC by mori8
Modified: 2014-05-28 23:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file to test (11.71 KB, application/xml)
2014-05-16 20:04 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mori8 2014-04-21 17:22:42 UTC
Problem description: 
When using "Paste Special" with option "Skip empty cells" (and I also checked "Shift cells" to "Right") Libre Office freezes wit 100% CPU.  

Steps to reproduce:
1. Enter "A" in A1 and "C" in C1
2. Select A1:C1 and Copy
3. Select A3 and Paste special with with Option Skip empty cells

Current behavior:
Libre Office freezes wit 100% CPU.  

Expected behavior:
A3 to have value "A" and B3 to have value "C"

when I attached to soffice with gdb I see the following stacktrace on an apparently relevant thread:

Thread 1 (process 1326):
#0  0x000000011fe9fb60 in ScColumn::DeleteBeforeCopyFromClip ()
No symbol table info available.
#1  0x000000011ffbe640 in ScTable::DeleteBeforeCopyFromClip ()
No symbol table info available.
#2  0x000000011feeff36 in ScDocument::DeleteBeforeCopyFromClip ()
No symbol table info available.
#3  0x000000011fee64a2 in ScDocument::CopyFromClip ()
No symbol table info available.
#4  0x000000012054a51a in ScViewFunc::PasteFromClip ()
No symbol table info available.
#5  0x0000000120482c6a in ScCellShell::ExecuteEdit ()
No symbol table info available.
...

googling for "libre office ScColumn::DeleteBeforeCopyFromClip" finds me the following quite recent commit so apparently this function is a pretty new addition:
http://cgit.freedesktop.org/libreoffice/core/commit/?id=cdc8ebf9646e773351c91039a62f2414c7b02105

Actually I just accidentally installed this fresh version of LibreOffice (4.2.3.3 build 882f8a0a489bc99a9e60c7905a60226254cb6ff0). I will soon downgrade to the latest stable one and check if the issue is also reproducible there.

thanks
Peter
Comment 1 m_a_riosv 2014-04-22 23:05:35 UTC
Hi @mori8, thanks for reporting.

I can't reproduce with:
Win7x64Ultimate
Versión: 4.2.3.3 Id. de compilación: 882f8a0a489bc99a9e60c7905a60226254cb6ff0

Please can you try if modifying the options in Menu/Tools/Options/LibreOffice/View/Graphics output, makes any difference.
Comment 2 mori8 2014-04-23 20:20:50 UTC
Hi Mario

There is only one option under Menu/Tools/Options/LibreOffice/View/Graphics output: using anti-aliasing which I now turned off (hardware acceleration is grey)
and I can reproduce the issue reliably. Let me know what I should try to gather any more information.



here is a stacktrace (pretty similar), this time from OS X "Problem Report" dialogue after I force quit LibreOffice (sorry for the verbosity):


  Thread 0x105dfe   DispatchQueue 1          priority 46         cpu time   1.285s
  14 start + 1 (libdyld.dylib) [0x7fff8edce7e1]
    14 main + 16 (soffice) [0x10e438f20]
      14 soffice_main + 214 (libsofficeapp.dylib) [0x10e4ddb86]
<snip....>
                                            14 ScCellShell::ExecuteEdit(SfxRequest&) + 26218 (libsclo.dylib) [0x11e462c6a]
                                              14 ScViewFunc::PasteFromClip(unsigned short, ScDocument*, unsigned short, bool, bool, bool, InsCellCmd, unsigned short, bool) + 5002 (libsclo.dylib) [0x11e52a51a]
                                                14 ScDocument::CopyFromClip(ScRange const&, ScMarkData const&, unsigned short, ScDocument*, ScDocument*, bool, bool, bool, bool, ScRangeList const*) + 1090 (libsclo.dylib) [0x11dec64a2]
                                                  14 ScDocument::DeleteBeforeCopyFromClip(sc::CopyFromClipContext&, ScMarkData const&) + 214 (libsclo.dylib) [0x11decff36]
                                                    14 ScTable::DeleteBeforeCopyFromClip(sc::CopyFromClipContext&, ScTable const&) + 256 (libsclo.dylib) [0x11df9e640]
                                                      7  ScColumn::DeleteBeforeCopyFromClip(sc::CopyFromClipContext&, ScColumn const&) + 432 (libsclo.dylib) [0x11de7fb60]
                                                        7  <executing in user space>
                                                      6  ScColumn::DeleteBeforeCopyFromClip(sc::CopyFromClipContext&, ScColumn const&) + 240 (libsclo.dylib) [0x11de7faa0]
                                                        6  <executing in user space>
                                                      1  ScColumn::DeleteBeforeCopyFromClip(sc::CopyFromClipContext&, ScColumn const&) + 276 (libsclo.dylib) [0x11de7fac4]
                                                        1  <executing in user space>
Comment 3 m_a_riosv 2014-04-23 21:34:41 UTC
Please try resetting the user profile, sometimes resolves strange issues:
https://wiki.documentfoundation.org/UserProfile#Mac_OS_X
Comment 4 m_a_riosv 2014-05-16 20:04:23 UTC
Created attachment 99173 [details]
Sample file to test

Trying to verify comment#1 in https://bugs.freedesktop.org/show_bug.cgi?id=78705

I can reproduce with the attached file and with this report steps, I don't why I can't reproduce it before.

Copy or cut B7:C8
Paste special in A4 with Skip empty cells activated.
LibreOffice hangs with the processor at maximum use.

Win7x64Ultimate
Version: 4.2.3.3 Build ID: 882f8a0a489bc99a9e60c7905a60226254cb6ff0
Version: 4.2.5.0.0+ Build ID: da62ab5783e548c5785b3950c03d078b1f3e849d
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-16_08:13:28
Version: 4.3.0.0.alpha1+ Build ID: 48eccfb812284f43ba24c3be3903537ce954944d
   TinderBox: Win-x86@39, Branch:master, Time: 2014-05-16_00:35:19
   (Clean profile)

Works in:
Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Comment 5 Kohei Yoshida 2014-05-17 02:36:03 UTC
I'm on this.
Comment 6 Commit Notification 2014-05-17 03:09:15 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=30cc43a56d63ba9ffd588ebc589e3576483d7141

fdo#77735: Write test for this.  This test will freeze with the bug present.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2014-05-17 03:09:28 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bc7e0967be52f5eb7948fbb1c30edc7dd5acc18d

fdo#77735: Don't proceed when all cells in the range are empty.



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Kohei Yoshida 2014-05-17 03:09:44 UTC
4.2 backport: https://gerrit.libreoffice.org/9388
Comment 9 Commit Notification 2014-05-17 03:25:02 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8549d1dbe648ce01e4a351eb301dcf146c62676d&h=libreoffice-4-2

fdo#77735: Don't proceed when all cells in the range are empty.


It will be available in LibreOffice 4.2.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Kohei Yoshida 2014-05-17 03:40:03 UTC
fixed.
Comment 11 m_a_riosv 2014-05-28 23:06:37 UTC
Thanks Kohei,
verified:
Win7x64
Version: 4.2.5.1 Build ID: 881bb88abfe2992c6cede97c23e64a9885de87de
Version: 4.2.6.0.0+ Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-28_10:43:01
Version: 4.3.0.0.beta1 Build ID: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f
Version: 4.4.0.0.alpha0+ Win-x86@39, Branch:master, Time: 2014-05-26_01:36:09