basctl/uiconfig/basicide/ui/sortmenu.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 616a3177da38d3db342593149ab2a9a94799cfe8 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Tue Jun 3 12:01:12 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Wed Jun 4 08:06:54 2025 +0200 basctl: Set menu item ID to fix gtk4 crash ConvertMenu in vcl/unx/gtk4/convert3to4.cxx assumes that each GtkMenuItem has an "id" attribute set. Therefore, set one here as well, to fix a crash seen for the following scenario in Writer with the gtk4 VCL plugin: * "Macros" -> "Organize Macros" -> "Basic" * right-click on entry in the "Existing Macros In: <module>" treeview Backtrace: 1 __pthread_kill_implementation pthread_kill.c 44 0x7ffff789e95c 2 __pthread_kill_internal pthread_kill.c 89 0x7ffff789e9ff 3 __GI_raise raise.c 26 0x7ffff7849cc2 4 __GI_abort abort.c 73 0x7ffff78324ac 5 __assert_fail_base assert.c 118 0x7ffff7832420 6 com::sun::star::uno::Reference<com::sun::star::xml::dom::XNode>::operator-> Reference.h 387 0x7fffe6263f7b 7 (anonymous namespace)::ConvertMenu convert3to4.cxx 239 0x7fffe625fda7 8 (anonymous namespace)::ConvertMenu convert3to4.cxx 221 0x7fffe625fb3a 9 (anonymous namespace)::Convert3To4 convert3to4.cxx 978 0x7fffe6256a15 10 (anonymous namespace)::Convert3To4 convert3to4.cxx 1010 0x7fffe625726f 11 builder_add_from_gtk3_file convert3to4.cxx 1578 0x7fffe624e6c2 12 (anonymous namespace)::load_ui_file gtkinst.cxx 23922 0x7fffe62a886d 13 (anonymous namespace)::GtkInstanceBuilder::GtkInstanceBuilder gtkinst.cxx 24338 0x7fffe62a852d 14 std::make_unique<(anonymous namespace)::GtkInstanceBuilder, _GtkWidget *&, rtl::OUString const&, rtl::OUString const&, decltype(nullptr), bool>(_GtkWidget *&, rtl::OUString const&, rtl::OUString const&, decltype(nullptr)&&, bool&&) unique_ptr.h 1077 0x7fffe629221a 15 GtkInstance::CreateBuilder gtkinst.cxx 25007 0x7fffe629211f 16 Application::CreateBuilder builder.cxx 206 0x7fffee20c881 17 basctl::MacroChooser::ContextMenuHdl macrodlg.cxx 788 0x7fff0d0a30b0 18 basctl::MacroChooser::LinkStubContextMenuHdl macrodlg.cxx 783 0x7fff0d09cbbd 19 Link<CommandEvent const&, bool>::Call link.hxx 105 0x7fffe6399886 20 (anonymous namespace)::GtkInstanceTreeView::signal_popup_menu gtkinst.cxx 14297 0x7fffe62e367b 21 (anonymous namespace)::GtkInstanceWidget::signal_button gtkinst.cxx 2957 0x7fffe62a1035 22 (anonymous namespace)::GtkInstanceWidget::signalButtonPress gtkinst.cxx 2931 0x7fffe62a0e7a [...] At least a simple `git grep GtkMenuItem | grep -v 'id='` doesn't reveal any other cases with the same problem. Change-Id: I9d67ff638ee59a6e57a96a2a3ec24095be31d6fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186145 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/basctl/uiconfig/basicide/ui/sortmenu.ui b/basctl/uiconfig/basicide/ui/sortmenu.ui index 1f3c06cc1234..2b2b14ff19b3 100644 --- a/basctl/uiconfig/basicide/ui/sortmenu.ui +++ b/basctl/uiconfig/basicide/ui/sortmenu.ui @@ -6,7 +6,7 @@ <property name="visible">True</property> <property name="can-focus">False</property> <child> - <object class="GtkMenuItem"> + <object class="GtkMenuItem" id="sortmenuitem"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="label" translatable="yes" context="sortmenu|macrosort">_Sorting</property>