Bug 50868 - Libvisio: Draw Crash/Freeze on loading MS Lync Server 2010 Topology Sample Visio Files
Summary: Libvisio: Draw Crash/Freeze on loading MS Lync Server 2010 Topology Sample Vi...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL: https://wiki.documentfoundation.org/Q...
Whiteboard: BSA target:3.7.0 target:3.6.0.0.beta2...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-07 22:47 UTC by John Smith
Modified: 2012-08-03 09:14 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Bug 50868 - WinDbg session (12.84 KB, text/plain)
2012-06-08 04:48 UTC, bfoman (inactive)
Details
Bug 50868 - WinDbg session - HLB_Topology.vsd (12.85 KB, text/plain)
2012-06-08 05:07 UTC, bfoman (inactive)
Details
Bug 50868 - WinDbg session Consolidated_Topology.vsd (12.80 KB, text/plain)
2012-06-08 05:38 UTC, bfoman (inactive)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Smith 2012-06-07 22:47:10 UTC
Problem description: Draw Hangs/Freezes or Crashes when attempting to load the example Microsoft Lync Server 2010 Edge Topology files.

Steps to reproduce:
1. Start LibreOffice
2.Select 'Open'
3. Dubbel click (one of) the visio sample files

Current behavior:
Draw either Freezes/Hangs (becomes unrepsonsive), or crashes with the message 'LibreOffice has stopped working. Close the program'.

Expected behavior:
A import of the visio file in Draw.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (Windows NT 6.0; rv:13.0) Gecko/20100101 Firefox/13.0
Comment 1 John Smith 2012-06-07 23:13:31 UTC
Uploaded the example visio files to the location mentioned in 'URL' in the bug report.
Comment 2 Fridrich Strba 2012-06-08 01:33:56 UTC
What I see here is that the files are a mess to render. They have several issues:
1) A file of 9 MB is quite slow to parse for us, since the content of the Visio file is compressed with a custom compression and we have to uncompress them into memory first before being able to parse it.
2) The files have a fair amount of NURBS. There is no NURBS primitive in ODG, or SVG. Instead of approximating them using bezier cubic segments, we approximate them with 200 lines for each two knots. Some of the rendering will be faster once we change this approach. And I will not mind a help of someone who has an experience with that. "The NURBS Book" is a good source of ideas how to do it.

There is a workaround if you are interested for the while: disable antialiasing in Draw and it will render faster, albeit it will not be as nice as it could.
Comment 3 bfoman (inactive) 2012-06-08 04:48:47 UTC
Created attachment 62789 [details]
Bug 50868 - WinDbg session

Confirmed with:
LO 3.5.4.2 
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Crash while opening Lync_Server_2010_Edge_ScaledConsolidated_DNSLB_Topology.vsd.
Attached full WinDbg session with mini dump file loaded generated by procdump soffice.bin -h.
Comment 4 bfoman (inactive) 2012-06-08 05:07:38 UTC
Created attachment 62791 [details]
Bug 50868 - WinDbg session - HLB_Topology.vsd

Confirmed with:
LO 3.5.4.2 
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Crash while opening
Lync_Server_2010_Edge_ScaledConsolidated_HLB_Topology.vsd.
Attached full WinDbg session with mini dump file loaded generated by procdump
soffice.bin -h.
Comment 5 bfoman (inactive) 2012-06-08 05:38:28 UTC
Created attachment 62792 [details]
Bug 50868 - WinDbg session Consolidated_Topology.vsd

Confirmed with:
LO 3.5.4.2 
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Crash while opening
Lync_Server_2010_Edge_SingleConsolidated_Topology.vsd.
Attached full WinDbg session with mini dump file loaded generated by procdump
soffice.bin -h.
Comment 6 Fridrich Strba 2012-06-08 08:30:07 UTC
OK, I see the crash and have an idea where it comes from. Will try to fix both libwpd and libvisio for 3.5.5.
Comment 7 Not Assigned 2012-06-08 15:15:51 UTC
Fridrich Štrba committed a patch related to this issue.
It has been pushed to "master":

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

Fix potential further crashes like the one in fdo#50868
Comment 8 Not Assigned 2012-06-08 15:21:53 UTC
Fridrich Å trba committed a patch related to this issue.
It has been pushed to "libreoffice-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=214c3b9002944ff5d05e249051e45f135e1b4943&g=libreoffice-3-6

Fix potential further crashes like the one in fdo#50868


It will be available in LibreOffice 3.6.
Comment 9 Fridrich Strba 2012-06-08 15:37:10 UTC
Just for the completion, this patch also was pushed into master and libreoffice-3-6 branch. I verified on windows that before the patch, LibreOffice was crashing, and that it is not crashing with it anymore.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e71749a089fa3e6463b80413b638f7dc32921a07
Comment 10 Julien Nabet 2012-06-10 14:14:07 UTC
Just for information, on Pc Debian x86-64 with master sources updated today, I got no crash for each of the 3 files (normal with the Fridrich's fix :-) )
but I noticed lots of these 3 types of logs :
warn:legacy.tools:13399:1:/home/julien/compile-libreoffice/libo/sfx2/source/dialog/filtergrouping.cxx:371: ReferToFilterEntry::operator(): already have an element for this name!
warn:legacy.osl:13399:1:/home/julien/compile-libreoffice/libo/svx/source/sdr/contact/viewcontactofsdrpathobj.cxx:70: PolyPolygon object without geometry detected, this should not be created (!)
warn:legacy.tools:13399:1:/home/julien/compile-libreoffice/libo/sfx2/source/dialog/filtergrouping.cxx:371: ReferToFilterEntry::operator(): already have an element for this name!

I don't know if it's important or not, again, just for info.
Comment 11 Not Assigned 2012-06-11 02:47:59 UTC
Fridrich Å trba committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

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

Fix crash from fdo#50868


It will be available in LibreOffice 3.5.5.
Comment 12 Not Assigned 2012-06-11 02:48:25 UTC
Fridrich Å trba committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

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

Fix potential further crashes like the one in fdo#50868


It will be available in LibreOffice 3.5.5.
Comment 13 Valek Filippov 2012-07-13 05:28:23 UTC
Is it fixed now?
Comment 14 John Smith 2012-07-14 09:08:19 UTC
(In reply to comment #13)
> Is it fixed now?
I tried opening the files with master 'master~2012-07-14_00.31.17_LibO-Dev_3.7.0.0.alpha0_Win_x86_install_en-US.msi'. Although I do not have a crash, libreoffice does seem to become unresponsive/freeze/hang. The window title bar changes to "LODev (Not Responding)" after a few seconds. I waited for more than a full minute after that with each file, but the file still hasnt opened at that point. Even if the files do open at some point, I guess it will still at least appear that the program is freezing to the average user.
Comment 15 Valek Filippov 2012-07-14 14:34:40 UTC
I can open all of the attached three VSD with LO draw 3.6rc1.
It takes some time (~3 minutes on my laptop), but doesn't hang or crash.
Fridrich, some type of the progress bar would be nice to have for such cases.

There is a space for improvements, for these particular files better handling of NURBSes could be the key.

I believe initial crash/freeze is fixed.
Comment 16 John Smith 2012-07-14 15:23:32 UTC
(In reply to comment #15)
> I believe initial crash/freeze is fixed.
Yes, there is no longer any real/actual freeze/hang (or crash). If I wait long enough, the files do eventually open.
Comment 17 Valek Filippov 2012-07-14 15:36:42 UTC
Fridrich, do we need an enhancement request(s)?

We could probably link one to this bug report as a source of stress-testing samples.
Comment 18 John Smith 2012-07-14 20:12:43 UTC
(In reply to comment #17)
> Fridrich, do we need an enhancement request(s)?
> 
> We could probably link one to this bug report as a source of stress-testing
> samples.
That would be a really good idea. 

However, this might require storing the visio files in another, permanent location, as I probably cannot keep them stored in the URL listed for ever. And as we are talking about 9MB files here (about 6MB compressed), adding them as an attachment to this bug report is not really an option either.
Comment 19 Julien Nabet 2012-07-15 08:12:46 UTC
There's a link about files bigger than 3MB, see here: http://wiki.documentfoundation.org/QA/Bugzilla-Attachments
Comment 20 John Smith 2012-07-15 08:52:02 UTC
Uploaded files to the wiki, and changed URL accordingly.
Comment 21 Rainer Bielefeld Retired 2012-08-03 09:14:14 UTC
We need exact and correct target information for automated lists in Wiki and LibO Web Site.