Bug 112169 - Crash in: MSWordExportBase::GetItem(unsigned short)
Summary: Crash in: MSWordExportBase::GetItem(unsigned short)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Tamás Zolnai
URL:
Whiteboard: target:6.0.0 target:5.4.2 target:5.3.7
Keywords: bibisected, bisected, regression
: 103634 112168 112355 112455 112512 112637 113852 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-09-01 19:01 UTC by industriflow
Modified: 2021-02-24 14:14 UTC (History)
10 users (show)

See Also:
Crash report or crash signature: ["MSWordExportBase::GetItem(unsigned short)"]


Attachments
The file I was using when Bug 112169 occurred is attached (sanitized per instructions). (22.82 KB, application/vnd.oasis.opendocument.text)
2017-09-02 01:50 UTC, industriflow
Details

Note You need to log in before you can comment on or make changes to this bug.
Description industriflow 2017-09-01 19:01:52 UTC
This bug was filed from the crash reporting server and is br-e5714c03-24bf-4e31-931c-193b15ef783d.
=========================================

For the fifth time in the last hour, when I selected Save As or Save a Copy from the File menu of Libre Writer, it crashed, offered to recover my document, and suggested I report the bug. Wish I could send you the document, but it's confidential. It's five pages long, mostly basic text, but it contains one table.
Comment 1 Xisco Faulí 2017-09-01 19:09:37 UTC
Could you please try to sanitize the document as described here: https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F?
Otherwise, could you pleae share the document with me ?
Comment 2 Xisco Faulí 2017-09-01 19:11:06 UTC
*** Bug 112168 has been marked as a duplicate of this bug. ***
Comment 3 industriflow 2017-09-02 01:50:26 UTC
Created attachment 135959 [details]
The file I was using when Bug 112169 occurred is attached (sanitized per instructions).

See the comment I was writing below the "attach" button. (This interface is not self-explanatory for first-time users.)
Comment 4 industriflow 2017-09-02 01:59:43 UTC
Although I'm happy to participate by offering this bug report in hopes of helping improve Libre Writer, I should tell you the bug reporting process and interface is not user friendly. I've been a computer professional for two decades, with only a year programming. Although I love recommending Libre Office to the users I support, I can tell you honestly that over 95% of them would never figure out how to properly report the bug, create a new login credential here, navigate the forms' fields, ignore the right jargon and respond to the relevant jargon, and then upload a "sanitized" document when asked by email to "please share the document with me," despite the return address by email being irrelevant.

The more easy and idiot-proof you can make bug reporting, the more regular users will report bugs, and the quicker Libre Office will become widely adopted by satisfied users who aren't techies like us.

Regardless, I remain a fan of Libre Office, and I appreciate your efforts. 

Thank you!
Comment 5 Xisco Faulí 2017-09-02 11:04:53 UTC
Hello,
thanks for the document. I guess you can reproduce the crash with the attached document as well, isn't it? If so, could you please explain the steps to reproduce the crash?
Comment 6 industriflow 2017-09-02 13:13:19 UTC
Yes, it's mostly in my original description of the problem above. But here are the details.

Steps to reproduce the crash: 
(I reproduced this at least six times on my Win x64 Intel system with 32 GB RAM)
1. Open the attached .odt document in Writer. 
2. Click File, Save As, or Save A Copy.
3. In the dialog box that opens select to save it as a .docx file.
4. Click Save. The file isn't saved. Instead, Writer reports the crash, suggests the Bugzilla URL, reports that it will try to recover the file. A lock-file remains. Upon opening Writer again it offers to and successfully re-opens the crashed file. 
5. BUT, try to save the file again (as a .docx) and it repeats the cycle.
6. Try to Save As or Save A Copy with a slightly different filename, and as a .docx file. It crashes as expected. 
7. BUT, upon opening Writer again, it doesn't find the file to recover! (I assume it's because the uninitiated user didn't know Libre wouldn't internally record the new filename of the same doc it had crashed on before.

I'd written these steps out, then clicked "Add an attachment" above, and the system lost the steps I'd written. Yes, I hadn't known to "Save Changes" first. But with this interface, it would help new users (all bug submitters are at first new users) if upon clicking "attachment" the Bugzilla code were to check for an unsaved written Comment and ask to save it.

I remain a fan of Libre and your dedicated efforts to debug it.
Comment 7 MM 2017-09-02 17:34:02 UTC
crashreport.libreoffice.org/stats/crash_details/0c699e94-6cc9-41dd-89b7-af14c3317b49

Confirmed with Version: 6.0.0.0.alpha0+
Build ID: b9f85538e65882238de80ab36c864bc0082ad7f4
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-08-20_00:40:11
Locale: en-US (en_US.UTF-8); Calc: single

Confirmed with v5.2.7.2 under windows 7 x64.

Unconfirmed with v3.3.4 under windows 7 x64.
Comment 8 raal 2017-09-03 10:00:21 UTC
This seems to have begun at the below commit.
Adding Cc: to Zolnai Tamás ; Could you possibly take a look at this one?
Thanks
 4038f3102d03eb6a412b290437db81f9e90ac6da is the first bad commit
commit 4038f3102d03eb6a412b290437db81f9e90ac6da
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Wed May 27 20:14:38 2015 +0800

    source-hash-587315ebd5e4417e85eb3ffafd978fcddb09b19f
    
    commit 587315ebd5e4417e85eb3ffafd978fcddb09b19f
    Author:     Zolnai Tamás <zolnaitamas2000@gmail.com>
    AuthorDate: Wed Mar 18 15:19:46 2015 +0100
    Commit:     Zolnai Tamás <zolnaitamas2000@gmail.com>
    CommitDate: Sat Mar 21 16:19:10 2015 +0100
    
        Char shading: use a marker for character background imported from MSO shading
    
        * So MSO format export filters can recognize that it should be exported
        as shading.
        * Editing in LO removes this shading marker, so from that point there
        will be an LO character background.
    
        Change-Id: I853b952f0395b33d36bb2934a6d910f2182cc1d9
Comment 9 Xisco Faulí 2017-09-03 16:15:52 UTC
*** Bug 103634 has been marked as a duplicate of this bug. ***
Comment 10 Commit Notification 2017-09-03 17:45:25 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=242688f3b4fc7228637837e0f4fec3da71ac2710

tdf#112169: Crash while saving character background color to DOCX

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2017-09-03 19:56:06 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=30a1bb3737b36c4ac13719c003ddc51e9b634000&h=libreoffice-5-4

tdf#112169: Crash while saving character background color to DOCX

It will be available in 5.4.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 MM 2017-09-04 17:07:30 UTC
Fixed with Version: 6.0.0.0.alpha0+
Build ID: 52c25a628d6cd300a0ff29f3c31e3528e3c4f8e1
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-09-03_22:58:01
Locale: en-US (en_US.UTF-8); Calc: single
Comment 13 Commit Notification 2017-09-08 11:27:09 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9b3e2486d8e96b6fdd844fbdb5fa59c7782e82ee&h=libreoffice-5-3

tdf#112169: Crash while saving character background color to DOCX

It will be available in 5.3.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Julien Nabet 2017-09-13 17:24:19 UTC
*** Bug 112355 has been marked as a duplicate of this bug. ***
Comment 15 Xisco Faulí 2017-09-17 23:21:41 UTC
*** Bug 112455 has been marked as a duplicate of this bug. ***
Comment 16 Xisco Faulí 2017-09-20 09:51:51 UTC
*** Bug 112512 has been marked as a duplicate of this bug. ***
Comment 17 Xisco Faulí 2017-09-25 10:07:53 UTC
*** Bug 112637 has been marked as a duplicate of this bug. ***
Comment 18 Xisco Faulí 2017-11-15 17:21:34 UTC
*** Bug 113852 has been marked as a duplicate of this bug. ***