Created attachment 912746 [details] emerge --info When editing menu or entries, sometimes the menu editing tool Mozo crash with segmentation fault. Based on the core dump, it happens inside the function matemenu_tree_item_ref in file `libmenu/matemenu-tree.c` of library mate-base/mate-menus. Here some backtrace: ``` Core was generated by `/usr/bin/python3.12 -OOt /usr/lib/python-exec/python3.12/mozo'. Program terminated with signal SIGSEGV, Segmentation fault. #0 matemenu_tree_item_ref (itemp=0x0) at matemenu-tree.c:1813 1813 g_atomic_int_inc (&item->refcount); [Current thread is 1 (Thread 0x66d3d5037740 (LWP 23119))] (gdb) thread apply all bt full ../.. Thread 1 (Thread 0x66d3d5037740 (LWP 23119)): #0 matemenu_tree_item_ref (itemp=0x0) at matemenu-tree.c:1813 item = 0x0 #1 0x000066d3d2f2a367 in matemenu_tree_get_root_directory (tree=<optimized out>) at matemenu-tree.c:895 #2 0x000066d3d47133f6 in ffi_call_unix64 () at /usr/src/debug/dev-libs/libffi-3.4.6-r2/libffi-3.4.6/src/x86/unix64.S:104 ``` The current function: ```c /** * matemenu_tree_item_ref: * @item: a #MateMenuTreeItem * * Returns: (transfer full): The same @item, or %NULL if @item is not a valid #MateMenuTreeItem */ gpointer matemenu_tree_item_ref (gpointer itemp) { MateMenuTreeItem* item = (MateMenuTreeItem*) itemp; g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(item->refcount > 0, NULL); g_atomic_int_inc (&item->refcount); return item; } ``` It looks like the Glib macros are not working as expected. https://docs.gtk.org/glib/func.return_val_if_fail.html (no description provided) https://docs.gtk.org/glib/warnings.html The list of packages (compiled with debug symbols for backtracking) mate-base/mate-menus-1.28.0 x11-misc/mozo-1.28.0 dev-libs/glib-2.78.6 dev-python/pygobject-3.46.0-r1 dev-libs/libffi-3.4.6-r2