Bug Hunting Session
Bug 43725 - FILESAVE: Crashes while saving a file
Summary: FILESAVE: Crashes while saving a file
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: Other All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: BSA target:3.5 target:3.4
Keywords: regression
Depends on:
Blocks: 46371
  Show dependency treegraph
 
Reported: 2011-12-11 13:17 UTC by Daniel Thomae
Modified: 2012-04-13 13:38 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
the file which produces the error, if you do what's discribed above (158.41 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-12-11 13:17 UTC, Daniel Thomae
Details
bt with symbols on master (9.63 KB, text/plain)
2011-12-11 13:23 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Thomae 2011-12-11 13:17:01 UTC
Created attachment 54328 [details]
the file which produces the error, if you do what's discribed above

Problem description: 

Steps to reproduce:
0. Open the attached document.
1. Go the the sheet named '2011' in the document. Mark everything (Ctrl + A) and copy it to the clipboard (Ctrl + C). 
2. Insert a new sheet into the document and insert the clipboard content to that sheet (Ctrl + V).
3) Save the file and watch LibreOffice crushing.


Current behavior:
Crashes while saving file
Expected behavior:
Saving the file without crashing

Platform (if different from the browser): 
              
Browser: Opera/9.80 (Windows NT 6.1; U; en) Presto/2.10.229 Version/11.60
Windows 7 32 Bit Professional - 2,75 GB memory
Comment 1 Julien Nabet 2011-12-11 13:23:15 UTC
Created attachment 54329 [details]
bt with symbols on master

I reproduce the pb on pc Debian testing x86-32. I'm on master (future 3.6) updated today.
Comment 2 Julien Nabet 2011-12-11 14:05:00 UTC
Here some traces on console during the crash :
/usr/include/c++/4.6/debug/vector:320:error: attempt to subscript container 
    with out-of-bounds index 107, but container only holds 98 elements.

Objects involved in the operation:
sequence "this" @ 0x0x9ed5e30 {
  type = NSt7__debug6vectorI16ScMyDefaultStyleSaIS1_EEE;
}
Comment 3 Eike Rathke 2011-12-15 07:16:13 UTC
Crash fixed on master and 3-5 with
http://cgit.freedesktop.org/libreoffice/core/commit/?id=6198fcd7064180a0bf8a6d67f63f784610aa9ba8
http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-3-5&id=4362f16588dd5937dedd4922af1714aa949ecdba

However, there's something wrong in style row/repeat calculation that's the real cause of this and would be good to find. Markus?
Comment 4 Serge Gautherie 2012-01-02 12:57:57 UTC
Fwiw, I believe I just hit this bug (crashing while saving a document just after adding a new sheet).

Regression timeframe:
v3.3.4 works fine.
v3.4.0 to v3.4.4 are affected. (Any chance to fix this bug in v3.4.5+?)
Comment 5 Eike Rathke 2012-01-03 10:33:18 UTC
@Serge: did you copy a sheet's data/styles to the new sheet as well? Or was that just after having added a new sheet?
Comment 6 Daniel Thomae 2012-01-03 10:43:01 UTC
(In reply to comment #5)
> @Serge: did you copy a sheet's data/styles to the new sheet as well? Or was
> that just after having added a new sheet?

I have to add something. Recently I wanted to add another spreadsheet to the file to note some numbers and I skipped step number 2 of the problem report - and LibreOffice crashed. So it's not really related to the copy and past of the existing spread sheet, it's just adding a new spread sheet.
Comment 7 Serge Gautherie 2012-01-04 12:31:27 UTC
(In reply to comment #4)
> Fwiw, I believe I just hit this bug (crashing while saving a document just
> after adding a new sheet).

(Ftr, I am (still) on Windows 2000, but that doesn't seem to matter here.)

My affected file has 40 sheets.
3 of these sheets have 1+ simple charts.

Bug discovering:
much like comment 0, I tried to copy a "2011" sheet" (without any chart) to a new "2012" sheet, made more modifications, tried to save ... and crashed ;->

First round of tests:
I tried a few different steps and always crashed.
One of these tests was to just create a new blank sheet, no copy+paste involved.

Fwiw, after I finally reinstalled v3.3.4, I discovered that my charts on the first sheet were gone !
(The ones on the other 2 sheets were still there.)
[Odd, but I see this as an hint: just a consequence of all this, not the cause.]


(In reply to comment #5)
> @Serge: did you copy a sheet's data/styles to the new sheet as well? Or was
> that just after having added a new sheet?

Second round of tests, just adding a blank sheet to that same file:

I installed Portable v3.3.4:
works fine.

I installed Portable v3.4.4.1:
inserting anywhere after the 3rd sheet that has charts: works fine.
inserting anywhere before the 3rd sheet that has charts: will crash on save.
if I delete the chart on the "3rd" sheet: crash if I try to insert before "2nd" sheet that has charts then save. Works fine if insertion is anywhere after it.


Third round of tests:
I reproduce the same behaviors if I leave/delete the charts on the last sheet of the document attached to this bug.


Should this bug be reopened or a follow-up bug filed?
Comment 8 Eike Rathke 2012-01-05 06:56:57 UTC
Serge, can you check with a 3.5-beta build if the crashes are gone in your scenarios? If so, we may cherry-pick the fix for next 3-4 release. No need to reopen this bug.
Comment 9 Serge Gautherie 2012-01-07 10:32:25 UTC
(In reply to comment #8)

> Serge, can you check with a 3.5-beta build if the crashes are gone in your
> scenarios? If so, we may cherry-pick the fix for next 3-4 release.

I had already downloaded 3.5b2 but I couldn't install it.
I have now filed bug 44559 and bug 44560, fwiw.


> No need to reopen this bug.

Is there a bug filed about the FIXMEs (with my more narrowed testing)?


(In reply to comment #7)
> I reproduce the same behaviors if I leave/delete the charts on the last sheet
> of the document attached to this bug.

Hopefully, someone else should be able to check this with 3.5b2.
Comment 11 Serge Gautherie 2012-02-20 23:28:03 UTC
(In reply to comment #9)
> Hopefully, someone else should be able to check this with 3.5b2.

I installed Portable v3.4.5:
bug still there, as expected.

I installed Portable v3.5.0:
works fine, as expected.
Comment 12 Serge Gautherie 2012-02-20 23:36:40 UTC
(In reply to comment #9)
> Is there a bug filed about the FIXMEs (with my more narrowed testing)?

I filed bug 46371.
Comment 13 Serge Gautherie 2012-02-21 00:27:28 UTC
(In reply to comment #3)
> However, there's something wrong in style row/repeat calculation that's the
> real cause of this and would be good to find. Markus?

Ftr, with this workaround, is there (still) any (user)dataloss involved, or is it about internal data fixup only?
Comment 14 Eike Rathke 2012-02-21 05:31:21 UTC
(In reply to comment #13)
> (In reply to comment #3)
> > However, there's something wrong in style row/repeat calculation that's the
> > real cause of this and would be good to find. Markus?
> 
> Ftr, with this workaround, is there (still) any (user)dataloss involved, or is
> it about internal data fixup only?

The crash and data loss is fixed, the comment was about that we fixed a symptom here.