Bug 49208 - Freezes when FILEOPEN particular .doc
Summary: Freezes when FILEOPEN particular .doc
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Master old -3.6
Hardware: Other All
: medium major
Assignee: Caolán McNamara
URL:
Whiteboard: BSA bibisected35 target:3.6.0 target:...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-04-27 01:31 UTC by lowb2012
Modified: 2012-05-19 01:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
the problematic document (334.00 KB, application/msword)
2012-04-27 01:31 UTC, lowb2012
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lowb2012 2012-04-27 01:31:23 UTC
Created attachment 60654 [details]
the problematic document

Problem description: 

Steps to reproduce:
1. Open the attached document


Current behavior:
soffice.bin CPU usage spikes to 90%, the document is displayed, but the application freezes and has to be terminated from Task Manager.

Expected behavior:

Platform: 
              
Win XP SP 3
Comment 1 Rainer Bielefeld Retired 2012-04-27 09:46:19 UTC
HANG ist [Reproducible] with "LibreOffice 3.5.3.2 (RC2) German UI/Locale [Build-ID: 235ab8a-3802056-4a8fed3-2d66ea8-e241b80] on German WIN7 Home Premium (64bit) 

[Reproducible] with Server installation of Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) ENGLISH UI [(Build ID:  d38713d-5d03837-ca7e6f5-c4bb9bd-ce71330)]" (Voreppe_Win32_Tinderbox 2011-11-15)

Works fine with Server installation of Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) English UI [(Build ID:  d3d1481-3f8994a-2ba0a9f)]" (2011-09-09)

3.4.5 opens the document without problems, so REGRESSION
Comment 2 Cody 2012-04-28 19:02:27 UTC
Hang is reproducible with LibreOffice 3.5.2.2 Build ID: 281b639-6baa1d3-ef66a77-d866f25-f36d45 on Windows 7 Pro, SP1, 64 bit edition.

Hang is also reproducible with LibreOffice 3.5.3.2 (RC2) Build ID: 235ab8a-3802056-4a8fed3-2d66ea8-e241b8 on Windows 7 Pro, SP1, 64 bit edition.
Comment 3 Elton Chung 2012-04-30 07:27:33 UTC
bibisected, Ubuntu 11.10 amd64.

 193201016cfa131b76e2eabf5ddbae19ce209157 is the first bad commit
commit 193201016cfa131b76e2eabf5ddbae19ce209157
Author: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
Date:   Thu Dec 8 06:49:52 2011 +0100

    source-hash-6598e65cfcabd270199d09d11d9d93639bca620d
    
    commit 6598e65cfcabd270199d09d11d9d93639bca620d
    Author:     Caolán McNamara <caolanm@redhat.com>
    AuthorDate: Thu Nov 3 15:36:28 2011 +0000
    Commit:     Caolán McNamara <caolanm@redhat.com>
    CommitDate: Thu Nov 3 15:42:41 2011 +0000
    
        probably need to add mbIsGrey to operator== comparison

:100644 100644 e15ffe8e773f1dcd19f449efa7f53024470c9cce e82c4145d70e5845ec7a8d49d489d926c2e30e9a M	autogen.log
:100644 100644 8a5c9fdba21f3acd2bb134e9ead7cad5bbe8113f f8da83172bf617355f62008302c40f4aca661128 M	ccache.log
:100644 100644 9b17087f57682efaea74a9ca86cb01306e8424fa 552c3d80c429179541b5b4d4db24d49b1941459e M	commitmsg
:100644 100644 b08a98de074e1de3d755f89ef54e4b14caef2981 2227d419c7d60ab38ce75bbb4aaa0b79cf4afada M	dev-install.log
:100644 100644 f7e04f8f8d96dbf5604f9d8ef3f65c2cd7e4b150 6ac608a6a6e07110c54cfbb01f9be2d68be0855c M	make.log
:040000 040000 d396f390560449a296a5d115ddd1ae74959520bf 6be8947021235b712f136cf198ca0446ffa5ccd3 M	opt


# bad: [4c30602f43475389f81b1d981ce8ee9a3410b9d9] source-hash-85c6244b85b29c1d2bb9d89b62e9512dd65378b5
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect start 'latest' 'oldest'
# good: [2faf4bc12ab490370d2196dedbc8091f9b09d0a5] source-hash-418a35f4861e863feb39eec73f4a39a87fbcb1f3
git bisect good 2faf4bc12ab490370d2196dedbc8091f9b09d0a5
# bad: [b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4] source-hash-ce60138d339a5eb2a174a5d27063249acf2cac42
git bisect bad b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4
# bad: [0a28a62d53e996cf66d86e9bfb63ddc6ade75b7e] source-hash-71cbcb62028295a98ceee60cb4c4ee425bafcd2e
git bisect bad 0a28a62d53e996cf66d86e9bfb63ddc6ade75b7e
# bad: [16f81707f835f12f5fcd8d258ebbddb5f2cc8e53] source-hash-1ca547d20882e9b3d3ba9a6c7ee0340a5b7009b0
git bisect bad 16f81707f835f12f5fcd8d258ebbddb5f2cc8e53
# bad: [193201016cfa131b76e2eabf5ddbae19ce209157] source-hash-6598e65cfcabd270199d09d11d9d93639bca620d
git bisect bad 193201016cfa131b76e2eabf5ddbae19ce209157
# good: [db83d7490566a710f00c93319f85cc1bd1fc7cd7] source-hash-c5e280b4144d3ed642404079f464a42829be3f80
git bisect good db83d7490566a710f00c93319f85cc1bd1fc7cd7
Comment 4 Rainer Bielefeld Retired 2012-04-30 07:36:20 UTC
@elton@layerjet.com
Bebisect result seems to show that problem is reproducible with Linux?
Comment 5 Caolán McNamara 2012-05-01 06:58:07 UTC
PROFORMA INVOICE No.", ' ' <repeats 56655 times> that's a *lot* of space characters and the complex text char count grinds through it way too slowly
Comment 6 Elton Chung 2012-05-01 07:28:12 UTC
(In reply to comment #4)
> @elton@layerjet.com
> Bebisect result seems to show that problem is reproducible with Linux?

Yes.
Comment 7 Not Assigned 2012-05-01 08:30:20 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=268ec2e64f89eb39fd5f02688787cd6f53e948b5

Related: fdo#49208 crazy to create the string *twice*
Comment 8 Not Assigned 2012-05-01 08:30:46 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: fdo#49208 don't copy string if we can reuse the original
Comment 9 Not Assigned 2012-05-01 08:31:12 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: fdo#49208 icu string compare is shocking slow
Comment 10 Not Assigned 2012-05-01 08:31:38 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Related: fdo#49208 optimize common case
Comment 11 Caolán McNamara 2012-05-01 08:45:54 UTC
What makes this document special is that it has paragraphs that are nearly 64k in length, they end with vast quantity of spaces, and writer implements a word compatibility feature to allow huge quantity of trailing whitespace to overflow out of the page boundary instead of wordwrapping which is why it's not immediately obvious.

Turns out to be a good testcase for edge case break iterator behaviour
Comment 12 Rainer Bielefeld Retired 2012-05-01 10:56:31 UTC
OS due to ocmments 4,6
Comment 13 Not Assigned 2012-05-02 03:25:37 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6f0503c82c0a019678458ded9e339a71f96d837d

Related: fdo#49208 use UText adaptor to underlying rtl::OUString
Comment 14 Not Assigned 2012-05-02 03:26:16 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2b168feccee9c367152e106386101be903e4f1db

Related: fdo#49208 implement operator== with faster equals
Comment 15 Not Assigned 2012-05-02 04:25:51 UTC
Caolan McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

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

Resolves: fdo#49208 performance problems with very long paragraphs


It will be available in LibreOffice 3.5.4.
Comment 16 s-joyemusequna 2012-05-19 01:08:26 UTC
Verified with LOdev 3.6 (master - 18-May-2012 02h44 x86@6-fast; Build ID: 8b1d29b) under Windows Vista 64.