formula/source/ui/dlg/funcpage.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ebadb6207edaf1bb1d948d500b379db868f90e50
Author:     Julien Nabet <[email protected]>
AuthorDate: Tue Oct 7 12:05:20 2025 +0200
Commit:     Julien Nabet <[email protected]>
CommitDate: Tue Oct 7 15:10:30 2025 +0200

    Fix gtk_widget_get_toplevel: assertion 'GTK_IS_WIDGET (widget)' failed
    
    To reproduce this:
    - open Calc
    - click "Assistant functions" button
    - type "LET" in search box
    - select any result (Help button at the bottom of left side panel is now 
enabled)
    - click on "Help" button
    
    => bt
    (soffice:28673): Gtk-CRITICAL **: 12:04:45.553: gtk_widget_get_toplevel: 
assertion 'GTK_IS_WIDGET (widget)' failed
    
    Fatal exception: Signal 5
    Stack:
    0 sal::backtrace_get(unsigned int) at 
/home/julien/lo/libreoffice/sal/osl/unx/backtraceapi.cxx:42
    1 (anonymous namespace)::printStack(int) at 
/home/julien/lo/libreoffice/sal/osl/unx/signal.cxx:289
    2 (anonymous namespace)::callSystemHandler(int, siginfo_t*, void*) at 
/home/julien/lo/libreoffice/sal/osl/unx/signal.cxx:330
    3 (anonymous namespace)::signalHandlerFunction(int, siginfo_t*, void*) at 
/home/julien/lo/libreoffice/sal/osl/unx/signal.cxx:427
    4 /lib/x86_64-linux-gnu/libc.so.6(+0x3fdf0) [0x7f4fd0449df0]
    5 g_logv in /lib/x86_64-linux-gnu/libglib-2.0.so.0
    6 g_log in /lib/x86_64-linux-gnu/libglib-2.0.so.0
    7 gtk_widget_get_toplevel in /lib/x86_64-linux-gnu/libgtk-3.so.0
    8 widget_get_toplevel(_GtkWidget*) at 
/home/julien/lo/libreoffice/vcl/inc/unx/gtk/gtkdata.hxx:82
    9 (anonymous 
namespace)::GtkInstanceBuilder::weld_message_dialog(rtl::OUString const&) at 
/home/julien/lo/libreoffice/vcl/unx/gtk3/gtkinst.cxx:24157
    10 weld::MessageDialogController::MessageDialogController(weld::Widget*, 
rtl::OUString const&, rtl::OUString const&, rtl::OUString const&) at 
/home/julien/lo/libreoffice/vcl/source/app/weldutils.cxx:66
    11 (anonymous 
namespace)::HelpManualMessage::HelpManualMessage(weld::Widget*) at 
/home/julien/lo/libreoffice/sfx2/source/appl/sfxhelp.cxx:956
    12 SfxHelp::Start_Impl(rtl::OUString const&, weld::Widget*, rtl::OUString 
const&) at /home/julien/lo/libreoffice/sfx2/source/appl/sfxhelp.cxx:1281
    13 SfxHelp::Start(rtl::OUString const&, weld::Widget*) at 
/home/julien/lo/libreoffice/sfx2/source/appl/sfxhelp.cxx:640
    14 formula::FuncPage::SelHelpClickHdl(weld::Button&) at 
/home/julien/lo/libreoffice/formula/source/ui/dlg/funcpage.cxx:357
    15 formula::FuncPage::LinkStubSelHelpClickHdl(void*, weld::Button&) at 
/home/julien/lo/libreoffice/formula/source/ui/dlg/funcpage.cxx:347
    
    You need to use G_DEBUG=fatal-criticals to reproduce this.
    
    Thank you Caolán for the suggestion!
    
    Change-Id: I1fad656d9e98648c4f6649ae25bdeb512fdbb7a4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192016
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/formula/source/ui/dlg/funcpage.cxx 
b/formula/source/ui/dlg/funcpage.cxx
index 3ea0fbb2d175..06f0f6ddd3ef 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -354,7 +354,7 @@ IMPL_LINK_NOARG(FuncPage, SelHelpClickHdl, weld::Button&, 
void)
             const OUString sHelpId = pDesc->getHelpId();
             if (!sHelpId.isEmpty())
             {
-                pHelp->Start(sHelpId);
+                pHelp->Start(sHelpId, m_xContainer.get());
             }
         }
     }

Reply via email to