Bug 96102 - FILEOPEN: LibO hangs with 100% CPU when loading an .html incorrectly labeled as .doc
Summary: FILEOPEN: LibO hangs with 100% CPU when loading an .html incorrectly labeled ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Depends on:
Blocks: DOC-Opening HTML-Import
  Show dependency treegraph
Reported: 2015-11-27 11:45 UTC by Christian Uceda
Modified: 2021-04-09 15:01 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:

A HTML file whose extension is wrong. (7.18 MB, application/msword)
2015-11-27 11:45 UTC, Christian Uceda

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Uceda 2015-11-27 11:45:08 UTC
Created attachment 120837 [details]
A HTML file whose extension is wrong.

I downloaded what I though was a .doc file but in reality was a large .html with the wrong name.

Instead of warning that the file is of the wrong type LibreOffice just stuck at 100% CPU on the loading splash screen.

When I was trying to diagnose the problem on the console it was easy to spot the problem:


user@krang:~/Downloads$ libreoffice anonymous.doc 
:6: parser error : internal error: detected an error in element content

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.or
:6: parser error : internal error: detected an error in element content

(these same lines multiple times)


user@krang:~/Downloads$ file anonymous.doc 
anonymous.doc: HTML document, ASCII text, with very long lines, with CRLF, LF line terminators


The bug I guess is that LibreOffice should not attempt to open files which are not supported, or at least do basic checks before opening the file as a certain type.

This problem is very easy to spot for an IT person, but can confuse a non-technical person and leave an undeserved negative impression of LibreOffice.

I have seen this happen before to other people, but it never occurred to me this could be the issue as I had no involvement (help desk dealt with the problem, I was just an observer).

Please consider adding basic file type checking before attempting opening documents.

I have attached the offending not ".doc" file.
Comment 1 Christian Uceda 2015-11-27 11:45:43 UTC
Sorry I forgot, my OS is:

Description:	Ubuntu 14.04.3 LTS
Release:	14.04
Codename:	trusty
Comment 2 tommy27 2015-11-28 07:49:33 UTC
same issue under Win8.1 x64 too, using LibO and recent alpha daily build

I see the same problem on AOO 4.1.0 and OOo 3.3.0 so the bug is inherited from OOo
Comment 3 QA Administrators 2018-08-22 02:37:17 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2020-08-22 03:50:20 UTC Comment hidden (obsolete, spam)
Comment 5 Justin L 2021-04-09 15:01:33 UTC
repro 7.2+
It eventually loaded, but was extremely sluggish still to do anything at that point. Of course, it is also 7 MB of pure text...