Bug 43424 - : LO Crashes while Comparing an Empty Document with Another Document
Summary: : LO Crashes while Comparing an Empty Document with Another Document
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:3.6.0 target:3.5.4
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-01 08:07 UTC by Harald Koester
Modified: 2022-06-04 08:00 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
MacOS X crash log for bug 43424, LibreOffice 3.4.4 (56.55 KB, text/plain)
2011-12-04 01:11 UTC, Roman Eisele
Details
Proposed patch fixes comparing empty document with attached one (1.18 KB, patch)
2012-03-08 05:57 UTC, Szabolcs Dézsi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Koester 2011-12-01 08:07:40 UTC
PLO crashes when I tried accidentally to compare an empty document with a chapter of the LO Writer manual. 

In order to reproduce:

[1] Download Chapter 1 of the LibreOffice Writer Guide and save it to your computer. I used  the version for branch 3.4.x. (http://wiki.documentfoundation.org/Documentation/Publications)
[2] Start LO.
[3] Open a new text document.
[4] From the menu: Edit > Compare Document...
[5] Select the file saved at step [1]. With my ancient Computer, I have to wait some seconds, then LO crashes.

3 hints:
- LO does not crash, when I added a single character to the new document.
- LO does not crash, when I compared the empty file with some documents I created. 
- After the crash a recovery is successful. 

Regards
Harald
          
Browser: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.24) Gecko/20111103 Firefox/3.6.24
Comment 1 Roman Eisele 2011-12-04 00:23:12 UTC
1) Confirmed with LibreOffice 3.4.4 / German UI, running on MacOS X 10.6.8 German. I will attach the MacOS X log file for the crash.

2) Confirmed with LibreOffice 3.5 beta 0 / German UI, running on MacOS X 10.6.8 German. The MacOS X log file for this crash is almost identical with the one for crash 1).

Changing Status from Unconfirmed to New due to confirmation.
Comment 2 Roman Eisele 2011-12-04 00:30:16 UTC
Additional observation:
This crash does NOT happen if you just
(1) create an ODT document, insert one character (e.g. 'x'), and save it, then
(2) create a new empty ODT document, and then
(3) compare document (2) to document (1) --
no crash happens, everything works as expected (LibreOffice tells you about the differences).
Comment 3 Roman Eisele 2011-12-04 01:11:30 UTC
Created attachment 54106 [details]
MacOS X crash log for bug 43424, LibreOffice 3.4.4
Comment 4 Szabolcs Dézsi 2012-03-08 05:57:19 UTC
Created attachment 58184 [details]
Proposed patch fixes comparing empty document with attached one

Hi!

There was a call for GetLine( nInsPos-1 ); with nInsPos == 0 so it wanted to return aLines[ nLine ]; where nLine == -1.
(vector< CompareLine* > aLines;)

Files: sw/source/core/doc/doccomp.cxx (in SwCompareData::ShowDelete)

Szabolcs
Comment 5 Not Assigned 2012-03-08 06:02:50 UTC
Szabolcs Dezsi committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=706cac767c90281b74fbc27a134b022d27e2ce21

fdo#43424: Comparing empty document with attached one crashes LO
Comment 6 Not Assigned 2012-04-23 00:10:49 UTC
Szabolcs Dezsi committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

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

fdo#43424: Comparing empty document with attached one crashes LO


It will be available in LibreOffice 3.5.4.
Comment 7 Michael Meeks 2012-05-08 13:07:08 UTC
closing fixed then - thanks ! :-)
Comment 8 Povi 2022-06-04 08:00:56 UTC Comment hidden (spam)