Bug 125229 - CRASH when trying to modify a frame style in a ODT document
Summary: CRASH when trying to modify a frame style in a ODT document
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0 all versions
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.3.0 target:6.2.5
Keywords: bibisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2019-05-12 04:55 UTC by Jambunathan K
Modified: 2019-05-16 01:18 UTC (History)
5 users (show)

See Also:
Crash report or crash signature: ["SwPercentField::ShowPercent(bool)"]


Attachments
sample.odt: Contains the "problematic" frame style `OrgCaptionedImage' (10.52 KB, application/vnd.oasis.opendocument.text)
2019-05-12 04:57 UTC, Jambunathan K
Details
screenshot of the frame style that is referenced in this issue (103.11 KB, image/png)
2019-05-12 04:59 UTC, Jambunathan K
Details
bt with debug symbols (8.21 KB, text/plain)
2019-05-12 11:22 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jambunathan K 2019-05-12 04:55:11 UTC
Description:
CRASH when trying to modify a frame style in a ODT document

Steps to Reproduce:
1. Re-start Writer in safe mode
2. Open the attached `sample.odt`
3. Use F11 to open the stylist.  Under frame styles, locate the style with name `OrgCaptionedImage`.  Right click and Modify ...
4. The Writer crashes

Actual Results:
4. The Writer crashes

Expected Results:
Writer shouldn't crash


Reproducible: Always


User Profile Reset: Yes



Additional Info:
The frame style in question (i.e., `OrgCaptionedImage`) was created with a old version of OpenOffice / LibreOffice.  (IIRC, I created it with OpenOffice version that was current around the time when LibreOffice forked off of it).  The frame style was _definitely_ editable with those older versions of writer.  It is only in the recent builds, I am unable to edit that frame style.

Note that the styles.xml (of sample.odt) validates against OpenDocument 1.2 schema.


-----------


kjambunathan@debian:~$ dpkg -l | grep libreoffice-writer

ii  libreoffice-writer                    1:6.1.5-3                            amd64        office productivity suite -- word processor

kjambunathan@debian:~$ uname -a

Linux debian 4.19.0-5-amd64 #1 SMP Debian 4.19.37-1 (2019-05-05) x86_64 GNU/Linux
Comment 1 Jambunathan K 2019-05-12 04:57:38 UTC
Created attachment 151318 [details]
sample.odt:  Contains the "problematic" frame style `OrgCaptionedImage'
Comment 2 Jambunathan K 2019-05-12 04:59:21 UTC
Created attachment 151319 [details]
screenshot of the frame style that is referenced in this issue
Comment 3 Usama 2019-05-12 07:09:42 UTC
Thank you for reporting this. I'm setting it to new after confirmation.

confirmed on:

Version: 6.3.0.0.alpha0+
Build ID: 98630a0bd49bd80652145a21e4e0d0ded792b36b
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-05-04_04:44:35
Locale: tr-TR (tr_TR.UTF-8); UI-Language: en-US
Calc: threaded

And:

Version: 5.1.6.2
Build ID: 1:5.1.6~rc2-0ubuntu1~xenial6
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; 
Locale: tr-TR (tr_TR.UTF-8); Calc: group
Comment 4 Oliver Brinzing 2019-05-12 08:16:01 UTC
confirming crash with:

Version: 6.3.0.0.alpha0+ (x64)
Build ID: d822953cbc1d8814ac9f9eac2107177d37103542
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

Version: 6.2.4.1 (x64)
Build-ID: 170a9c04e0ad25cd937fc7a913bb06bf8c75c11d
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: 

Version: 6.1.6.3 (x64)
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: 

Version: 4.4.7.2
Build-ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Gebietsschema: de_DE

but *no* crash with:
Version 3.6.7.2 (Build ID: e183d5b)
Comment 5 Julien Nabet 2019-05-12 11:22:21 UTC
Created attachment 151322 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 7 Xisco Faulí 2019-05-13 11:56:32 UTC
(In reply to Xisco Faulí from comment #6)
> Regression introduced in range
> https://cgit.freedesktop.org/libreoffice/core/log/
> ?qt=range&q=fba5febdf60b37be69d2ffc66445d3e324826346..
> 4df639baacd871cb2793e75dd9721ad2ae715e20

Hi Caolán,
I see many changes to the UI done in the range of commits mentioned above.
Could it be that one of these commits introduced this crash?
Comment 8 Caolán McNamara 2019-05-14 10:14:38 UTC
I can reproduce it
Comment 9 Commit Notification 2019-05-14 12:01:46 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/aa275f7af9cb79202c17835507aedce470eb762c%5E%21

Resolves: tdf#125229 divide by 0

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 10 Caolán McNamara 2019-05-14 12:31:09 UTC
fix in master, backport to 6-2 in gerrit
Comment 11 Commit Notification 2019-05-14 13:53:45 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/04019e94680835e7acf475b2ddedb5002c4a5b94%5E%21

Resolves: tdf#125229 divide by 0

It will be available in 6.2.5.

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

Affected users are encouraged to test the fix and report feedback.
Comment 12 Xisco Faulí 2019-05-14 14:00:51 UTC
Verified in

Version: 6.3.0.0.alpha1+
Build ID: 5053584e71d98ae6bfba405145c45815ba7ad898
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!!
Comment 13 Jambunathan K 2019-05-16 01:18:04 UTC
Thanks for everyone involved in fixing this issue.  

I will wait until Debian starts rolling out the new LibreOffice.  

Thanks once again.