vcl/source/window/event.cxx | 3 +++
1 file changed, 3 insertions(+)
New commits:
commit 406aaa37294657fa7476d9f74b4b244594bb7ca3
Author: Caolán McNamara <[email protected]>
AuthorDate: Thu Sep 26 12:03:07 2024 +0100
Commit: Xisco Fauli <[email protected]>
CommitDate: Mon Sep 30 12:37:58 2024 +0200
null-deref seen in testing
#2 0x0000000000ac8c3e in std::__glibcxx_assert_fail(char const*, int,
char const*, char const*) ()
#3 0x00007fa92f2fa26f in std::unique_ptr<WindowImpl,
std::default_delete<WindowImpl> >::operator* (this=<optimized out>)
at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443
#4 std::unique_ptr<WindowImpl, std::default_delete<WindowImpl>
>::operator* (this=<optimized out>) at
/opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:443
#5 vcl::Window::CallEventListeners (this=this@entry=0x34eb4f40,
nEvent=nEvent@entry=VclEventId::ObjectDying, pData=pData@entry=0x0)
at libreoffice/vcl/source/window/event.cxx:272
#6 0x00007fa92f38277a in vcl::Window::dispose (this=0x34eb4f40) at
libreoffice/vcl/source/window/window.cxx:159
#7 0x00007fa92f678064 in VclPtr<HelpTextWindow>::disposeAndClear
(this=<synthetic pointer>) at libreoffice/include/rtl/ref.hxx:88
#8 ImplDestroyHelpWindow (rHelpData=..., bUpdateHideTime=<optimized out>)
at libreoffice/vcl/source/app/help.cxx:576
#9 0x00007fa92f6780f8 in ImplDestroyHelpWindow
(bUpdateHideTime=<optimized out>) at libreoffice/vcl/source/app/help.cxx:565
#10 0x00007fa92f679125 in ImplShowHelpWindow (pParent=0x334cfb90,
nHelpWinStyle=<optimized out>, nStyle=QuickHelpFlags::NONE, rHelpText="Chart
Area", rScreenPos=Point = {...}, rHelpArea=...)
at libreoffice/vcl/source/app/help.cxx:532
#11 0x00007fa92f679544 in Help::ShowQuickHelp
(pParent=pParent@entry=0x334cfb90, rScreenRect=..., rHelpText="Chart Area",
nStyle=nStyle@entry=QuickHelpFlags::NONE)
at libreoffice/vcl/source/app/help.cxx:189
#12 0x00007fa91ae862e0 in chart::ChartWindow::RequestHelp
(this=0x334cfb90, rHEvt=...)
at libreoffice/chart2/source/controller/main/ChartWindow.cxx:227
#13 0x00007fa92e2e88a0 in (anonymous namespace)::LOKPostAsyncEvent
(pEv=0x35b4a320) at libreoffice/sfx2/source/view/lokhelper.cxx:1103
#14 0x00007fa92e2e076a in LokChartHelper::postMouseEvent
(this=this@entry=0x7ffd226dd650, nType=nType@entry=2, nX=nX@entry=15405,
nY=nY@entry=4089, nCount=nCount@entry=1,
nButtons=nButtons@entry=0, nModifier=0,
fScaleX=fScaleX@entry=0.10000000000000001,
fScaleY=fScaleY@entry=0.10000000000000001)
at libreoffice/sfx2/source/view/lokcharthelper.cxx:294
#15 0x00007fa92e2e5b80 in SfxLokHelper::testInPlaceComponentMouseEventHit
(pViewShell=pViewShell@entry=0x337e52a0, nType=nType@entry=2,
nX=nX@entry=15405, nY=nY@entry=4089,
nCount=nCount@entry=1, nButtons=nButtons@entry=0, nModifier=0,
fScaleX=0.10000000000000001, fScaleY=0.10000000000000001, bNegativeX=false)
at libreoffice/include/rtl/ref.hxx:69
#16 0x00007fa91dba1e0e in ScModelObj::postMouseEvent (this=0x4593d10,
nType=2, nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0)
at libreoffice/sc/source/ui/unoobj/docuno.cxx:799
#17 0x00007fa92e39567f in doc_postMouseEvent (pThis=0x334b8290, nType=2,
nX=15405, nY=4089, nCount=1, nButtons=0, nModifier=0)
at libreoffice/desktop/source/lib/init.cxx:5597
#18 0x0000000000578631 in lok::Document::postMouseEvent (nModifier=0,
nButtons=0, nCount=1, nY=<optimized out>, nX=<optimized out>, nType=<optimized
out>, this=<optimized out>)
at libreoffice/include/LibreOfficeKit/LibreOfficeKit.hxx:297
#19 ChildSession::mouseEvent (this=this@entry=0x317e3cf0, tokens=...,
target=target@entry=LokEventTargetEnum::Document) at kit/ChildSession.cpp:1906
#20 0x0000000000588485 in ChildSession::_handleInput (this=<optimized
out>, buffer=<optimized out>, length=<optimized out>) at
kit/ChildSession.cpp:634
Change-Id: Ic67c8b7c4553853d0ab36dd448642564b6b6fb69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173922
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
(cherry picked from commit 6f53881f444051898e6dce2cbc343057cb6fc6b9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174022
Reviewed-by: Xisco Fauli <[email protected]>
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 23d910112a74..de6772615453 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -269,6 +269,9 @@ void Window::CallEventListeners( VclEventId nEvent, void*
pData )
if ( !bIgnoreDisposed && xWindow->isDisposed() )
return;
+ if (!xWindow->mpWindowImpl)
+ break;
+
auto& rWindowImpl = *xWindow->mpWindowImpl;
if (!rWindowImpl.maChildEventListeners.empty())
{