Bug Hunting Session
Bug 128232 - Crash when trying to delete unused User Field
Summary: Crash when trying to delete unused User Field
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: high major
Assignee: Julien Nabet
URL:
Whiteboard: target:6.4.0 target:6.3.3
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2019-10-18 13:36 UTC by Y
Modified: 2019-10-23 12:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["SwEditShell::RemoveFieldType(SwFieldIds,rtl::OUString const &)"]


Attachments
test case (23.65 KB, application/vnd.oasis.opendocument.text)
2019-10-18 13:37 UTC, Y
Details
bt with debug symbols (12.77 KB, text/plain)
2019-10-18 21:45 UTC, Julien Nabet
Details
a picture (80.19 KB, image/png)
2019-10-19 19:00 UTC, Michael Meeks
Details
glade dialog picture - note the associated comment. (80.19 KB, image/png)
2019-10-19 19:01 UTC, Michael Meeks
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Y 2019-10-18 13:36:45 UTC
Description:
I will attach a document that is affected by this bug.  Follow the Steps to Reproduce.  It consistently crashes my system (Xubuntu 18.04LTS with XFCE 4.14)

Steps to Reproduce:
1. Open the attached Writer document
2. Menu Insert > Field > More Fields
3. Tab Variables, Type: User Field, Select py3o.d.lender (or any field that is not currently used in the document)
4. Click the Button to delete the field

Actual Results:
crash

Expected Results:
the field is removed


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Y 2019-10-18 13:37:33 UTC
Created attachment 155123 [details]
test case
Comment 2 Timur 2019-10-18 14:46:49 UTC
Repro LO 6.4+ in Windows, so All. No repro 6.2, regression from 6.3.
There's also crash report. Y, if you see the link, please write it.
Comment 3 Y 2019-10-18 14:49:44 UTC
Thanks for the quick reply, Timur.  I do not understand what is the crash report? where would I see the link? where should I write it?
Comment 4 Timur 2019-10-18 19:26:45 UTC
Crash report is a notification that LO crashed, if you get it you would see a link on it. If you're asking, you maybe didn't get it. Never mind. Nprmally we write it on the right side in Crash report field, but here in Comment would be ok. Anyway bibisect is more useful.
Comment 5 Julien Nabet 2019-10-18 21:45:57 UTC
Created attachment 155132 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today, I could reproduce the crash.
Comment 6 Julien Nabet 2019-10-18 22:04:33 UTC
I proposed a patch here:
https://gerrit.libreoffice.org/#/c/81114/
but not sure it's the right fix (see comment in gerrit)
Comment 7 Commit Notification 2019-10-19 06:05:42 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/09a3762fe0fc4c4815c842098094082bf1b90de6

tdf#128232: fix crash when trying to delete unused User Field

It will be available in 6.4.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 8 Julien Nabet 2019-10-19 06:46:53 UTC
Patch for 6.3 is on gerrit review here:
https://gerrit.libreoffice.org/#/c/81120/
Comment 9 Commit Notification 2019-10-19 12:36:44 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/9b1f906ea2aa946e9d6245baacd4937233bb58c6

tdf#128232: fix crash when trying to delete unused User Field

It will be available in 6.3.4.

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 Y 2019-10-19 14:32:39 UTC Comment hidden (off-topic)
Comment 11 Julien Nabet 2019-10-19 16:44:04 UTC Comment hidden (off-topic)
Comment 12 Y 2019-10-19 18:49:04 UTC Comment hidden (off-topic)
Comment 13 Michael Meeks 2019-10-19 18:58:21 UTC Comment hidden (off-topic)
Comment 14 Michael Meeks 2019-10-19 19:00:23 UTC Comment hidden (off-topic)
Comment 15 Michael Meeks 2019-10-19 19:01:42 UTC Comment hidden (off-topic)
Comment 16 Y 2019-10-21 00:11:13 UTC Comment hidden (off-topic)
Comment 17 Xisco Faulí 2019-10-21 11:05:58 UTC
Verified in

Version: 6.4.0.0.alpha1+
Build ID: de4839e66d3d195315729b95cc144cdab96b6e74
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

@Julien Nabet, thanks for fixing this issue!
Comment 18 Michael Meeks 2019-10-21 11:12:24 UTC Comment hidden (off-topic)
Comment 19 Xisco Faulí 2019-10-21 11:16:11 UTC
(In reply to Michael Meeks from comment #18)
> > I never saw the Crash Report Dialog.
> 
> Then surely you didn't file the crash report we are talking about. I imagine
> someone else did. Timur - do you have a link to the crash report in question
> - it might help clarify things.

I just added the link to the see also list
Comment 20 Michael Meeks 2019-10-21 11:23:52 UTC
Thanks Xisco - so - Y - to see if there is a report from you filed in error - we are going to need your exact version to filter the reports - and also a rough day/time it crashed for you. Also if you see a report from today eg.

https://crashreport.libreoffice.org/stats/crash_details/2927b9eb-3e32-4963-b8c1-9f7e1872687d

You can click the 'Raw' tab and see the raw textual content of the report in case that is interesting. Thanks.
Comment 21 Commit Notification 2019-10-21 11:28:41 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-3-3":

https://git.libreoffice.org/core/commit/53e0240109b22db485b4b1212cf63cc8fa4de2be

tdf#128232: fix crash when trying to delete unused User Field

It will be available in 6.3.3.

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 22 Timur 2019-10-23 10:56:09 UTC
Although it's fixed, here is the bibisect.


ceb2a932e352b0c2af9fbaa2ad62ac9f1b3069eb is the first bad commit
commit ceb2a932e352b0c2af9fbaa2ad62ac9f1b3069eb
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Mar 28 15:08:33 2019 +0100

    source sha:2b80764ec0f7c8e2c85dbca67b9cb8a2e6b2b143
    
    source sha:2b80764ec0f7c8e2c85dbca67b9cb8a2e6b2b143

:040000 040000 247cc6cd4bb81a451fc03765b67a606f6930ba48 13c7cb6c2cf7bfa4e9692760972067510677d4e7 M	instdir

https://gerrit.libreoffice.org/plugins/gitiles/core/+/2b80764ec0f7c8e2c85dbca67b9cb8a2e6b2b143%5E!/

commit	2b80764ec0f7c8e2c85dbca67b9cb8a2e6b2b143	[log]
author	Noel Grandin <noel.grandin@collabora.co.uk>	Wed Mar 27 14:11:27 2019 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	Thu Mar 28 13:14:11 2019 +0100
tree	4343a4c3397b9090330d89057fdf0c4440b4ac28
parent	0892ec50c2fe2ff1f26c7a4ea2fdef74e3d027d7 [diff]

use unique_ptr for SwFieldTypes

Change-Id: Iddfc94618e70d3ca8414d526e58746720610c552
Reviewed-on: https://gerrit.libreoffice.org/69861
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>