Bug 46038 - EDITING: CRASH when pasting text from writer into draw when there's a header/footer with a table in it present
Summary: EDITING: CRASH when pasting text from writer into draw when there's a header/...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: Other All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: bibisected35 target:3.6.0 target:3.5.1
Keywords: regression
: 45637 46732 47274 (view as bug list)
Depends on:
Blocks: mab3.5
  Show dependency treegraph
 
Reported: 2012-02-14 05:52 UTC by Rainer Bielefeld Retired
Modified: 2012-03-14 10:20 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Source Sample Document (23.00 KB, application/vnd.oasis.opendocument.text)
2012-02-14 05:52 UTC, Rainer Bielefeld Retired
Details
typescript of gdb session (31.29 KB, text/plain)
2012-02-14 06:48 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Bielefeld Retired 2012-02-14 05:52:41 UTC
Created attachment 57035 [details]
Source Sample Document

Steps how to reproduce with "LibreOffice 3.5.0 German UI/Locale [Build-ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735] on German WIN7 Home Premium (64bit):

1. Open attached "sample1.odt"
2. Double click text "R4311" on page 2
   > Text highlighted
3. <contro+c> for Copy
4. Menu 'File -> New -> DRAW document
5. click somewhere into slide
6. <control+v> for Paste
  > Expected: Text box created
  > actual: CRASH

Crash does not appear when I copy / Paste from a newly created WRITER source document.

NEW because reproducible on a 32BIT WIN XP VirtualBox machine.
Comment 1 Rainer Bielefeld Retired 2012-02-14 05:57:00 UTC
No CRASH with  with "LibreOffice 3.4.5 German UI [Build ID: OOO340m1 (Build:502)]" parallel Server installation on German WIN7 Home Premium (64bit), so REGRESSION!
Comment 2 Terrence Enger 2012-02-14 06:48:23 UTC
Created attachment 57038 [details]
typescript of gdb session

attaching typescript of gdb session

Running on ubuntu-natty 32-bit.  Master commit id 53ca46c, pulled
2012-02-09, configured with
    --disable-mozilla
    --enable-symbols
    --enable-dbgutil
    --enable-crashdump
    --disable-build-mozilla
    --without-system-postgresql
    --enable-python=internal
Comment 3 Korrawit Pruegsanusak 2012-02-25 14:31:00 UTC
 d8fd355d8b3ab056c1ecab93a51aa3e5ede0258c is the first bad commit
commit d8fd355d8b3ab056c1ecab93a51aa3e5ede0258c
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Wed Dec 7 12:43:15 2011 +0100

    source-hash-a705aec5117fe9123236ebdeb0d6f271b83f8af4
    
    commit a705aec5117fe9123236ebdeb0d6f271b83f8af4
    Author:     Andras Timar <atimar@suse.com>
    AuthorDate: Fri Sep 16 16:20:09 2011 +0200
    Commit:     Andras Timar <atimar@suse.com>
    CommitDate: Sat Sep 17 10:18:18 2011 +0200
    
        add KeyID option to Language dropdown box

$ git bisect log
git bisect start
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect good 65fd30f5cb4cdd37995a33420ed8273c0a29bf00
# bad: [4c30602f43475389f81b1d981ce8ee9a3410b9d9] source-hash-85c6244b85b29c1d2bb9d89b62e9512dd65378b5
git bisect bad 4c30602f43475389f81b1d981ce8ee9a3410b9d9
# bad: [2faf4bc12ab490370d2196dedbc8091f9b09d0a5] source-hash-418a35f4861e863feb39eec73f4a39a87fbcb1f3
git bisect bad 2faf4bc12ab490370d2196dedbc8091f9b09d0a5
# bad: [4bae211a2589ecaec48c1409cf7cd1580d3e14c5] source-hash-31e7820f03badc3c6fe8fdaffb74f2125e05ea96
git bisect bad 4bae211a2589ecaec48c1409cf7cd1580d3e14c5
# good: [4dd6be28b0742f13a2035873b36b8efc512013e8] source-hash-a44dda4b7d71f8d2b4e0cca79d732eab89588c3a
git bisect good 4dd6be28b0742f13a2035873b36b8efc512013e8
# bad: [eceb07605d022d9cc88f0015a3424b8a7aff8753] source-hash-59cb0469897b1d2c57386510ad321a72e5477ad4
git bisect bad eceb07605d022d9cc88f0015a3424b8a7aff8753
# bad: [903401a8a7395aab35de794973454e7387b9c3ad] source-hash-a0a1c3f4fb730ed3614593c3d8ddb50c23204c29
git bisect bad 903401a8a7395aab35de794973454e7387b9c3ad
# bad: [d8fd355d8b3ab056c1ecab93a51aa3e5ede0258c] source-hash-a705aec5117fe9123236ebdeb0d6f271b83f8af4
git bisect bad d8fd355d8b3ab056c1ecab93a51aa3e5ede0258c
Comment 4 Korrawit Pruegsanusak 2012-02-25 14:54:11 UTC
*If I understand correctly*, from bibisect log in comment 3, the range of the commit to check is

git log a44dda4b7d71f8d2b4e0cca79d732eab89588c3a..a705aec5117fe9123236ebdeb0d6f271b83f8af4

Hope this helps :)
Comment 5 Ivan Timofeev (retired) 2012-02-26 10:25:45 UTC
Thank you Korrawit!

Sadly, it looks like a side effect of
http://cgit.freedesktop.org/libreoffice/core/commit/?id=8cc839dc6ac3239bc4a3738cfb6078a8bf92ea72
I have reverted it, and there is no crash.

No idea of what's happened there.

@Caolan:
I added you to CC list because you are the author of the commit. Perhaps there is another bug in another place.
Comment 6 Caolán McNamara 2012-02-27 04:00:10 UTC
my original patch doesn't look obviously stupid, definitely crashes though
Comment 7 Caolán McNamara 2012-02-27 04:22:52 UTC
hmm, looks like the sd rtf import code is kind of stupid, looks for any table keywords in the rtf and if it sees them says "its a table", adding the styles to rtf in the paste buffer adds the page styles, and we've a stupid "export page styles" pgdsctbl extension to rtf in use in writer and the document has footers/headers with tables in them which tricks the sd importer into bustage
Comment 8 Not Assigned 2012-02-27 04:45:49 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#46038 don't copy page styles into temporary clipboard doc
Comment 9 Not Assigned 2012-02-28 00:37:52 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=018fd9afa4659a791dd6e2a6c1d44185505ba4ec&g=libreoffice-3-5

Resolves: fdo#46038 don't copy page styles into temporary clipboard doc


It will be available in LibreOffice 3.5.2.
Comment 10 Not Assigned 2012-02-28 04:13:54 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0f2954dd3a1dcd9a4d2cc6a39e6b489acb223f10&g=libreoffice-3-5-1

Resolves: fdo#46038 don't copy page styles into temporary clipboard doc


It will be available already in LibreOffice 3.5.1.
Comment 11 Timur 2012-02-28 09:31:37 UTC
Please check if this is the same bug as Bug 46732: EDITING: CRASH when pasting text with spaces to comment. This is the closest I could find. Thank you. 

Should this bug be marked as resolved?
Comment 12 Caolán McNamara 2012-02-28 13:56:48 UTC
*** Bug 46732 has been marked as a duplicate of this bug. ***
Comment 13 Caolán McNamara 2012-03-07 13:03:51 UTC
*** Bug 45637 has been marked as a duplicate of this bug. ***
Comment 14 Timur 2012-03-14 10:20:07 UTC
*** Bug 47274 has been marked as a duplicate of this bug. ***