Apache OpenOffice (AOO) Bugzilla – Issue 123672
Particular.ods will CRASH when attempt page preview
Last modified: 2017-05-20 10:35:39 UTC
When I attempt to preview the page that I am working on, the file crashes. I have tried using the icon in the header bar, and also using File/Print preview, but the same result for both. Yesterday, I was working with a different calc file and the same issue happened. I had page breaks inserted in the file on the tab that I was working on, removed the page break and then the page preview operated correctly. I removed all of the page breaks on this file, but still receive a crash. While I am writing this, I remembered that the current file has print ranges in use. When I remove all of the print ranges of the file, then the page preview operates properly. As an aside, there are 2 other issues that may be related or may not be. First, while the print ranges are in use, the current file does not appear in the list of recent documents under File, but it does now after removing the print ranges. Second, when the program crashed, the page appeared that said an error report was being generated, but nothing showed up for me to view or submit.
NOT reproducible with server installation of "AOO 4.1.0-Dev – German UI / German locale - [AOO410m1(Build:9750) - Rev. 1537973 - 2013-11-03]" on German WIN7 Home Premium (64bit)", own separate user profile. Most of my Calc documents have print ranges and manual page breaks, I never observed such crashes. @Dan Donkers Please attach a sample document.
Unable to replicate: AOO401m5(Build:9714) - Rev. 1524958 Windows 7 Home Premium 64bit. Page preview works fine with print ranges defined and page breaks. Example file would be helpful.
replevin 11/14/2013 Unable to replicate bug on Windows 8 64 bit, AOO401m5 Build 9714 Rev 1524958 Ver 4.0.1. Alternate replication steps: 1. Typed in content. 2. Insert > Manual Break > Row Break 3. Selected content 4. Format > Print Ranges > Define 5. File > Page Preview 6. Clicked the page preview button.
Created attachment 81947 [details] Spreadsheet for personal planning, with some simple calculations included As per requests, here is the file that I was working on. My apologies for the delay in posting this, but I was called out of town on short notice, and also this file contained some personal information that I did not want to make public. With that in mind, I have removed the personal information and left any formulas that were included. In a previous attempt to prepare this file, I started to delete some of the sheets that were part of the file, and attempting the page preview. On some of the later sheets there are some formulas, and after those pages were deleted, the page preview operated again without crashing. The file that is included now, I have confirmed that the document will crash as it is posted. For the record, if it matters, I am using Windows 8 and AOO401m5 (Build 9714 - Rev1524958) 2013-09-20 11:40:29. As an aside, yesterday I was working on a different spreadsheet file that also included some page breaks. The preview worked properly, but the file crashed when I tried to insert some lines. If I removed the page break (only on the page that I was trying to insert the lines to) and then inserted the lines and added the page break again, the preview worked properly.
CRASH is Reproducible with server installation of "AOO 4.1.0-Dev – English UI / English locale - [AOO410m1(Build:9750) - Rev. 1537973 - 2013-11-03]" on German WIN7 Home Premium (64bit)", own separate user profile. I will do some further tests tomorrow
Created attachment 81948 [details] Reduced Sample Document Further Tests with "AOO 4.0.1 – German UI / German locale [Rev. 1524958 2013-09-20 11:40:29]" on German WIN7 Home Premium (64bit)", “historic” 4.0 User Profile used for all predecessor versions show that a document reduced to sheet "Annual Budget" also reproduces the bug. No idea what is the root of the crash
Additional Info: ----------------- I did some tests with Reduced Sample Document: (a) Already Reproducible with server installation of "AOO 4.0.0-Dev – English UI / German locale [AOO400m2(Build:9701) - Rev. 1493305 Rev.1491054 2013-06-14]" on German WIN7 Home Premium (64bit)", own separate user profile (b) also crashes with server installation of " AOO 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev. 1457992 – Rev.1457606 ((2013-03-19))]" on German WIN7 Home Premium (64bit)", own separate user profile, but here crash often will not happen before I close page preview to return to normal view. (c) with server installation of "AOO 3.4.1 – German UI / German locale [AOO341m1(Build:9593) - Rev.1372282]" on German WIN7 Home Premium (64bit)", own separate user profile (d) Still Reproducible with server installation of "AOO 4.1.0-Dev – English UI / English locale - [AOO410m1(Build:9750) - Rev. 1537973 - 2013-11-03]" on German WIN7 Home Premium (64bit)", own separate user profile. Because of incomplete LCo selector (Bug 123063) no correct information can be contributed.
Opens on win7 with 'AOO410m1(Build:9750) - Rev. 1569541', no crash, no assertions, but nearly all cells show '#DIV/0!'
(In reply to Armin Le Grand from comment #8) > Opens on win7 with 'AOO410m1(Build:9750) - Rev. 1569541', no crash, no > assertions, but nearly all cells show '#DIV/0!' What test did you do? Crash still reproducible with sample document "2013-11-18 06:18 CET, Rainer Bielefeld " and server installation of "AOO 4.1.0-Dev – English UI / German locale - [AOO410m1(Build:9750) - Rev. 1566800 - 2014-02-12]" on German WIN7 Home Premium (64bit)", own separate user profile: After document opened simply click page preview icon in Standard toolbar.
Hi Rainer, yes, it still happens with using preview, I just did a load test. In the debugger when I continue at all the interruptions, I get the preview visible. Doing some checks...
Looks as if mem in ScPrintFunc gets corrupted; the ~ScPrintFunc() crashes when trying to free members pPageEndX, pPageEndY and pPageRows, so these seem to be used wrong. They are allocated as simple arrays in ScPrintFunc::CalcPages() and the size of the array of SCROW for pPageEndY and of ScPageRowEntry for pPageRows is calculated first. When debugging I see that ScPrintFunc::CalcPages() gets called a 2nd time for the same instance leading to a bigger result for Y-Size, but no reallocation is done. Thus, mem behind the alloced stuff may be written/changed...
Seems to have to do with r1391359 which is #121136# 'Improve Spreadsheet performance in some area (Patch 1)'. This seems not to have takeninto account that mem requirements may change dynamically...
Indeed, that's the problem. I added a dynamic adaption and all works well. I will change members SCCOL* pPageEndX; // Seitenaufteilung SCROW* pPageEndY; ScPageRowEntry* pPageRows; to std::vector and see if that cleaner version will work when enlarging these vectors dynamically as needed...
Works as expected. I have to call the former changes a 'hack' since it is dangerous and unsafe. It may be the reason for other crashes as well. Also saw that the zoom slider in page preview does not work, but this is the same in AOO 3.4.0 already, so no regression. Preparing commit...
"alg" committed SVN revision 1571902 into trunk: i123672 Made data used in ScPrintFunc to prepare print preview dynamic
Added regression keyword (from AOO341), grepped, set flags
Preparing to add to branch AOO410...
Checked and works in branch, preparing commit...
Okay, done.
"alg" committed SVN revision 1571903 into branches/AOO410: i123672 Made data used in ScPrintFunc to prepare print preview dynamic
Verified on Ubuntu 10.04 (64bit) with build from branch AOO410 (rev. 1583666) Verified on Windows 7 with local build of branch AOO410, rev. 1582710 and with buildbot build, rev. 1582709
*** Issue 123701 has been marked as a duplicate of this issue. ***