Bug 149524 - Writer is crashing after a label has just been created
Summary: Writer is crashing after a label has just been created
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: high major
Assignee: Julien Nabet
URL:
Whiteboard: target:7.5.0 target:7.4.0.0.beta2
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2022-06-11 11:40 UTC by phv
Modified: 2023-12-03 16:59 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with debug symbols (4.52 KB, text/plain)
2022-06-12 06:10 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description phv 2022-06-11 11:40:31 UTC
Description:
Creating a label in Design Mode makes Writer to become unresponsive then crash.

Steps to Reproduce:
1. On a new document, check Design Mode in Form menu.
2. Create a label from this same menu.
3. Click outside of this label.

Actual Result:
Writer is crashing.

Expected Result:
Writer shouldn't crash.

Reproducible: Always

User Profile Reset: Yes

Additional Info: Actually, I reproduce this issue on LibreOfficeDev 7.5, but it cannot be reproduced on LibreOffice 7.3. After the crash, the file can be restored with the label on.
Comment 1 Julien Nabet 2022-06-12 06:10:31 UTC
Created attachment 180683 [details]
bt with debug symbols

On pc Debian x86-64 with master sources update today, I could reproduce this.
Comment 2 Julien Nabet 2022-06-12 08:18:36 UTC
I gave a try with https://gerrit.libreoffice.org/c/core/+/135675
Comment 3 Julien Nabet 2022-06-12 08:24:55 UTC
Looking at bt, I think the regression is due to: 3aa5aa83039b04f1412185e49cad9e3b694d49ca
tdf#149141 - Writer - Added default object creation when drag size too low
Patch in case consistency is required for suggested Draw/Impress change here : https://gerrit.libreoffice.org/c/core/+/134499
Comment 4 Timur 2022-06-13 07:01:15 UTC
Yes, that's the commit.
Comment 5 AshSinc 2022-06-13 08:44:32 UTC
I'm away on holiday until 20th and can't easily access code on my mobile but proposed change makes sense in context. 

Was it only label in design mode that causes a crash? And does LO Draw/Impress have a design mode?
Comment 6 Heiko Tietze 2022-06-13 10:56:46 UTC
(In reply to AshSinc from comment #5)
> Was it only label in design mode that causes a crash? And does LO
> Draw/Impress have a design mode?

All Form controls crash Writer whether inserted via main menu or Forms toolbar. Adding a form in Draw has no effect (you need to draw it). With the patch applied this is also true for Writer - no crash anymore. But someone more experienced should review the patch after we are in alpha state for 7.4 and have to cherry-pick the patch soon.
Comment 7 Xisco Faulí 2022-06-16 13:59:23 UTC
Still reproducible in

Version: 7.5.0.0.alpha0+ / LibreOffice Community
Build ID: e44e418783d101c530c916db0b0f72c376188fdf
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 8 Commit Notification 2022-06-16 15:55:44 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2332a1ce5409c1a47d4ef6265a6377a67a8b2fd2

tdf#149524: fix crash in Writer after a label has just been created

It will be available in 7.5.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 9 Commit Notification 2022-06-16 19:14:58 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/c31d7e13c73c82dab9c784bfa4eb68f3ebd84b9f

tdf#149524: fix crash in Writer after a label has just been created

It will be available in 7.4.0.0.beta2.

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 Tom Haws 2022-12-21 18:14:06 UTC
I've been using LibreOffice Writer for a Labels project with a CSV data source for a couple of days. I can create, print, and save. But every time I exit and restart, I am prompted for recovery. LO is not closing gracefully. And it is leaving ???# files on my drive.

Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL

Tom Haws
Comment 11 Julien Nabet 2023-09-19 13:44:21 UTC
Tom Haws: perhaps what you described is another bug.

Could someone confirm the initial bug is gone?
Comment 12 Julien Nabet 2023-12-03 16:59:07 UTC
Let's put this one to FIXED since no wrong feedback after the patch.

Don't hesitate to reopen this tracker if you can still reproduce this.