Bug 140977 - Assert is failed closing Table Properties dialog with table selected
Summary: Assert is failed closing Table Properties dialog with table selected
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (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 target:7.1.3
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-12 11:27 UTC by Mike Kaganski
Modified: 2021-05-11 10:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2021-03-12 11:27:22 UTC
In debug build of current master Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2fce798d70bb39fe1b1dc95e2661e5836026de1a
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

I see assertion failed (and crash) when closing Table Properties dialog using OK, when the table was selected.

Steps:

1. In a new Writer document, add a table.
2. Select the table (or some of its cells).
3. Menu Table->Properties.
4. In the opened dialog, press OK.

=> Debug Error!

Program: C:\lo\src\build\instdir\program\soffice.bin

abort() has been called

(Press Retry to debug the application)
Comment 1 Mike Kaganski 2021-03-12 12:28:54 UTC
Happens because of the call

> rSh.SetSelection(*vCursors->front()); // tdf#135636 set the table selected at dialog launch as current selection

in SwTableShell::Execute in sw/source/uibase/shells/tabsh.cxx. The call was added in https://git.libreoffice.org/core/+/81f91196b98af38e29af451b86c26a893a109abc, and modified in https://git.libreoffice.org/core/+/e08b446e46f56e15af58fdd4396afba1a316f9e5.

Caolán: could you please take a look?
Comment 2 Commit Notification 2021-03-12 16:18:39 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6db71f70a3b200d4074f6cda8ce445e9861d3296

tdf#140977 drop possible table-cursor before setting the new one

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 3 Caolán McNamara 2021-03-12 17:26:03 UTC
that seems to work, backport to 7-1 in gerrit
Comment 4 Commit Notification 2021-03-12 18:53:52 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#140977 drop possible table-cursor before setting the new one

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