Bug 94334 - Error message "Too many windows opened" with docx with equations
Summary: Error message "Too many windows opened" with docx with equations
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.1.2 release
Hardware: x86-64 (AMD64) Windows (All)
: low normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: Error-Messages DOCX-Formula
  Show dependency treegraph
 
Reported: 2015-09-18 07:25 UTC by Marcellus Wallace
Modified: 2018-12-18 08:13 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
the message box (204.13 KB, image/png)
2015-09-18 07:25 UTC, Marcellus Wallace
Details
le fichier qui me pose problème (80.96 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2015-09-18 07:27 UTC, Marcellus Wallace
Details
typescript of opening the file on Linux (101.94 KB, text/plain)
2015-09-21 13:19 UTC, Terrence Enger
Details
officeotron output (9.75 KB, text/plain)
2015-09-21 13:22 UTC, Terrence Enger
Details
DrMemory logs.zip (109.12 KB, application/zip)
2016-10-05 08:37 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcellus Wallace 2015-09-18 07:25:21 UTC
Created attachment 118817 [details]
the message box

I tried to modify a docx with some equations inside.
When I try to modify it an infinite message box appears "too many windows opened"
When I try to kill this message I find it's from "Microsoft equation editor", but I have to kill LibreOffice to make the message stop
Comment 1 Marcellus Wallace 2015-09-18 07:27:21 UTC
Created attachment 118818 [details]
le fichier qui me pose problème
Comment 2 Julien Nabet 2015-09-18 21:40:33 UTC
On pc Debian x86-64 with master sources updated today, I didn't reproduce this problem but noticed this on console:
warn:writerfilter:19252:1:writerfilter/source/dmapper/OLEHandler.cxx:227: OLEHandler::importStream: unhandled m_sProgId: Equation.2

In fact, there are Equation.3 and Equation.2 on the file.
First ones display ok and can be edited.
Second ones display ok too but can't be edited (when trying, it opens a Math Window with "'" symbol instead of "x".

I tried this:
diff --git a/writerfilter/source/dmapper/OLEHandler.cxx b/writerfilter/source/dmapper/OLEHandler.cxx
index 6208750..5deb99c 100644
--- a/writerfilter/source/dmapper/OLEHandler.cxx
+++ b/writerfilter/source/dmapper/OLEHandler.cxx
@@ -221,7 +221,7 @@ void OLEHandler::importStream(uno::Reference<uno::XComponentContext> xComponentC
     OUString aFilterService;
     if (m_sProgId == "Word.Document.12")
         aFilterService = "com.sun.star.comp.Writer.WriterFilter";
-    else if (m_sProgId == "Equation.3")
+    else if (m_sProgId == "Equation.3" || m_sProgId == "Equation.2")
         aFilterService = "com.sun.star.comp.Math.MathTypeFilter";
     else
         SAL_WARN("writerfilter", "OLEHandler::importStream: unhandled m_sProgId: " << m_sProgId);
@@ -259,7 +259,7 @@ OUString OLEHandler::getCLSID(uno::Reference<uno::XComponentContext> xComponentC
         if (officecfg::Office::Common::Filter::Microsoft::Import::WinWordToWriter::get(xComponentContext))
             aRet = "8BC6B165-B1B2-4EDD-aa47-dae2ee689dd6";
     }
-    else if (m_sProgId == "Equation.3")
+    else if (m_sProgId == "Equation.3" || m_sProgId == "Equation.2")
     {
         if (officecfg::Office::Common::Filter::Microsoft::Import::MathTypeToMath::get(xComponentContext))
             aRet = "078B7ABA-54FC-457F-8551-6147E776A997";

and could edit equations which couldn't be edited first but still have this strange symbol.

Miklos: any thoughts?
Comment 3 Terrence Enger 2015-09-21 13:16:58 UTC
Setting status NEW because ...

Using the Win32 daily build from 2015-08-13 on Windows Vista, the file
appeared to open without problem.  The message came up a good part of
an hour later.  After the message came up 25 times, I cancelled the
program.

The file opened without obvious problem in both MSWord 2003 SP3 and on
Linux in daily dbgutil bibisect version 2015-09-18.  However, the
latter produced a lot of warnings in the terminal; attachment coming
soon.
Comment 4 Terrence Enger 2015-09-21 13:19:50 UTC
Created attachment 118899 [details]
typescript of opening the file on Linux

This typescript is from daily dbgutil bibisect version 2019-09-18.
Comment 5 Terrence Enger 2015-09-21 13:22:38 UTC
Created attachment 118900 [details]
officeotron output

Just one ERROR, but a lot of INFO messages.
Comment 6 Timur 2016-10-05 08:35:14 UTC
Error message "too many windows opened" reproduced with 32-bit master, not on fileopen but after a while. I just had to click OK many times, not to kill LO which stayed open. Adjusted priority.
Comment 7 Timur 2016-10-05 08:37:54 UTC
Created attachment 127817 [details]
DrMemory logs.zip
Comment 8 QA Administrators 2018-05-04 02:40:31 UTC Comment hidden (obsolete)
Comment 9 Roman Kuznetsov 2018-12-18 08:13:13 UTC
don't repro in

Version: 6.3.0.0.alpha0+
Build ID: 3c964980da07892a02d5ac721d80558c459532d0
CPU threads: 4; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-12_02:07:45
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded

Status->WFM