Bug Hunting Session
Bug 105769 - Crash when saving a pasted HTML table as DOCX or HTML, repro in comment 14 (Win, 64-bit build only)
Summary: Crash when saving a pasted HTML table as DOCX or HTML, repro in comment 14 (W...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0.0.5 release
Hardware: x86-64 (AMD64) Windows (All)
: high critical
Assignee: Not Assigned
URL:
Whiteboard: interoperability,
Keywords: filter:docx
: 106120 106121 106936 108282 108315 108987 109337 116300 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-02-05 13:00 UTC by timlg98
Modified: 2019-05-15 09:32 UTC (History)
10 users (show)

See Also:
Crash report or crash signature: ["SwWriteTable::SwWriteTable(SwTable const *,SwHTMLTableLayout const *)"]


Attachments
Source document (24.92 KB, application/vnd.oasis.opendocument.text)
2017-02-05 16:22 UTC, timlg98
Details
Sample HTML: copy table from browser to Writer, save as DOCX (506 bytes, text/html)
2017-04-08 01:55 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description timlg98 2017-02-05 13:00:23 UTC
This bug was filed from the crash reporting server and is br-70900f41-cbf4-4de4-814c-aa7a7c54800d.
=========================================

Problem occurred during filesave. Had created document and saved as .odt and then wanted to create the same document as .docx. Did saveas and chose the MS Office 2007 format .docx and tried to save and that is when the error occurred.
Comment 1 Xisco Faulí 2017-02-05 15:06:59 UTC Comment hidden (obsolete)
Comment 2 timlg98 2017-02-05 16:22:58 UTC
Created attachment 130921 [details]
Source document
Comment 3 Xisco Faulí 2017-02-05 16:42:06 UTC Comment hidden (obsolete)
Comment 4 Timur 2017-02-21 17:54:36 UTC
*** Bug 106120 has been marked as a duplicate of this bug. ***
Comment 5 Timur 2017-02-21 18:04:44 UTC
So far, it's reported in Windows:
http://crashreport.libreoffice.org/stats/signature/SwWriteTable::SwWriteTable%28SwTable%20const%20*,SwHTMLTableLayout%20const%20*%29
But it has 103 pages of reports! With different versions from 5.2.0.4 up to last that reports, LO 5.3.0.3.

I also cannot reproduce when I simply save attachment 130921 [details] as .docx.
timlg98, is this crash reproducible for you, if you that this .odt, do you have crash each time you save as .docx?
Comment 6 Michael Weske 2017-02-21 18:25:41 UTC
Yes I can duplicate it every time.

EXAMPLE:
The e-mail asking if I could duplicate the issue has a table in it.
1) open   swriter
2) copy table from e-mail and past into swriter
3) "Save" document   (standard .odt format)
4) "Save As"  and change type to "Microsoft Word 2007-2013 XML (.docx)
    It prompts that with the "Confirm Format" dialog.  I approve and
    it crashes.
5) allow it to recover the document (or just load the saved document) and you can save as .docx

I did the same thing with step 2 being text instead of a table and it worked as expected.

Also, I realize the second case was a duplicate, but since I had the two crash reports, I was not sure how to tie the second one to this.

I hope this helps.
Comment 7 Xisco Faulí 2017-02-21 18:56:38 UTC
I can't reproduce the steps described in comment 6 in 

Versión: 5.3.0.3
Id. de compilación: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
Subpr. de CPU: 1; Versión de SO: Windows 6.1; Repr. de IU: predet.; Motor de trazado: HarfBuzz; 
Configuración regional: es-ES (es_ES); Calc: group

@Michael, could you please reset your Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and re-test?
OTOH, Could you please provide the information in Help - About LibreOffice ?
Comment 8 Michael Weske 2017-02-22 03:43:10 UTC Comment hidden (obsolete)
Comment 9 Michael Weske 2017-02-22 03:58:34 UTC
I apologize for not thinking of this sooner.  I removed LibreOffice 64bit and installed 32bit.  Help >> About:
Version: 5.3.0.3
Build ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: single

Everything worked fine in the 32bit version.  It is only the 64bit that crashes.
Comment 10 Timur 2017-02-23 08:35:25 UTC
Steps need to be reproducible, like "copy THIS SPECIFIC table from THIS ATTTACHED file" or "copy THIS SPECIFIC table from THIS EXACT web page".
"Copy from some e-mail" or "copy from some modem data" don't help.
Comment 11 Timur 2017-04-04 08:55:05 UTC
*** Bug 106121 has been marked as a duplicate of this bug. ***
Comment 12 Timur 2017-04-04 08:58:08 UTC
*** Bug 106936 has been marked as a duplicate of this bug. ***
Comment 13 Timur 2017-04-04 09:25:48 UTC Comment hidden (obsolete)
Comment 14 Timur 2017-04-04 09:39:43 UTC
OK, I reproduced with Michaels' steps described in comment 6: 

1) open bugzilla-daemon e-mail which has a HTML table and copy just table (no other text), part like this (which is not HTML here): 
What 	Removed 	Added
CC 	  	alexander_8901@mail.ru
2) open Writer, I used LO 5.3.2.1 64-bit
3) paste table into swriter
4) "Save As" and change type to "Microsoft Word 2007-2013 XML (.DOCX)
    It prompts that with the "Confirm Format" dialog.  I approve and it crashes.

http://crashreport.libreoffice.org/stats/crash_details/260cc07c-489f-4b49-8bad-83bc02713559

I wasn't able to reproduce when I copies some other text with table. 
First saving to .ODT wasn't necessary in my case.
Comment 15 Aron Budea 2017-04-06 23:50:57 UTC
Great suggestion with the specific steps. I also get the crash with 64-bit v5.3.2.2 / Windows 7.

Indeed, no crash with 32-bit build, nor with ODT or DOC format, and not even if the table is first saved as ODT, and then reloaded and saved again as DOCX.
Comment 16 Caolán McNamara 2017-04-07 10:17:53 UTC
"open bugzilla-daemon e-mail which has a HTML table and copy just table (no other text), part like this (which is not HTML here):" assumes there is such an email available to a developer interesting in reproducing it, and the final content pasted into the document might depend on the application its pasted from. So that's not a surefire reproduction route.
Comment 17 Timur 2017-04-07 15:00:00 UTC
I had crash also when first save pasted HTML as HTML type. Can't figure out how to attach original HTML from webmail. Paste from HTML saved by LO is OK.
Comment 18 Aron Budea 2017-04-08 01:55:33 UTC
Created attachment 132404 [details]
Sample HTML: copy table from browser to Writer, save as DOCX

Caolán, you're tight, I'm attaching a sample HTML file.
I have tested with Firefox and IE 11, and could reproduce the crash with both.
Comment 19 Michael Stahl (CIB) 2017-04-13 16:50:49 UTC
can't reproduce on Windows 7 with 64-bit build of current master

tried running it with DrMemory too, no warnings were reported

tried copy/paste from Firefox and IE

maybe the problem is fixed on master already and only affects 5.3?
Comment 20 Timur 2017-04-13 18:09:43 UTC
Looks like Michael is right. I can reproduce with 64-bit from 5.0 (didn't test previous) up to 5.3 and not with 5.4+. 
Tested with master~2017-04-13_00.34.50_LibreOfficeDev_5.4.0.0.alpha0_Win_x64_en-US_de_ar_ja_ru_qtz.

Now it has 163 pages of reports! 
http://crashreport.libreoffice.org/stats/signature/SwWriteTable::SwWriteTable%28SwTable%20const%20*,SwHTMLTableLayout%20const%20*%29
With different versions from 5.2.0.4 up to last that reports, LO 5.3.2.2. Let's hope it was fixed and (recently) backported. 
Aron, can you make a bibisect?

I'll close as WFM. Of course, feel free to reopen if you miss this bug and reproduce it somehow with 5.4.
Comment 21 Aron Budea 2017-04-14 16:00:26 UTC
Windows bibisect repos are 32-bit, and unfortunately not useful here.
Comment 22 Xisco Faulí 2017-05-13 11:41:00 UTC
5 reports from 5.3.3.2 as per today: http://crashreport.libreoffice.org/stats/signature/SwWriteTable::SwWriteTable(SwTable%20const%20*,SwHTMLTableLayout%20const%20*)
So I guess it hasn't been backported to branch 5.3
Comment 23 Xisco Faulí 2017-06-01 15:57:50 UTC
*** Bug 108282 has been marked as a duplicate of this bug. ***
Comment 24 Aron Budea 2017-06-04 03:21:54 UTC
*** Bug 108315 has been marked as a duplicate of this bug. ***
Comment 25 Xisco Faulí 2017-07-10 16:04:08 UTC
*** Bug 108987 has been marked as a duplicate of this bug. ***
Comment 26 Xisco Faulí 2017-07-25 23:08:24 UTC
*** Bug 109337 has been marked as a duplicate of this bug. ***
Comment 27 Timur 2018-05-17 15:26:35 UTC
*** Bug 116300 has been marked as a duplicate of this bug. ***