Bug 138884 - Crash when deleting default draw template (gen)
Summary: Crash when deleting default draw template (gen)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.2.0
Keywords: bibisected, bisected, regression, wantBacktrace
: 138908 138940 (view as bug list)
Depends on:
Blocks: Template-Manager
  Show dependency treegraph
 
Reported: 2020-12-14 01:50 UTC by sdc.blanco
Modified: 2021-03-26 07:47 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
crash dump from LibreOfficeDev\4\crash (124.88 KB, application/octet-stream)
2020-12-14 01:50 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2020-12-14 01:50:34 UTC
Created attachment 168136 [details]
crash dump from LibreOfficeDev\4\crash

STR come from bug 101404

1) Open draw
2) Set margins to 0
3) Save as template and enable checkbox to make it default template
4) Close doc
5) Open template manager
6) Delete draw's default template

Result:  Crash, with template dialog box remaining open

Additional information:

1.  Reproduced running in Safe Mode and reset to Factory Setting

2.  Crash report does not appear to be sent, have attached .dmp file

3.  Please look at bug 101404 -- because it may be possible to address some of the issues there at the same time.

4.  Have not tried to test with other modules.
Comment 1 sdc.blanco 2020-12-14 01:53:14 UTC
Tested with:  

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 368c56144aab5794c39d5bc2082d9b3d6d7cebdb
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_DK); UI: en-US
Calc: threaded
Comment 2 Xisco Faulí 2020-12-14 10:40:42 UTC
Not reproducible in

Version: 7.2.0.0.alpha0+
Build ID: 9a2a4bc5ed340ba187c8e27db5c8477c990c93af
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 Xisco Faulí 2020-12-14 10:42:12 UTC
but it does with gen

Version: 7.2.0.0.alpha0+
Build ID: 9a2a4bc5ed340ba187c8e27db5c8477c990c93af
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 4 Xisco Faulí 2020-12-14 10:52:02 UTC
Regression introduced by:

author	Vert D <devoptmsoi@gmx.com>	2020-09-25 17:58:15 -0500
committer	Heiko Tietze <heiko.tietze@documentfoundation.org>	2020-11-23 11:29:04 +0100
commit 6b1de6057082bd8720594231839f967bff5372ae (patch)
tree 57ae7c1982f3b270e3a42dec0bff909f6e250410
parent 3c4b09a250605c9d73e48df83a6ee36a8bc2fb8b (diff)
tdf#104154 WIP:Add list view to template manager

Bisected with: bibisect-linux64-7.2

Adding Cc: to Vert D
Comment 5 Xisco Faulí 2020-12-14 19:13:22 UTC
*** Bug 138908 has been marked as a duplicate of this bug. ***
Comment 6 Julien Nabet 2020-12-14 19:43:36 UTC
On pc Debian x86-64 with master sources updated today + gen rendering, I don't reproduce this but perhaps I missed something.
Comment 7 Xisco Faulí 2020-12-15 14:07:37 UTC
*** Bug 138940 has been marked as a duplicate of this bug. ***
Comment 8 Xisco Faulí 2020-12-18 10:53:03 UTC
@Caolán, I thought you might be interested in this issue
Comment 9 Caolán McNamara 2020-12-18 13:37:38 UTC
right click context menu delete entry crashes, but the "Delete" key deletes without a crash
Comment 10 Caolán McNamara 2020-12-18 13:53:16 UTC
master only no need for a 7-1 backport: https://gerrit.libreoffice.org/c/core/+/107968
Comment 11 sdc.blanco 2020-12-18 16:23:06 UTC
(In reply to Caolán McNamara from comment #10)
> master only no need for a 7-1 backport:
> https://gerrit.libreoffice.org/c/core/+/107968
If I understand the comment in the patch, it gives an explanation for 
bug 138940  -- where a template is moved to another category. 

In Thumbnail View, the moved template is "gone" (not visible in canvas), while in "Localview" it remains visible in the localview list).  
Click on the "phantom" template in Localview gives a crash.
Comment 12 Commit Notification 2020-12-19 21:44:31 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

tdf#138884 Crash when deleting template via context menu

It will be available in 7.2.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 13 sdc.blanco 2020-12-22 14:01:40 UTC
(In reply to Commit Notification from comment #12)
> https://git.libreoffice.org/core/commit/cd6ddba3e15d2e586cd7b8593d5164aabbbd0dcb
> Affected users are encouraged to test the fix and report feedback.
1.  STR no longer give crash (and icon is removed from Listview, which avoids problem in bug 138940), but slow response in canvas update.

2.  "Delete" key does not work anymore from Listview  (but did before, see also comment 9)  --  "Delete" key (still) works in Thumbnail View (but also with slow response).

Version: 7.2.0.0.alpha0+ (x64)
Build ID: 4041c68ea59181f1c4774c356809066d2051db41
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Vulkan; VCL: win
Locale: da-DK (en_DK); UI: en-US
Calc: threaded
Comment 14 VertD 2020-12-24 05:16:41 UTC
(In reply to sdc.blanco from comment #13)
> 2.  "Delete" key does not work anymore from Listview
It wasn't working before, I'll work on that.
Comment 15 sdc.blanco 2020-12-26 06:48:44 UTC
(In reply to Commit Notification from comment #12)
> Affected users are encouraged to test the fix and report feedback.
General Problem: false appearance that predefined templates can be deleted in Listview.

1. Choose "Listview"
2. Choose Text Documents (filter) and Styles (category)
3. Delete a template

Result:  Error message that template cannot be deleted (expected) but then item disappears from listview (not expected).

4.  Choose "All Categories" (or another category), then return to "Styles" category.

Result:  item is "back"  (of course it never left, but appearance to user is "wrong").

Additional information:

1.  No problem with Thumbnail view  (i.e., get cannot delete message, and icon remains on screen).

2.  Will be less of an issue because the Delete item in context menu will be greyed out soon. But in principle the "Delete" key should also work, so an appropriate response is still needed.
Comment 17 Justin L 2021-01-26 15:32:46 UTC
(In reply to sdc.blanco from comment #15)
> 1. Choose "Listview"
> 2. Choose Text Documents (filter) and Styles (category)
> 3. Delete a template
> 
> Result:  Error message that template cannot be deleted (expected) but then
> item disappears from listview (not expected).

I'm not seeing this in master or in 7.1. Can you check this again?
Comment 18 sdc.blanco 2021-01-26 16:24:35 UTC
(In reply to Justin L from comment #17)
> > 1. Choose "Listview"
> > 2. Choose Text Documents (filter) and Styles (category)
> > 3. Delete a template
> > 
> > Result:  Error message that template cannot be deleted (expected) but then
> > item disappears from listview (not expected).
> 
> I'm not seeing this in master or in 7.1. Can you check this again?
Ummm...I would like to help you, but it is impossible for following reasons:

Work on bug 138906 and bug 138246 has removed the context menu for deleting predefined templates, and the "Delete" key does not work in Listview at present (see comment 14 here, though comment 9 and comment 13 claim that it was once possible). So I have no way to achieve step 3 (with a relatively current master).

fwiw, with thumbnail view, I can use the Delete key, do get a warning message, and the thumbnail remains in view.
Comment 19 Heiko Tietze 2021-01-27 11:22:09 UTC
No crash with master but starting Draw always shows the warning that the file doesn't exist. It seems to remain the default template since I haven't set any other.
Comment 20 sdc.blanco 2021-01-27 12:51:04 UTC
(In reply to Heiko Tietze from comment #19)
> No crash with master but starting Draw always shows the warning that the
> file doesn't exist. It seems to remain the default template since I haven't
> set any other.
See bug 101404
Comment 21 Commit Notification 2021-03-26 07:47:15 UTC
Vert D committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/18aa2169c9adf41fa5c9a02ad81d4f68a34509e3

Added delete keyinput to listview, fixed reload() issues: solves tdf#138884

It will be available in 7.2.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.