Bug 127561 - Assertion when opening example file from tdf#63087 (gtk3 only)
Summary: Assertion when opening example file from tdf#63087 (gtk3 only)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.0.0.alpha1+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.4.0
Keywords: haveBacktrace
Depends on:
Blocks: Crash-Assert
  Show dependency treegraph
 
Reported: 2019-09-15 20:24 UTC by Julien Nabet
Modified: 2019-09-16 12:59 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
gdb bt (13.81 KB, text/plain)
2019-09-15 20:25 UTC, Julien Nabet
Details
bt2 (7.04 KB, text/plain)
2019-09-15 21:17 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2019-09-15 20:24:44 UTC
Description:
On pc Debian x86-64 with master sources updated today + gtk3, I got an assertion when opening https://bugs.documentfoundation.org/attachment.cgi?id=120285

Steps to Reproduce:
1. Retrieve https://bugs.documentfoundation.org/attachment.cgi?id=120285
2. Try to open it


Actual Results:
Assertion

Expected Results:
No assertion


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Julien Nabet 2019-09-15 20:25:06 UTC
Created attachment 154182 [details]
gdb bt
Comment 2 Julien Nabet 2019-09-15 20:43:49 UTC
From this location:
#0  0x00007fffdd84cd02 in ScChildrenShapes::GetCount() const (this=0x55555c70a6f0) at /home/julien/lo/libreoffice/sc/source/ui/Accessibility/AccessibleDocument.cxx:488
#1  0x00007fffdd8546f8 in ScAccessibleDocument::getAccessibleChild(int) (this=0x555558455480, nIndex=0) at /home/julien/lo/libreoffice/sc/source/ui/Accessibility/AccessibleDocument.cxx:1722
#2  0x00007fffe831b271 in AtkListener::updateChildList(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext> const&)
    (this=0x5555589eb320, pContext=uno::Reference to (ScAccessibleDocument *) 0x5555584554f0) at /home/julien/lo/libreoffice/vcl/unx/gtk3/a11y/../../gtk/a11y/atklistener.cxx:146
#3  0x00007fffe831b6f5 in AtkListener::handleInvalidateChildren(com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessibleContext> const&)
    (this=0x5555589eb320, rxParent=uno::Reference to (ScAccessibleDocument *) 0x5555584554f0) at /home/julien/lo/libreoffice/vcl/unx/gtk3/a11y/../../gtk/a11y/atklistener.cxx:248
#4  0x00007fffe831bb24 in AtkListener::notifyEvent(com::sun::star::accessibility::AccessibleEventObject const&) (this=0x5555589eb320, aEvent=...)
    at /home/julien/lo/libreoffice/vcl/unx/gtk3/a11y/../../gtk/a11y/atklistener.cxx:441
#5  0x00007ffff708b859 in comphelper::AccessibleEventNotifier::addEvent(unsigned int, com::sun::star::accessibility::AccessibleEventObject const&) (_nClient=22, _rEvent=...)
    at /home/julien/lo/libreoffice/comphelper/source/misc/accessibleeventnotifier.cxx:268
#6  0x00007fffdd83d994 in ScAccessibleContextBase::CommitChange(com::sun::star::accessibility::AccessibleEventObject const&) const (this=0x555558455480, rEvent=...)
    at /home/julien/lo/libreoffice/sc/source/ui/Accessibility/AccessibleContextBase.cxx:466
#7  0x00007fffdd8531fc in ScAccessibleDocument::Notify(SfxBroadcaster&, SfxHint const&) (this=0x555558455480, rBC=..., rHint=...)
    at /home/julien/lo/libreoffice/sc/source/ui/Accessibility/AccessibleDocument.cxx:1493
#8  0x00007ffff507cab3 in SfxBroadcaster::Broadcast(SfxHint const&) (this=0x55555796cff0, rHint=...) at /home/julien/lo/libreoffice/svl/source/notify/SfxBroadcaster.cxx:49
#9  0x00007fffde020eba in ScTabViewShell::BroadcastAccessibility(SfxHint const&) (this=0x555558348570, rHint=...) at /home/julien/lo/libreoffice/sc/source/ui/view/tabvwshh.cxx:238
#10 0x00007fffddfeec9d in ScTabView::TabChanged(bool) (this=0x555558348628, bSameTabButMoved=false) at /home/julien/lo/libreoffice/sc/source/ui/view/tabview5.cxx:302
#11 0x00007fffddfe320a in ScTabView::SetTabNo(short, bool, bool, bool) (this=0x555558348628, nTab=0, bNew=false, bExtendSelection=true, bSameTabButMoved=false)
    at /home/julien/lo/libreoffice/sc/source/ui/view/tabview3.cxx:1908

I noticed this:
$8 = {<SfxListener> = {_vptr.SfxListener = 0x7fffdf54c470 <vtable for ScChildrenShapes+16>, mpImpl = std::unique_ptr<SfxListener::Impl> = {get() = 0x55555c707840}}, <accessibility::IAccessibleParent> = {
    _vptr.IAccessibleParent = 0x7fffdf54c4b0 <vtable for ScChildrenShapes+80>}, maZOrderedShapes = std::__debug::vector of length 2, capacity 2 = {0x0, 0x55555c5e3d60}, 
  maShapesMap = std::__debug::unordered_map with 1 element = {[uno::Reference to (SvxShapePolyPolygon *) 0x555557fdb438] = 0x55555c5e3d60}, mbShapesNeedSorting = false, maShapeTreeInfo = {
    mxDocumentWindow = empty uno::Reference, mxModelBroadcaster = uno::Reference to (ScDrawModelBroadcaster *) 0x55555c6ff648, mpView = 0x5555584aba60, mxController = empty uno::Reference, mpWindow = {
      _vptr.VclPtr = 0x7ffff4d975b0 <vtable for VclPtr<OutputDevice>+16>, m_rInnerRef = rtl::Reference to 0x55555834e140}, mpViewForwarder = 0x555558455578}, 
  xSelectionSupplier = uno::Reference to (ScTabViewObj *) 0x5555584afee8, mnSdrObjCount = 1, mnShapesSelected = 0, mpViewShell = 0x555558348570, mpAccessibleDocument = 0x555558455480, 
  meSplitPos = SC_SPLIT_BOTTOMLEFT}

maShapesMap contains 1 element but maZOrderedShapes contains 2!!?
Comment 3 Julien Nabet 2019-09-15 21:17:01 UTC
Created attachment 154183 [details]
bt2

Exception which triggers the assertion.
Comment 4 Julien Nabet 2019-09-15 21:28:05 UTC
Caolán: since it concerns accessibility which is unmaintained, may I remove the assert?
Comment 5 Caolán McNamara 2019-09-16 11:25:18 UTC
I think we could avoid the problem for this specific case so I'll try that first.
Comment 6 Commit Notification 2019-09-16 12:43:55 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/0f37cc57228e4f0fc6355776e77bbc959d3b3e86%5E%21

tdf#127561 avoid shapes with currently invalid positions

It will be available in 6.4.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.
Comment 7 Julien Nabet 2019-09-16 12:48:33 UTC
(In reply to Caolán McNamara from comment #5)
> I think we could avoid the problem for this specific case so I'll try that
> first.

Great!
BTW, about maZOrderedShapes and maShapesMap, their size can't be the same considering https://opengrok.libreoffice.org/xref/core/sc/source/ui/Accessibility/AccessibleDocument.cxx?r=ef59252a#297