Bug 49342 - CRASH EDITING TABLE when merge cells in .sxw
Summary: CRASH EDITING TABLE when merge cells in .sxw
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: All All
: high critical
Assignee: Caolán McNamara
URL:
Whiteboard: target:3.6.0 target:3.5.4
Keywords: regression
Depends on:
Blocks: mab3.5
  Show dependency treegraph
 
Reported: 2012-05-01 08:48 UTC by Maciej Powałowski
Modified: 2013-11-13 19:24 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
File containing table whose cells cannot be merged under LO 3.5.2 (23.53 KB, application/vnd.sun.xml.writer)
2012-05-01 08:55 UTC, Maciej Powałowski
Details
The same file saved in odt format under LO 3.5.2 (24.15 KB, application/vnd.oasis.opendocument.text)
2012-05-01 08:56 UTC, Maciej Powałowski
Details
bt with symbols (6.97 KB, text/plain)
2012-05-01 11:27 UTC, Julien Nabet
Details
The file's archive (crash_cell.odt; no_crash_cell.odt) (35.68 KB, application/x-7z-compressed)
2012-05-03 23:41 UTC, ape
Details
park fix here for the moment (113.36 KB, patch)
2012-05-04 08:55 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maciej Powałowski 2012-05-01 08:48:21 UTC
1. File in sxw format containing table with some merged cells and SUM cells, also saved as odt format (see attachments).

2. The 2 cells that are important for me to merge are highlighted in red, but in fact the crash happens with any other cells in this file (both the original and the "saved as" version).

3. This is a bug serious enough for me, as the merger IS IMPOSSIBLE, so in effect I have to make the table over again: not something to look forward to, especially that I've got a few of those old format files to work on.

4. Perhaps this bug will help resolve the other (reported) crash-bug, which is trying to merge cells in table pasted from spreadsheet as rtf.

OS: Open SUSE 12.1
Comment 1 Maciej Powałowski 2012-05-01 08:55:06 UTC
Created attachment 60855 [details]
File containing table whose cells cannot be merged under LO 3.5.2
Comment 2 Maciej Powałowski 2012-05-01 08:56:28 UTC
Created attachment 60856 [details]
The same file saved in odt format under LO 3.5.2
Comment 3 Julien Nabet 2012-05-01 11:27:17 UTC
Created attachment 60861 [details]
bt with symbols

I reproduced the problem with the swx on master updated today. (pc Debian x86-64).
I attached a bt with symbols.
Comment 4 Rainer Bielefeld Retired 2012-05-02 07:36:17 UTC
[Reproducible] with "LibreOffice 3.5.3.2 (RC2) German UI/Locale [Build-ID: 235ab8a-3802056-4a8fed3-2d66ea8-e241b80] on German WIN7 Home Premium (64bit), additional 
[Reproducible] with Server installation of MSVC Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) ENGLISH UI [Build ID:  a286353-090bcba-3bf3b94]" Win-x86@6 – 2011-12-02_22:36:35)

Still works fine
with Server installation of Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) ENGLISH UI [(Build ID:  d38713d-5d03837-ca7e6f5-c4bb9bd-ce71330)]" 

I did some tests with own documents created with OOo 1.1.4. Very most simple table will not crash, but Crash is reproducible with own documents with some merged cells.

I additionally checked with a LibO 3.5 on 32Bit WIN XP (VirtualBox), also crashes. So not limited to 64Bit

@Michael:
Please set Status to ASSIGNED and add yourself to "Assigned To" if you accept this Bug
Comment 5 Caolán McNamara 2012-05-03 15:34:49 UTC
The awesome power of bibisect suggests...

git log ab63c12395ed3771b1df6822eaa8572c06db0765..f82da782158d8f5b89a6a9057df1a4695425ed75

as the range that causes the problem.

Either 858b5b4f36a357fe7192e7c2ed9cc3cdfc81fd8f, 23d66e25c0ede411d00404dcc7a36e880c22e67f or a0a1c3f4fb730ed3614593c3d8ddb50c23204c29 are my current leading contenders
Comment 6 ape 2012-05-03 23:41:25 UTC
Created attachment 61009 [details]
The file's archive (crash_cell.odt; no_crash_cell.odt)

An interesting feature.
 A. The file "crashfile.sxw" saved as "crash_cell.odt" (LibreOffice-3.5.3_win; ODT_ver.1.0)
 B. Word_2010:
   1) open the file "crash_cell.odt";
   2) merge red cells;
   3) save the edited file as "no_crash_cell.odt".
 C. LibreWriter-3.5.3 opened file "no_crash_cell.odt". Any table's cells may be merge. LibreOffice is working properly.
--
 Maybe the reason is in the meta-file:
 "<?xml version="1.0" encoding="UTF-8"?>
<office:document-meta xmlns:office="http://openoffice.org/2000/office" ...  xmlns:grddl="http://www.w3.org/2003/g/data-view#" office:version="1.2"><office:meta><meta:generator>LibreOffice/3.5$Linux_X86_64 LibreOffice_project/281b639-6baa1d3-ef66a77-d866f25-f36d45f</meta:generator> ... </office:document-meta>"
Comment 7 Caolán McNamara 2012-05-04 07:58:09 UTC
crash is caused by 858b5b4f36a357fe7192e7c2ed9cc3cdfc81fd8f

the conversion to a std::map assume that the StartNodes won't change while the map exists, but a paragraph is added to the document after the boxes are created, so the indexes used by the map are no longer the indexes reported by each elements GetSttIdx

re comment #6: various comments about re-saving, etc. There are two table models floating around, those in old docs (like the .sxw) and those in new docs. The problem shows itself with the old-table-model, persumably saving it in 2010 turned it into a new-model table.
Comment 8 Caolán McNamara 2012-05-04 08:55:15 UTC
Created attachment 61039 [details]
park fix here for the moment
Comment 9 Maciej Powałowski 2012-05-05 02:29:25 UTC
Under Open Office 3.1.0 there is no problem whatsoever merging cells in both crashfiles (the sxw and the "saved as" odt one). Then again OO 3.1.0 falls short of LO as far as some important bugs and features go.
Comment 10 Not Assigned 2012-05-05 02:32:11 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#49342 crash merging cells, revert conversion to std::map
Comment 11 Caolán McNamara 2012-05-05 08:23:29 UTC
fixed in master, backport post for review for 3-5 to list
Comment 12 ape 2012-05-07 12:34:42 UTC
(In reply to comment #11)
> fixed in master,
OK
--
> backport post for review for 3-5 to list
LOdev 3.5.4rc0+ (Win-x86@7-MinGW)
Build ID: 009776a-a73d29c-6845e52-f269e46
Data stamp: 2012-05-07_12.31.58
Error persists.
Comment 13 ape 2012-05-07 12:38:08 UTC
(In reply to comment #11)
> fixed in master,
OK
--
> backport post for review for 3-5 to list
LOdev 3.5.4rc0+ (Win-x86@7-MinGW)
Build ID: 009776a-a73d29c-6845e52-f269e46
Data stamp: 2012-05-07_12.31.58
Error persists.
Comment 14 Rainer Bielefeld Retired 2012-05-07 13:30:40 UTC
@ape:
of course! The fix for is in review, not in the branch (as you can see in target information).
Comment 15 ape 2012-05-09 01:24:50 UTC
(In reply to comment #14)
> @ape:
> of course! The fix for is in review, not in the branch (as you can see in
> target information).

Well, then why it has the resolution of "fixed" in "[Bug 37361] LibreOffice 3.5 most annoying bugs"?
Comment 16 Rainer Bielefeld Retired 2012-05-09 01:43:29 UTC
@ape:
It's common sense for this kind of bugs to set status to FIXED when the Master-Fix has been committed, although it's a little confusing. Currently we have only few problems with that proceeding, If someone finds out that we have considerable trouble (for example review will not be done, no commit to 3.5 branch) we will have to think about the proceeding. If you believe discussion or even a fix is required please start a discussion on <libreoffice-qa@lists.freedesktop.org> or submit a bug for that issue, but do not hijack this bug for that discussion.
Comment 17 ape 2012-05-09 08:46:36 UTC
(In reply to comment #16)
> @ape:
> It's common sense for this kind of bugs to set status to FIXED when the
> Master-Fix has been committed, although it's a little confusing. Currently we
> have only few problems with that proceeding, If someone finds out that we have
> considerable trouble (for example review will not be done, no commit to 3.5
> branch) we will have to think about the proceeding. If you believe discussion
> or even a fix is required please start a discussion on
> <libreoffice-qa@lists.freedesktop.org> or submit a bug for that issue, but do
> not hijack this bug for that discussion.

Thanks.
The Bug is fixed: LOdev 3.5.4rc0+ 
Build ID: 4112bb4-a73d29c-6845e52-f269e46
Data stamp: 2012-05-09_08.32.11
Comment 18 Rainer Bielefeld Retired 2012-05-09 10:35:49 UTC
target:3.5.4 due to Comment 17