Bug 37146 - Writer hangs opening DOC from Mexican government
Summary: Writer hangs opening DOC from Mexican government
Status: RESOLVED DUPLICATE of bug 61967
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: high major
Assignee: Not Assigned
URL: ftp://ftp2.sat.gob.mx/asistencia_serv...
Whiteboard:
Keywords: filter:doc, haveBacktrace, implementationError
Depends on:
Blocks: DOC
  Show dependency treegraph
 
Reported: 2011-05-12 10:06 UTC by Juan
Modified: 2021-06-09 15:05 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
A Mexican government notice (408.50 KB, application/msword)
2011-05-12 10:06 UTC, Juan
Details
3 bts at random (2.53 KB, application/x-bzip)
2013-05-08 07:59 UTC, Julien Nabet
Details
procdump+debug (17.37 KB, text/plain)
2016-01-06 17:39 UTC, Timur
Details
Reduced test case DOC (24.50 KB, application/vnd.ms-word)
2016-01-14 11:41 UTC, Timur
Details
Reduced test case DOC open in MSO (17.41 KB, image/jpeg)
2016-07-29 07:11 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juan 2011-05-12 10:06:38 UTC
Created attachment 46643 [details]
A Mexican government notice

Writer hangs when trying to open the attached file.  After it hangs, the CPU usage of the soffice.bin process remains high (>90%).
Comment 1 Juan 2011-05-13 07:45:54 UTC
Tested today with 3.4 beta 5 (DEV300m103 build:5) and the results are same same: it hangs.

Observing the behavior of the soffice.bin process in task manager, the memory usage increases constantly.  I let it run for around 5 minutes...
Comment 2 Petr Mladek 2011-05-16 08:34:38 UTC
I see this also on Linux (SLED11-SP1, x86_64) with LO-3.4-beta5 and with LO-3.3.2.
Comment 3 Juan 2011-05-16 10:31:29 UTC
In case this helps, OpenOffice 3.3.0 (OOO330m20 Build:9567) under Windows XP has no problem opening this file.
Comment 4 Juan 2011-05-20 10:10:08 UTC
Another sample file that hangs under LibO 3.3.2 & WinXP.

The same file opens OK under OO 3.3.0 (OOO330m20 build 9567), MS Word 2000 (9.0.2720), and MS Word Viewer (11.8169.8172 SP3).

Cheers!
Comment 5 Juan 2011-05-20 10:12:59 UTC
(In reply to comment #4)

> Another sample file that hangs under LibO 3.3.2 & WinXP.
 
I expected to see a link to the URL that I included on my comment #4.  Anyway, I just want you guys to know that the URL on this bug corresponds to that comment.
Comment 6 Mike §chinagl 2012-01-15 05:04:00 UTC
I can confirm it that Writer hangs under Ubuntu Linux 10.10 with Kernel 2.3.35.31 with LibreOffice 3.4.4 OOO340m1 (Build:402)
Comment 7 Caolán McNamara 2012-02-29 06:15:22 UTC
caolanm->mstahl: do you have some good ideas about how to debug into these apparently layout loops
Comment 8 Julien Nabet 2012-08-18 18:47:22 UTC
On pc Debian x86-64 with master sources updated today, I reproduce the problem.

No specific console logs so I runned gdb and Ctrl-C at random, found this interesting bt:
(gdb) bt
#0  0x00007fe46caa5262 in SwFlowFrm::HasFollow (this=0x4fc2810) at /home/julien/compile-libreoffice/libo/sw/source/core/inc/flowfrm.hxx:171
#1  0x00007fe46cebda0d in SwCntntFrm::FindMaster (this=0x49e87c0) at /home/julien/compile-libreoffice/libo/sw/source/core/layout/flowfrm.cxx:721
#2  0x00007fe46d097f8f in SwTxtFrm::HideAndShowObjects (this=0x49e87c0) at /home/julien/compile-libreoffice/libo/sw/source/core/text/txtfrm.cxx:639
#3  0x00007fe46d097fd8 in SwTxtFrm::HideAndShowObjects (this=0x4fc5400) at /home/julien/compile-libreoffice/libo/sw/source/core/text/txtfrm.cxx:642
#4  0x00007fe46d097fd8 in SwTxtFrm::HideAndShowObjects (this=0x4fc6090) at /home/julien/compile-libreoffice/libo/sw/source/core/text/txtfrm.cxx:642
more than 5000 times this same line !
    641         if (pMaster)
    642             pMaster->HideAndShowObjects();
    643     }

I tried this very naive patch, it seems to fix the loop found but it doesn't solve the bug :-(
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 1005969..0bceed5 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -637,9 +637,13 @@ void SwTxtFrm::HideAndShowObjects()
     if (IsFollow())
     {
         SwTxtFrm *pMaster = FindMaster();
+        static bool bMasterHideAndShowObjDone = false;
         OSL_ENSURE(pMaster, "SwTxtFrm without master");
-        if (pMaster)
+        if (pMaster && !bMasterHideAndShowObjDone)
+        {
+            bMasterHideAndShowObjDone = true;
             pMaster->HideAndShowObjects();
+        }
     }
 }
Comment 9 A (Andy) 2013-05-05 19:24:33 UTC
reproducible with LO 4.0.2.2 (Win7 Home, 64bit)

in MSO 2007 it is opened immediately
maybe it depends on the large table in this document?
Comment 10 Julien Nabet 2013-05-08 07:59:38 UTC
Created attachment 79014 [details]
3 bts at random

On pc Debian x86-64 with master sources udpated today, I still reproduce the hanging. I attached 3 bts at random. There's nothing special on console.
Comment 11 Cédric Bosdonnat 2014-01-20 08:57:30 UTC
Restricted my LibreOffice hacking area
Comment 12 Joel Madero 2015-05-02 15:44:24 UTC Comment hidden (obsolete)
Comment 13 Juan 2015-05-05 06:39:27 UTC
Today I tested under Win 8.1 Pro observing the same behavior.

The following versions of LibreOffice hang while opening this file:

   3.3.0   OOO330m19 (Build:6)
   3.6.5.2 build id 5b93205
   4.4.2.2 build id c4c7d32d0d49397cad38d62472b0bc8acff48dd6

In case it helps, the file opens under:

   OpenOffice.org    3.2.1 ooo320m18 build 9502
   Apache OpenOffice 4.0.0 Aoo400m3  build 9702

As requested, after testing under 3.3.0 I am changing the version to "inherited from OOo".

Thanks for keeping with such a good job with LO!
Comment 14 Timur 2016-01-06 17:39:59 UTC
Created attachment 121752 [details]
procdump+debug
Comment 15 Timur 2016-01-14 11:41:29 UTC
Created attachment 121929 [details]
Reduced test case DOC

I add a reduced test case DOC. The only thing in there is section break. I reported header issue separately as Bug 97128.
Comment 16 Timur 2016-07-29 07:11:32 UTC
Created attachment 126459 [details]
Reduced test case DOC open in MSO
Comment 17 Julien Nabet 2016-07-31 09:21:32 UTC
With master sources updated yesterday (on pc Debian x86-64 +  gtk3 rendering), I still can't open reduced test case doc.
I got nothing on console logs after this:
warn:configmgr:7304:1:configmgr/source/propertynode.cxx:62: non-nillable property without value
warn:configmgr:7304:1:configmgr/source/propertynode.cxx:62: non-nillable property without value
warn:unotools.config:7304:1:unotools/source/config/configitem.cxx:431: ignoring XHierarchicalNameAccess to /org.openoffice.Office.Compatibility// Exception: 
warn:unotools.config:7304:1:unotools/source/config/configitem.cxx:431: ignoring XHierarchicalNameAccess to /org.openoffice.Office.Compatibility// Exception: 

Michael/Oliver: thought you might be interested in this long standing bug since you're the Writer experts (https://wiki.documentfoundation.org/FindTheExpert)
Comment 18 Xisco Faulí 2017-01-26 16:06:23 UTC
It opens if 347bb1634b10eba577742fe8a7edb4b2dd69265d is reverted. Closing as
RESOLVED DUPLICATED of bug 76219

*** This bug has been marked as a duplicate of bug 76219 ***
Comment 19 Timur 2021-06-09 15:05:31 UTC
Repro 7.2+. Let's consider duplicate.

*** This bug has been marked as a duplicate of bug 61967 ***