Bug 125104 - Changing page numbering to "1st, 2nd, 3rd,..." causes crashes when trying to change Page settings later ( see comment 26 )
Summary: Changing page numbering to "1st, 2nd, 3rd,..." causes crashes when trying to ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha1+
Hardware: All All
: high major
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.2.5 target:6.3.0
Keywords: bibisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2019-05-03 12:31 UTC by boksy5
Modified: 2019-05-23 19:50 UTC (History)
5 users (show)

See Also:
Crash report or crash signature: ["SvxResId(char const *)"]


Attachments
bt with debug symbols (13.16 KB, text/plain)
2019-05-03 20:54 UTC, Julien Nabet
Details
The file that crashes when i try to edit its page settings (7.67 KB, application/vnd.oasis.opendocument.text)
2019-05-05 22:32 UTC, boksy5
Details
Windows assert (46.17 KB, text/plain)
2019-05-16 12:36 UTC, Julien Nabet
Details
bt Windows (windbg) (43.81 KB, text/plain)
2019-05-16 12:47 UTC, Julien Nabet
Details
gdb backtrace (34.97 KB, text/plain)
2019-05-17 12:11 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description boksy5 2019-05-03 12:31:00 UTC
Description:
My computer: Ubuntu 18.04.2 LTS, 64-bit.
This bug happened when I tried to experiment with the page numbering. I opened the Format>Page settings, and changed page numbering from "1, 2, 3,..." to "1st, 2nd, 3rd,...". After changing the page numbering, whenever I would try to open Format>Page or right click>Page..., LibreOffice would crash. In other words, the page settings become inaccessible.

Steps to Reproduce:
1. Format > Page
2. Set page numbers to "1st, 2nd, 3rd..."
3. Click "OK"
4. From now on, whenever you try to change the Page settings (Format>Page) LibreOffice crashes

Actual Results:
The software crashes whenever you try to change the Page settings.

Expected Results:
The software should not crash.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Workaround: Rename the document's filename extension from ".odt" to ".zip". Open "styles.xml" and find an instance of: style:num-format="1st"
Change this to: style:num-format="1"
Update the .zip file with this new change and rename it back to .odt.
It should work without crashing now.
Comment 1 Paul 2019-05-03 12:43:20 UTC
Tried with and without text in document and cannot get it to crash. 

Xubuntu 18.04.2, 64-bit
Version: 6.2.3.2
Build ID: aecc05fe267cc68dde00352a451aa867b3b546ac
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 2 Julien Nabet 2019-05-03 13:28:07 UTC
On Win10 + master sources updated today, I got an assert:
Assertion failed: eNumType <= css::style::NumberingType::NUMBER_NONE && "enum overflow", file C:/BLP/core/svx/source/items/pageitem.cxx, line 137
Comment 3 raal 2019-05-03 14:00:10 UTC
No crash with Version: 6.3.0.0.alpha0+
Build ID: 1ae5ca077119982ae83833871326c86d9930ae11
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 

Please copy and paste here the contents of your Help - About from your LibreOffice. This allows us to know more about your system.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the information.
Comment 4 Julien Nabet 2019-05-03 14:02:25 UTC
László: Taking a look to https://cgit.freedesktop.org/libreoffice/core/commit/?id=f1579d3d6c5f5f3a651825e035b93bee7a4f43c6, I wonder if RID_SVXITEMS_PAGE_NUMS in https://opengrok.libreoffice.org/xref/core/svx/source/items/pageitem.cxx shouldn't be replaced by RID_SVXSTRARY_NUMBERINGTYPE and the asserts modified.
Any thoughts?
Comment 5 boksy5 2019-05-03 20:30:45 UTC
My libreoffice info:

Version: 6.2.3.2
Build ID: libreoffice-6.2.3.2-snap1
CPU threads: 6; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 6 Julien Nabet 2019-05-03 20:54:01 UTC
Created attachment 151168 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I got an assert too.
Comment 7 Xisco Faulí 2019-05-05 20:56:10 UTC
I can't reproduce it in

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

nor in

Versión: 6.2.3.2
Id. de compilación: aecc05fe267cc68dde00352a451aa867b3b546ac
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: threaded
Comment 8 Xisco Faulí 2019-05-05 20:57:42 UTC Comment hidden (obsolete)
Comment 9 boksy5 2019-05-05 22:32:26 UTC Comment hidden (obsolete)
Comment 10 boksy5 2019-05-05 22:35:25 UTC
Comment on attachment 151193 [details]
The file that crashes when i try to edit its page settings

It is a completely new file I made just for this, since the bug can be reproduced with any file (on my computer).
Comment 11 Xisco Faulí 2019-05-06 11:16:31 UTC Comment hidden (obsolete)
Comment 12 boksy5 2019-05-06 16:02:33 UTC
(In reply to Xisco Faulí from comment #11)
> Not reproduced in
> 
> Version: 6.3.0.0.alpha0+
> Build ID: ddea172792d13516ff7e0dd43f1f78b74ade8914
> 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
> 
> with the file attached.
> 
> Do you reproduce it if you call LibreOffice from terminal like
> SAL_USE_VCLPLUGIN=gen soffice ?

I cannot run libreoffice via terminal, the terminal says it's not installed.
I only run it via the UI. I think my libreoffice was packaged with ubuntu, I didn't install it manually myself.
Do you want me to uninstall this version I have (I can uninstall it via ubuntu's software program), and then install libreoffice again via terminal?
Comment 13 Xisco Faulí 2019-05-06 16:07:36 UTC Comment hidden (obsolete)
Comment 14 boksy5 2019-05-06 16:14:57 UTC
(In reply to Xisco Faulí from comment #13)
> Does it work if you launch it like SAL_USE_VCLPLUGIN=gen libreoffice ?

It does launch this way. But I managed to reproduce the bug this way too.
Comment 15 Xisco Faulí 2019-05-06 16:17:49 UTC Comment hidden (obsolete)
Comment 16 boksy5 2019-05-06 16:25:43 UTC
(In reply to Xisco Faulí from comment #15)
> ok,thanks for checking.
> 
> To be certain the reported issue is not
> related to corruption in the user profile, could you please reset your
> Libreoffice profile ( https://wiki.documentfoundation.org/UserProfile ) and
> re-test?
> 
> OTOH, what do you get with 'pkg-config --modversion gtk+-3.0' ?

When i run libreoffice in safe mode I can still reproduce the bug, should I still try to reset my libreoffice profile?

When I type 'pkg-config --modversion gtk+-3.0', I get: 3.22.30
Comment 17 QA Administrators 2019-05-08 21:51:18 UTC Comment hidden (obsolete)
Comment 18 Xisco Faulí 2019-05-08 22:01:44 UTC Comment hidden (obsolete)
Comment 19 boksy5 2019-05-09 05:22:19 UTC
(In reply to Xisco Faulí from comment #18)
> That's weird.
> Could you please try the version from
> https://www.libreoffice.org/download/libreoffice-fresh/ ?
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' if the bug is still present in the latest version.

I prefer not to install manually packages as I am an unskilled user and I don't want to mess with my installation... would you prefer that I file a report against the Ubuntu repositories?
Comment 20 QA Administrators 2019-05-14 03:02:23 UTC Comment hidden (obsolete)
Comment 21 Timur 2019-05-15 14:09:36 UTC Comment hidden (obsolete)
Comment 22 boksy5 2019-05-15 20:39:09 UTC
(In reply to Timur from comment #21)
> (In reply to boksy5 from comment #10)
> > Comment on attachment 151193 [details]
> I get dump on fileopen and it doesn't have ordinal or any page numbers: 
> STACK_COMMAND:  ~0s; .ecxr ; kb
> FOLLOWUP_IP: 
> python35!PyUnicode_RichCompare+f4
> 566e8e74 33c9            xor     ecx,ecx
> 
> (In reply to boksy5 from comment #0)
> > Steps to Reproduce:
> > 1. Format > Page
> > 2. Set page numbers to "1st, 2nd, 3rd..."
> > 3. Click "OK"
> Not clear. Format-Page doesn't insert page numbers. How exactly did you do
> it? First made footer? Then inserted page numbers and then edited?

I didn't insert page numbers, I set them.
I don't have to do anything (no footers or inserting) other than click on Format > Page, and get this screen:
https://i.imgur.com/3i9TFX3.png
As you can see on this image, there are words that read like this: "Page numbers", and right next to this is a button where a drop-down menu appears. There you can set the numbering to "1st, 2nd, 3d...".
I'm sorry if this wasn't clear enough before, I hope this is more clear now. Thanks.
Comment 23 Timur 2019-05-16 12:03:50 UTC
OK, now is clear. Definitely none of us had crash. 
boksy5, you first wrote "User Profile Reset: Yes" but it seems you didn't really do it. Please do: https://wiki.documentfoundation.org/UserProfile
No need to quote the full previous post. 

Only that we can do about this is confirm as Assert. Julien, please do.
Comment 24 Julien Nabet 2019-05-16 12:36:04 UTC
Created attachment 151453 [details]
Windows assert

On Win10 with master sources updated today, I still reproduce the assert.

I attached the whole output of Windbg64.

I'll give a try by removing the assert at this location to see if I have a crash.
Comment 25 Julien Nabet 2019-05-16 12:47:30 UTC
Created attachment 151454 [details]
bt Windows (windbg)

I removed the assert present in GetPresentation method (see https://opengrok.libreoffice.org/xref/core/svx/source/items/pageitem.cxx?r=b52f309f#98) and I could reproduce the crash.
Comment 26 Julien Nabet 2019-05-16 12:59:48 UTC
The choice of Page numbers selection is important thing to reproduce this.

I don't reproduce the crash if I use first elements of the list:
None,
1, 2, 3, ...
A, B, C, ...
a, b, c, ...
I, II, III, ...
i, ii, iii, ...

But if choosing other than these, it crashes (I tested some of them, not all).
So I confirm there's a relation with RID_SVXITEMS_PAGE_NUMS (see comment 4).

Also, the crash doesn't happen when selecting the element but, as indicated by the reporter, after having clicked "OK" to confirm the choice (and the dialog box closes) and called again Format page.
Comment 27 Xisco Faulí 2019-05-16 13:30:34 UTC
I can reproduce it in

Versión: 6.2.3.2
Id. de compilación: aecc05fe267cc68dde00352a451aa867b3b546ac
Subprocs. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; VCL: win; 
Configuración regional: es-ES (es_ES); Idioma de IU: es-ES
Calc: threaded

after comment 26...
Comment 29 Xisco Faulí 2019-05-16 15:47:15 UTC
@Caolán, I thought you could be interested in this issue
Comment 30 Xisco Faulí 2019-05-17 12:11:07 UTC
Created attachment 151485 [details]
gdb backtrace
Comment 31 Xisco Faulí 2019-05-17 12:20:25 UTC
it also crashes with the following steps:
1. Open writer
2. go to sidebar - page
3. Change  the number style to any from the bottom of the list
4. Go to format - page

-> crash
Comment 32 Commit Notification 2019-05-18 08:42:32 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

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

Resolves: tdf#125104 crash on getting text desc of numbering

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 33 Commit Notification 2019-05-18 20:41:03 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#125104 crash on getting text desc of numbering

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 34 Xisco Faulí 2019-05-20 10:17:50 UTC
Verified in

Version: 6.3.0.0.alpha1+
Build ID: 9c7fac47aacb0877c7d212217089a680400c1377
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 35 Commit Notification 2019-05-23 19:50:57 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

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

uitest for bug tdf#125104

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.