Bug 125917 - calc freezes when using data validity
Summary: calc freezes when using data validity
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.5.0 target:6.4.0.1 target:6.3.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Cell-Validity
  Show dependency treegraph
 
Reported: 2019-06-14 09:08 UTC by Georg Müller
Modified: 2019-11-20 11:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
File to reproduce the freeze (7.84 KB, application/vnd.oasis.opendocument.spreadsheet)
2019-06-14 09:08 UTC, Georg Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georg Müller 2019-06-14 09:08:01 UTC
Created attachment 152186 [details]
File to reproduce the freeze

Steps to reproduce:

1. Add some lines aaa,bbb,ccc,ddd
2. Select a new column, open data -> validity -> cell range and select the aaa to ddd colums
3. Type a single "a" into the field
4. press the drop down button of that field

Actual result:
I can close the drop down list by clicking again, but nothing else ever happens. Even clicks to the menu do not work any more.

When starting on console, the console output is spammed by hundreds of the following line:

(soffice:19504): Gtk-CRITICAL **: 11:03:24.615: _gtk_widget_captured_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed


I have attached the example ods file.

OS: fedora 30 x86_64 with libreoffice 6.2.4.2
Comment 1 Georg Müller 2019-06-14 18:08:08 UTC
I just checked Windows.

Here, it does not freeze, but a selection (e.g. bbb) does not result in the direct selection.

Only if I click anywhere else, it states invalid value and then inserts the clicked value.

As a side note: On Fedora, I use Wayland. I will check X11...
Comment 2 Georg Müller 2019-06-15 07:42:16 UTC
With X11, it does not freeze fully like with Wayland (I can "exit" by pressing return, then it takes the last selection), but it still is not how it should be.
Comment 3 Edmund Fürst 2019-08-08 07:47:17 UTC
Same can reproduced here with:

LO Version 6.1.5.2 (Build-ID: 10(Build:2) on openSUSE LEAP 42.3

and

LO Version: 6.2.5.2 (Build-ID: 1:6.2.5-0ubuntu0.18.04.1~lo1) on Ubuntu 18.04.3 LTS (Bionic Beaver)

Each time a value is entered that is not in the selection list and then leaves the field, calc freezes.

Only exception: If the field "Display error message when entering invalid values" is deactivated, calc does not freeze.
Comment 4 raal 2019-08-11 09:58:18 UTC
Confirm with Version: 6.4.0.0.alpha0+
Build ID: 63889d3d465e9b4292dd5bb630bd3394494c8a6d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
but not with 4.1, regression
Comment 5 Xisco Faulí 2019-10-16 14:01:23 UTC
I believe the problem is that LibreOffice doesn't release the focus...
Comment 6 Aron Budea 2019-11-16 20:29:24 UTC
As a regression, this started with the following commit (bibisected using repo bibisect-linux-64-5.3).

https://cgit.freedesktop.org/libreoffice/core/commit/?id=6b9f42ea1dc0926bc445982ad57bf93561f1bd03
author		Caolán McNamara <caolanm@redhat.com>	2016-07-07 10:39:00 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2016-07-07 15:57:01 +0000

"Resolves: rhbz#1351224 wayland grab related crashes"


However, my opinion is that the original flow of events isn't correct, because previously this is what happened after entering a wrong value, and choosing one from the list:
- right away, nothing,
- after clicking away, a dialog popped up: Invalid value,
- after pressing OK, the chosen value was entered in the cell.

My expectation would be:
- the chosen value is entered in the cell, and no error popup is displayed, as it's a valid value.
Comment 7 Caolán McNamara 2019-11-17 20:57:50 UTC
I feel the problem is with the SelectionEngine CaptureMouse
Comment 8 Caolán McNamara 2019-11-18 12:33:14 UTC
I believe https://gerrit.libreoffice.org/#/c/83085/ would address the preexisting problem of comment #6 to dismiss the editview when we select a valid entry from the dropdown
Comment 9 Commit Notification 2019-11-19 08:54:35 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1aaa229af711fe5deeaaabf22c1e32c3025e1bf5

Related: tdf#125917 release mouse grab before showing warning dialog

It will be available in 6.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 10 Commit Notification 2019-11-19 08:56:20 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/72bfc8aced60be0adaeabbd496ea8f755c35b016

tdf#125917 Ensure mouse is captured before the menu is launched

It will be available in 6.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 11 Commit Notification 2019-11-19 09:51:50 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/52a3f07daf2d73f01e7ffd6dfa3d85ad22a8ed6b

Related: tdf#125917 remove active editing when we want to replace contents

It will be available in 6.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 12 Commit Notification 2019-11-19 10:30:30 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

tdf#125917 Ensure mouse is captured before the menu is launched

It will be available in 6.4.0.1.

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 Commit Notification 2019-11-19 10:30:37 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

Related: tdf#125917 release mouse grab before showing warning dialog

It will be available in 6.4.0.1.

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 14 Caolán McNamara 2019-11-19 10:35:33 UTC
looks good to me in master and 6-4, backports to 6-3 in gerrit
Comment 15 Commit Notification 2019-11-19 21:20:11 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

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

Related: tdf#125917 remove active editing when we want to replace contents

It will be available in 6.4.0.1.

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 16 Xisco Faulí 2019-11-20 11:03:54 UTC
Verified in

Version: 6.5.0.0.alpha0+
Build ID: 5059984c44379d09eabf740c21db062b925394ad
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 17 Commit Notification 2019-11-20 11:08:56 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/3244ea03fa7e84d218a4182afb8a78a50c6479a1

Related: tdf#125917 remove active editing when we want to replace contents

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 18 Commit Notification 2019-11-20 11:09:06 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/7afb8a874aa71c8cf2fcba930ac6d5680070f18a

tdf#125917 Ensure mouse is captured before the menu is launched

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 19 Commit Notification 2019-11-20 11:10:34 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/commit/7f274c09e57af3b8e266e9b1a3a78c9f10de5e09

Related: tdf#125917 release mouse grab before showing warning dialog

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.