Bug 128393 - gtk3: insert -> fields -> more fields crashes
Summary: gtk3: insert -> fields -> more fields crashes
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.4.0 target:6.3.4
Keywords: regression
Depends on:
Blocks:
 
Reported: 2019-10-25 15:39 UTC by Miklos Vajna
Modified: 2019-10-28 12:05 UTC (History)
2 users (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 Miklos Vajna 2019-10-25 15:39:16 UTC
Hi,

Steps to reproduce:

- start Writer with the gtk3 backend
- select insert -> fields -> more fields

Expected results:

- dialog shows up

Actual results:

- assertion failure:

soffice.bin: /home/vmiklos/git/libreoffice/master/vcl/unx/gtk3/gtk3gtkinst.cxx:8447: virtual void GtkInstanceTreeView::make_sorted(): Assertion `gtk_tree_view_get_model(m_pTreeView) && "don't select when frozen"' failed.

Reading SwFieldRefPage::UpdateSubType(), it's not obvious to me how to re-arrange that code so that make_sorted() is not called in the freeze() / thaw() zone. I guess this is a regression.

Happened with a recent master, 0648aba5740a9ab62a98695a493ea9d1edbc7207.

Thanks,

Miklos
Comment 1 Xavier Van Wijmeersch 2019-10-25 18:55:24 UTC
cannot reproduce with

Version: 6.4.0.0.alpha1+
Build ID: ac23bec7a43350ce0dd01096ed99f1ed673d9533
CPU threads: 8; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: nl-BE (en_US.UTF-8); UI-Language: en-US
Calc: threaded

dialog show ups but the only thing i have is that the shortcut Ctrl+F2 is grey out,
so nothing is happening, no dialog showing
Comment 2 Caolán McNamara 2019-10-25 19:41:30 UTC
presumably the document needs some particular content in it to get this to happen, footnotes, references to footnotes ? something like that.

I guess https://gerrit.libreoffice.org/#/c/81533/ would fix it, or something clode to that.
Comment 3 Julien Nabet 2019-10-26 11:05:21 UTC
On pc Debian x86-64 with master sources updated today + gtk3, I don't reproduce this.

I noticed this log on console anyway:
(soffice:13713): Gtk-CRITICAL **: 13:03:55.367: gtk_widget_event: assertion 'WIDGET_REALIZED_FOR_EVENT (widget, event)' failed
Comment 4 Caolán McNamara 2019-10-27 12:38:32 UTC
insert->field->more field->cross-reference->bookmarks
Comment 5 Commit Notification 2019-10-27 12:41:04 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/505822ef941194552ae782081d5f6e9d2a6989d3

tdf#128393 change sorting while thawed

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 6 Caolán McNamara 2019-10-27 12:48:28 UTC
fixed in master, backport to 6-3 in gerrit
Comment 7 Miklos Vajna 2019-10-28 08:29:01 UTC
Thanks! It happened with an empty document as well; what I did not realize is that the dialog remembers the last active tab page, so my user profile triggered the crash on dialog open, but an empty profile needed the switch described in comment 4.
Comment 8 Commit Notification 2019-10-28 12:05:38 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/8a72bdcd897988ad142aad2f62044e49fb62e04e

tdf#128393 change sorting while thawed

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.