Bug 93388 - Crash when deleting cell contents
Summary: Crash when deleting cell contents
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.0.0.beta1
Hardware: Other All
: medium major
Assignee: Eike Rathke
URL:
Whiteboard: target:5.1.0 target:4.4.6 target:5.0.2
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-08-12 14:23 UTC by Matthias
Modified: 2016-10-25 19:21 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
document which makes calc crash when deleting all cells contents at once (12.39 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-08-12 14:23 UTC, Matthias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias 2015-08-12 14:23:42 UTC
Created attachment 117861 [details]
document which makes calc crash when deleting all cells contents at once

to reproduce, open attached document, press:
CTRL-A
DEL

-> calc crashes
Comment 1 Laurent Godard 2015-08-12 14:55:36 UTC
reproduced on master

here is bt

(gdb) bt
#0  __adjacent_find<__gnu_cxx::__normal_iterator<SvtListener**, std::vector<SvtListener*> >, __gnu_cxx::__ops::_Iter_equal_to_iter> (__last=..., __first=..., __binary_pred=...) at /usr/include/c++/4.9/bits/stl_algo.h:950
#1  std::__unique<__gnu_cxx::__normal_iterator<SvtListener**, std::vector<SvtListener*, std::allocator<SvtListener*> > >, __gnu_cxx::__ops::_Iter_equal_to_iter> (__first=..., __last=..., __binary_pred=...)
    at /usr/include/c++/4.9/bits/stl_algo.h:963
#2  0x00007ffff4043f95 in unique<__gnu_cxx::__normal_iterator<SvtListener**, std::vector<SvtListener*> > > (__last=..., __first=...) at /usr/include/c++/4.9/bits/stl_algo.h:1002
#3  SvtBroadcaster::Normalize (this=0x1b4dde8) at /home/lgodard/projets/libreoffice/build/git/core/svl/source/notify/broadcast.cxx:30
#4  0x00007ffff404423c in SvtBroadcaster::Broadcast (this=0x1b4dde8, rHint=...) at /home/lgodard/projets/libreoffice/build/git/core/svl/source/notify/broadcast.cxx:125
#5  0x00007fffb275b94c in ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas (this=this@entry=0x1255f00) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/data/bcaslot.cxx:1162
#6  0x00007fffb275bb9a in ScBroadcastAreaSlotMachine::LeaveBulkBroadcast (this=this@entry=0x1255f00) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/data/bcaslot.cxx:1122
#7  0x00007fffb2908736 in ~ScBulkBroadcast (this=<synthetic pointer>, __in_chrg=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/inc/bcaslot.hxx:362
#8  ScTable::DeleteSelection (this=0x199e130, nDelFlag=nDelFlag@entry=..., rMark=..., bBroadcast=bBroadcast@entry=true) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/data/table2.cxx:461
#9  0x00007fffb283967f in ScDocument::DeleteSelection (this=this@entry=0x1804668, nDelFlag=nDelFlag@entry=..., rMark=..., bBroadcast=bBroadcast@entry=true)
    at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/data/document.cxx:5674
#10 0x00007fffb2cde4d1 in ScDocFunc::DeleteContents (this=<optimized out>, rMark=..., nFlags=nFlags@entry=..., bRecord=bRecord@entry=true, bApi=bApi@entry=false)
    at /home/lgodard/projets/libreoffice/build/git/core/sc/source/ui/docshell/docfunc.cxx:631
#11 0x00007fffb307458f in ScViewFunc::DeleteContents (this=this@entry=0x1bd0c48, nFlags=..., bRecord=bRecord@entry=true) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/ui/view/viewfunc.cxx:1788
#12 0x00007fffb2f7764f in ScCellShell::ExecuteEdit (this=0x1be6bc0, rReq=...) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/ui/view/cellsh1.cxx:332
#13 0x00007ffff44a1999 in CallExec (rReq=..., pFunc=<optimized out>, this=0x1be6bc0) at /home/lgodard/projets/libreoffice/build/git/core/include/sfx2/shell.hxx:208
#14 SfxDispatcher::Call_Impl (this=0x1bb1270, rShell=..., rSlot=..., rReq=..., bRecord=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/dispatch.cxx:259
#15 0x00007ffff44a2245 in SfxDispatcher::_Execute (this=<optimized out>, rShell=..., rSlot=..., rReq=..., eCallMode=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/dispatch.cxx:849
#16 0x00007ffff449ed3c in SfxBindings::Execute_Impl (this=0x1bc87a0, aReq=..., pSlot=pSlot@entry=0x7fffb3637f60 <aScCellShellSlots_Impl+20832>, pShell=pShell@entry=0x1be6bc0)
    at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/bindings.cxx:1283
#17 0x00007ffff44e2d71 in SfxDispatchController_Impl::dispatch (this=0x1ea8410, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference)
    at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/unoctitm.cxx:844
#18 0x00007ffff44e55e9 in SfxOfficeDispatch::dispatch (this=0x7fffc7764f10, aURL=..., aArgs=empty uno::Sequence) at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/unoctitm.cxx:359
#19 0x00007ffff3bf0717 in svt::AsyncAccelExec::impl_ts_asyncCallback (this=0x1ef2e80) at /home/lgodard/projets/libreoffice/build/git/core/svtools/source/misc/acceleratorexecute.cxx:465
#20 0x00007ffff262c68a in Call (data=<optimized out>, this=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/include/tools/link.hxx:127
#21 DoEvent_Impl (pEvent=<optimized out>, this=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/helper/evntpost.cxx:53
#22 vcl::EventPoster::LinkStubDoEvent_Impl (instance=<optimized out>, data=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/helper/evntpost.cxx:49
#23 0x00007ffff2444f36 in Call (data=<optimized out>, this=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/include/tools/link.hxx:127
#24 ImplHandleUserEvent (pSVEvent=0x1eb9fc0) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/window/winproc.cxx:2031
#25 ImplWindowFrameProc (_pWindow=0x13c5ad0, nEvent=<optimized out>, pEvent=0x1eb9fc0) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/window/winproc.cxx:2592
#26 0x00007ffff26b5f61 in CallCallback (pEvent=0x1eb9fc0, nEvent=22, this=0x13c6470) at /home/lgodard/projets/libreoffice/build/git/core/vcl/inc/salframe.hxx:247
#27 SalGenericDisplay::DispatchInternalEvent (this=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/vcl/generic/app/gendisp.cxx:90
#28 0x00007fffe3ecebc9 in GtkData::userEventFn (data=data@entry=0x64cd20) at /home/lgodard/projets/libreoffice/build/git/core/vcl/unx/gtk3/app/../../gtk/app/gtkdata.cxx:973
#29 0x00007fffe3ecec41 in call_userEventFn (data=0x64cd20) at /home/lgodard/projets/libreoffice/build/git/core/vcl/unx/gtk3/app/../../gtk/app/gtkdata.cxx:983
#30 0x00007fffecac1b4d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007fffecac1f20 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007fffecac1fcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fffe3ecdfc7 in GtkData::Yield (this=0x64cd20, bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/vcl/unx/gtk3/app/../../gtk/app/gtkdata.cxx:604
#34 0x00007ffff2640765 in ImplYield (nReleased=0, i_bAllEvents=false, i_bWait=true) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svapp.cxx:361
#35 Application::Yield () at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svapp.cxx:390
#36 0x00007ffff26407e5 in Application::Execute () at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svapp.cxx:336
#37 0x00007ffff792207a in desktop::Desktop::Main (this=0x7fffffffe040) at /home/lgodard/projets/libreoffice/build/git/core/desktop/source/app/app.cxx:1589
#38 0x00007ffff2645911 in ImplSVMain () at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svmain.cxx:162
#39 0x00007ffff2645962 in SVMain () at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svmain.cxx:196
#40 0x00007ffff7946142 in soffice_main () at /home/lgodard/projets/libreoffice/build/git/core/desktop/source/app/sofficemain.cxx:96
#41 0x00000000004006eb in sal_main () at /home/lgodard/projets/libreoffice/build/git/core/desktop/source/app/main.c:48
#42 main (argc=<optimized out>, argv=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/desktop/source/app/main.c:47
(gdb) 
#0  __adjacent_find<__gnu_cxx::__normal_iterator<SvtListener**, std::vector<SvtListener*> >, __gnu_cxx::__ops::_Iter_equal_to_iter> (__last=..., __first=..., __binary_pred=...) at /usr/include/c++/4.9/bits/stl_algo.h:950
#1  std::__unique<__gnu_cxx::__normal_iterator<SvtListener**, std::vector<SvtListener*, std::allocator<SvtListener*> > >, __gnu_cxx::__ops::_Iter_equal_to_iter> (__first=..., __last=..., __binary_pred=...)
    at /usr/include/c++/4.9/bits/stl_algo.h:963
#2  0x00007ffff4043f95 in unique<__gnu_cxx::__normal_iterator<SvtListener**, std::vector<SvtListener*> > > (__last=..., __first=...) at /usr/include/c++/4.9/bits/stl_algo.h:1002
#3  SvtBroadcaster::Normalize (this=0x1b4dde8) at /home/lgodard/projets/libreoffice/build/git/core/svl/source/notify/broadcast.cxx:30
#4  0x00007ffff404423c in SvtBroadcaster::Broadcast (this=0x1b4dde8, rHint=...) at /home/lgodard/projets/libreoffice/build/git/core/svl/source/notify/broadcast.cxx:125
#5  0x00007fffb275b94c in ScBroadcastAreaSlotMachine::BulkBroadcastGroupAreas (this=this@entry=0x1255f00) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/data/bcaslot.cxx:1162
#6  0x00007fffb275bb9a in ScBroadcastAreaSlotMachine::LeaveBulkBroadcast (this=this@entry=0x1255f00) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/data/bcaslot.cxx:1122
#7  0x00007fffb2908736 in ~ScBulkBroadcast (this=<synthetic pointer>, __in_chrg=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/inc/bcaslot.hxx:362
#8  ScTable::DeleteSelection (this=0x199e130, nDelFlag=nDelFlag@entry=..., rMark=..., bBroadcast=bBroadcast@entry=true) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/data/table2.cxx:461
#9  0x00007fffb283967f in ScDocument::DeleteSelection (this=this@entry=0x1804668, nDelFlag=nDelFlag@entry=..., rMark=..., bBroadcast=bBroadcast@entry=true)
    at /home/lgodard/projets/libreoffice/build/git/core/sc/source/core/data/document.cxx:5674
#10 0x00007fffb2cde4d1 in ScDocFunc::DeleteContents (this=<optimized out>, rMark=..., nFlags=nFlags@entry=..., bRecord=bRecord@entry=true, bApi=bApi@entry=false)
    at /home/lgodard/projets/libreoffice/build/git/core/sc/source/ui/docshell/docfunc.cxx:631
#11 0x00007fffb307458f in ScViewFunc::DeleteContents (this=this@entry=0x1bd0c48, nFlags=..., bRecord=bRecord@entry=true) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/ui/view/viewfunc.cxx:1788
#12 0x00007fffb2f7764f in ScCellShell::ExecuteEdit (this=0x1be6bc0, rReq=...) at /home/lgodard/projets/libreoffice/build/git/core/sc/source/ui/view/cellsh1.cxx:332
#13 0x00007ffff44a1999 in CallExec (rReq=..., pFunc=<optimized out>, this=0x1be6bc0) at /home/lgodard/projets/libreoffice/build/git/core/include/sfx2/shell.hxx:208
#14 SfxDispatcher::Call_Impl (this=0x1bb1270, rShell=..., rSlot=..., rReq=..., bRecord=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/dispatch.cxx:259
#15 0x00007ffff44a2245 in SfxDispatcher::_Execute (this=<optimized out>, rShell=..., rSlot=..., rReq=..., eCallMode=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/dispatch.cxx:849
#16 0x00007ffff449ed3c in SfxBindings::Execute_Impl (this=0x1bc87a0, aReq=..., pSlot=pSlot@entry=0x7fffb3637f60 <aScCellShellSlots_Impl+20832>, pShell=pShell@entry=0x1be6bc0)
    at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/bindings.cxx:1283
#17 0x00007ffff44e2d71 in SfxDispatchController_Impl::dispatch (this=0x1ea8410, aURL=..., aArgs=empty uno::Sequence, rListener=empty uno::Reference)
    at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/unoctitm.cxx:844
#18 0x00007ffff44e55e9 in SfxOfficeDispatch::dispatch (this=0x7fffc7764f10, aURL=..., aArgs=empty uno::Sequence) at /home/lgodard/projets/libreoffice/build/git/core/sfx2/source/control/unoctitm.cxx:359
#19 0x00007ffff3bf0717 in svt::AsyncAccelExec::impl_ts_asyncCallback (this=0x1ef2e80) at /home/lgodard/projets/libreoffice/build/git/core/svtools/source/misc/acceleratorexecute.cxx:465
#20 0x00007ffff262c68a in Call (data=<optimized out>, this=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/include/tools/link.hxx:127
#21 DoEvent_Impl (pEvent=<optimized out>, this=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/helper/evntpost.cxx:53
#22 vcl::EventPoster::LinkStubDoEvent_Impl (instance=<optimized out>, data=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/helper/evntpost.cxx:49
#23 0x00007ffff2444f36 in Call (data=<optimized out>, this=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/include/tools/link.hxx:127
#24 ImplHandleUserEvent (pSVEvent=0x1eb9fc0) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/window/winproc.cxx:2031
#25 ImplWindowFrameProc (_pWindow=0x13c5ad0, nEvent=<optimized out>, pEvent=0x1eb9fc0) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/window/winproc.cxx:2592
#26 0x00007ffff26b5f61 in CallCallback (pEvent=0x1eb9fc0, nEvent=22, this=0x13c6470) at /home/lgodard/projets/libreoffice/build/git/core/vcl/inc/salframe.hxx:247
#27 SalGenericDisplay::DispatchInternalEvent (this=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/vcl/generic/app/gendisp.cxx:90
#28 0x00007fffe3ecebc9 in GtkData::userEventFn (data=data@entry=0x64cd20) at /home/lgodard/projets/libreoffice/build/git/core/vcl/unx/gtk3/app/../../gtk/app/gtkdata.cxx:973
#29 0x00007fffe3ecec41 in call_userEventFn (data=0x64cd20) at /home/lgodard/projets/libreoffice/build/git/core/vcl/unx/gtk3/app/../../gtk/app/gtkdata.cxx:983
#30 0x00007fffecac1b4d in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007fffecac1f20 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007fffecac1fcc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007fffe3ecdfc7 in GtkData::Yield (this=0x64cd20, bWait=<optimized out>, bHandleAllCurrentEvents=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/vcl/unx/gtk3/app/../../gtk/app/gtkdata.cxx:604
#34 0x00007ffff2640765 in ImplYield (nReleased=0, i_bAllEvents=false, i_bWait=true) at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svapp.cxx:361
#35 Application::Yield () at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svapp.cxx:390
#36 0x00007ffff26407e5 in Application::Execute () at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svapp.cxx:336
#37 0x00007ffff792207a in desktop::Desktop::Main (this=0x7fffffffe040) at /home/lgodard/projets/libreoffice/build/git/core/desktop/source/app/app.cxx:1589
#38 0x00007ffff2645911 in ImplSVMain () at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svmain.cxx:162
#39 0x00007ffff2645962 in SVMain () at /home/lgodard/projets/libreoffice/build/git/core/vcl/source/app/svmain.cxx:196
#40 0x00007ffff7946142 in soffice_main () at /home/lgodard/projets/libreoffice/build/git/core/desktop/source/app/sofficemain.cxx:96
#41 0x00000000004006eb in sal_main () at /home/lgodard/projets/libreoffice/build/git/core/desktop/source/app/main.c:48
#42 main (argc=<optimized out>, argv=<optimized out>) at /home/lgodard/projets/libreoffice/build/git/core/desktop/source/app/main.c:47
Comment 2 Eike Rathke 2015-08-12 15:06:10 UTC
Taking.

@Laurent:
Thanks, but attaching a backtrace is nicer for readability ;)
Comment 3 Commit Notification 2015-08-12 18:23:43 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2d4edd7de2e67db5bd17e7a89e2496611ebcc165

Resolves: tdf#93388 broadcasting to removed listeners isn't a good idea

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 4 Eike Rathke 2015-08-12 18:53:34 UTC
Pending review
https://gerrit.libreoffice.org/17684 for 5-0
https://gerrit.libreoffice.org/17685 for 4-4
Comment 5 Commit Notification 2015-08-13 10:07:30 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=860093671accbdfb6fb6de9017ad0b6a7a57703a&h=libreoffice-4-4

Resolves: tdf#93388 broadcasting to removed listeners isn't a good idea

It will be available in 4.4.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2015-08-13 10:12:05 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=61fb1d4de37f88f6408a483c3713a373340d6fb3&h=libreoffice-5-0

Resolves: tdf#93388 broadcasting to removed listeners isn't a good idea

It will be available in 5.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.