Description: In pkgsrc, we had updated to 2.80.2. Then libreoffice 24.2.2.2 did not start up any longer, it just reports "Unspecified Application Error" and quits. ryoon@NetBSD.org found one commit in glib2 that, if backed out, fixes this problem (this commit has now been backed out in pkgsrc locally): https://gitlab.gnome.org/GNOME/glib/-/commit/747e3af9987b37847d7d5acbf882d1ee4a6bd91b "gdbusconnection: Fix user_data leaks on error" I've reported this to glib upstream first: https://gitlab.gnome.org/GNOME/glib/-/issues/3365 But they say that this is a bug in libreoffice: "LibreOffice should not manually free the user data if it passes a GDestroyNotify, regardless of the function return value." Actual Results: see above Expected Results: see above Reproducible: Always User Profile Reset: Yes Additional Info: see above
@Caolan: likely from vcl/unx/gtk3.
The function patched in the upstream commit appears to be g_dbus_connection_register_object where it now calls user_data_free_func on user_data on failure We only call g_dbus_connection_register_object in two places, and one of them doesn't pass a user_data_free_func, so I presume it has to be the one in vcl/unx/gtk3/hudawareness.cxx in which case https://gerrit.libreoffice.org/c/core/+/167657 would solve it
Thanks for the patch. I sadly have to report that this is not enough. I tried applying it to 24.2.2.2 and switching back to the unpatched glib 2.80.2 and I get the "Unspecified Application Error" again. I tried starting libreoffice with `--backtrace` but it's been 20 minutes and I don't even have the splash screen filled in yet.
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/436f823c7c5497f2b22762cec5849a0ff84c220b tdf#161073 handle is supposed to be freed automatically on failure It will be available in 24.8.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.
run gdb soffice.bin and break on g_dbus_connection_register_object and see which one is before the crash? I only see the patched case above and one or two other ones hidden behind g_dbus_connection_export_menu_model and g_dbus_connection_export_action_group
> I only see the patched case above and one or two other ones hidden behind g_dbus_connection_export_menu_model and g_dbus_connection_export_action_group (GLib maintainer here) Depending on what the backtrace turns out to reveal, it’s possible that the crash is actually a similar latent bug in g_dbus_connection_export_menu_model(), which we’ve just fixed in GLib upstream, see https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4073. Thanks for the fast fix for the g_dbus_connection_register_object() case in LibreOffice.
I've tested glib2 2.80.2 plus the patch from https://gitlab.gnome.org/GNOME/glib/-/merge_requests/4073 and for my startup-screen problem, I then don't even need the patch by Caolán. It's probably correct and should stay anyway, but seems to be in a different code path. Please close this when you have decided what to do with that patch. Thank you!
The patch by Caolán is definitely correct, and was a bug in LibreOffice.
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/e16c06e4d069216d65bf43bcb9e12c85d5505ba0 tdf#161073 handle is supposed to be freed automatically on failure It will be available in 24.2.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.
Well, merged to trunk and 24.2. 7.6.7 was the last 7.6 and is already released. Its a pretty high hit rate on uses -> bugs though.
*** Bug 161163 has been marked as a duplicate of this bug. ***
*** Bug 161275 has been marked as a duplicate of this bug. ***
*** Bug 161425 has been marked as a duplicate of this bug. ***
*** Bug 161486 has been marked as a duplicate of this bug. ***