Issue 123624 - Big table with more than 65536 cells gets damaged when saving
Summary: Big table with more than 65536 cells gets damaged when saving
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: save-export (show other issues)
Version: 4.0.1
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-04 12:35 UTC by andy.versal
Modified: 2014-05-05 13:56 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: 4.1.0
Developer Difficulty: ---


Attachments
Test case (9.61 KB, application/octet-stream)
2013-11-04 12:37 UTC, andy.versal
no flags Details
screen shot (47.61 KB, image/jpeg)
2014-05-05 13:30 UTC, andy.versal
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description andy.versal 2013-11-04 12:35:20 UTC
When saving odt document with table that has more than 64K cells, it damaged after opening saved document.
Test case in attachment. 
1. Open attached document "2521.odt". Table has 26 columns and 2521 rows
2. Save it as "odt" with different name
3. Open saved document - table damaged

4. Open attached document "2520.odt". Table has 26 columns and 2520 rows.
5. Delete last 10 rows from table
6. Save it as "odt" with different name
7. Open saved document - table ok
Comment 1 andy.versal 2013-11-04 12:37:02 UTC
Created attachment 81878 [details]
Test case
Comment 2 andy.versal 2013-11-04 14:15:16 UTC
> 1. Open attached document "2521.odt". Table has 26 columns and 2521 rows
> 2. Save it as "odt" with different name
> 3. Open saved document - table damaged
> 
> 4. Open attached document "2520.odt". Table has 26 columns and 2520 rows.
> 6. Save it as "odt" with different name
> 7. Open saved document - table ok

sorry, step 5 not needed. I was wrong
Comment 3 Prosper Uniger 2013-11-04 15:28:48 UTC
the file is odf version 1.0 when saved as new it is converted to odf 1.2

When I validate the new corrupt file
http://odf-validator.rhcloud.com/

there are lots of errors

> The document is NOT conformant ODF1.2!
> Details:
> 2521b.odt/styles.xml[2,1413]: Error: element "office:document-styles" is missing "version" attribute
> 2521b.odt/content.xml[2,1637]: Error: element "office:document-content" is missing "version" attribute
> 2521b.odt/content.xml[2,2980]: Error: unexpected attribute "style:keep-together"
> 2521b.odt/content.xml[2,5060]: Error: uncompleted content model. expecting: <covered-table-cell>,<table-cell>
> ...
> 2521b.odt/content.xml[2,127442]: Error: uncompleted content model. expecting: <covered-table-cell>,<table-cell>
> 2521b.odt: Info: Generator: OpenOffice/4.0.1$Win32 
> OpenOffice.org_project/401m5$Build-9714
Comment 4 andy.versal 2013-11-05 08:38:00 UTC
I tested this issue on LibreOffice 4.1.2.3 - everything ok
Comment 5 araker 2013-11-14 06:01:46 UTC
araker 11/13/2013

I tried replicated the bug using your test_case and the steps provided but it crashed my OpenOffice Writer perhaps a new test_case file is needed before this bug can be fixed.
Comment 6 smc967 2013-11-14 20:10:31 UTC
Replicated the defect utilizing your test case on AOO401m5(Build:9714)  -  Rev. 1524958, Windows 7 Home Premium 64 bit.  However any attempts to modify the test documents crashed Writer.  I attempted to replicate the bug by creating my own table of the same dimensions and could not replicate the defect.  Perhaps in your document you could work around the defect by creating two tables rather than one large one to get the same appearance.
Comment 7 chopf 2013-11-14 21:31:53 UTC
Following the steps (skipping 5 as specified), I can verify that 2520 does indeed work properly, and 2521 does break when re-opened. 
Both of these files have a quite long loading time, and they do make open office "not respond" for a short while, but will eventually open. 
When the new version of 2521.odt does finally open, each row has only one cell, and then there is one row at the very bottom with about 10 cells in the row.
Replicated on Ver 4.0.1 on a Win7 machine.
Comment 8 kelleybp 2013-11-14 21:54:25 UTC
I successfully replicated the bug in 4.0.1 using Windows 7 64 bit.  Following the steps laid out by andy.versal@gmail.com, the renamed 2521.odt file's table was absolutely destroyed.  

Also, I can also confirm that the renamed file has been converted from odf 1.0 to 1.2, though with errors.  In fact, both test files are 1.0, and both renamed test files are incorrectly 1.2.  I'm not sure how much this has to do with the formatting problem, as the renamed 2520.odt file still displays correctly, despite the poor conversion.
Comment 9 jimmore295 2013-11-15 01:23:30 UTC
On Win 7 with Open Office 4.0.1 I could not replicate this.  I attempted to open the sample documents and both refused to open on my system.  I created a sheet Excel with 2^16 - 26 cells (26 x 2520).  This file opened in Calc without a problem.  In Excel I increased the rows to 2521, this file also opened in Calc.  I repeated this process with 2522, 2523...on up to 2550 rows.  Calc opened all the produced files.
Comment 10 sepana7 2013-11-15 04:29:18 UTC
I replicated this bug with version 4.0.1 on Windows 7 64-bit. When loading and saving the files it was very slow and was "(Not Responding)" at several moments, although this is likely just due to the large size of the table within the document.
Comment 11 andy.versal 2013-12-02 08:10:04 UTC
(In reply to jimmore295 from comment #9)
> On Win 7 with Open Office 4.0.1 I could not replicate this.  I attempted to
> open the sample documents and both refused to open on my system.  I created
> a sheet Excel with 2^16 - 26 cells (26 x 2520).  This file opened in Calc
> without a problem.  In Excel I increased the rows to 2521, this file also
> opened in Calc.  I repeated this process with 2522, 2523...on up to 2550
> rows.  Calc opened all the produced files.

Try to save this files in odt format.
There is no problem with opening, but with saving - yes
Comment 12 Edwin Sharp 2014-04-17 16:33:53 UTC
step 1 - no 2521.odt in attachment 81878 [details] ?
Comment 13 Edwin Sharp 2014-05-01 07:07:45 UTC
No info from author.
Comment 14 andy.versal 2014-05-05 13:30:27 UTC
Created attachment 83336 [details]
screen shot
Comment 15 andy.versal 2014-05-05 13:31:17 UTC
(In reply to Edwin Sharp from comment #12)
> step 1 - no 2521.odt in attachment 81878 [details] ?

attachment 81878 [details] is an winrar archive. try unpack it.
Comment 16 Edwin Sharp 2014-05-05 13:39:24 UTC
sorry for missing it.
Comment 17 Edwin Sharp 2014-05-05 13:56:52 UTC
Confirmed with
AOO410m18(Build:9764)  -  Rev. 1589052
2014-04-22 12:11 - Linux x86_64
Debian