Bug 99422 - Calc crashes when filtering dates
Summary: Calc crashes when filtering dates
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Markus Mohrhard
Whiteboard: target:5.2.0
Keywords: haveBacktrace, regression
Depends on:
Reported: 2016-04-21 01:49 UTC by Robert Gonzalez MX
Modified: 2016-10-30 23:09 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

Calc filter test file (24.13 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-04-21 01:50 UTC, Robert Gonzalez MX
Screenshots and descriptions (160.27 KB, application/vnd.oasis.opendocument.text)
2016-04-21 01:51 UTC, Robert Gonzalez MX

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Gonzalez MX 2016-04-21 01:49:25 UTC

When the filter is active in a spreadsheet and the field contents is a date, after applying a filter and trying to select “all”, Calc crashes.

Steps to reproduce:
Open test file provided
Open the filtering pane in field7
Select option “Not Empty”
The filter is applied ok
Open the filtering pane again
Select option “All”, at the bottom
Calc crashes.

This behavior only happens with columns that have dates, and not with other types of data like time or numbers.

Note that if the option “2016” is selected, the “All” option also is activated, and Calc would not crash, so this serves for a workaround.
Comment 1 Robert Gonzalez MX 2016-04-21 01:50:00 UTC
Created attachment 124540 [details]
Calc filter test file
Comment 2 Robert Gonzalez MX 2016-04-21 01:51:20 UTC
Created attachment 124541 [details]
Screenshots and descriptions
Comment 3 JoNi 2016-04-21 19:53:52 UTC
Thank you, nice and helpful bug report

could reproduce, backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00002aaab11be32c in SvTreeList::GetParent (this=0x1fcdb10, pEntry=0x0)
    at /home/joni/lo/core/svtools/source/contnr/treelist.cxx:1698
1698	    SvTreeListEntry* pParent = pEntry->pParent;
(gdb) bt
#0  0x00002aaab11be32c in SvTreeList::GetParent (this=0x1fcdb10, pEntry=0x0)
    at /home/joni/lo/core/svtools/source/contnr/treelist.cxx:1698
#1  0x00002aaab11d3304 in SvTreeListBox::GetParent (this=0x3758670, 
    at /home/joni/lo/core/svtools/source/contnr/treelistbox.cxx:825
#2  0x00002aaaddd2d3bf in ScCheckListBox::CheckEntry (this=0x3758670, 
    pParent=0x0, bCheck=true)
    at /home/joni/lo/core/sc/source/ui/cctrl/checklistmenu.cxx:1605
#3  0x00002aaaddd2af5f in ScCheckListMenuWindow::setAllMemberState (
    this=0x374cc10, bSet=true)
    at /home/joni/lo/core/sc/source/ui/cctrl/checklistmenu.cxx:1149
#4  0x00002aaaddd2b377 in ScCheckListMenuWindow::TriStateHdl (this=0x374cc10)
    at /home/joni/lo/core/sc/source/ui/cctrl/checklistmenu.cxx:1198
#5  0x00002aaaddd2b31f in ScCheckListMenuWindow::LinkStubTriStateHdl (
    instance=0x374cc10, data=0x2ad2b70)
    at /home/joni/lo/core/sc/source/ui/cctrl/checklistmenu.cxx:1192
#6  0x00002aaab30d2949 in Link<Button*, void>::Call (this=0x2ad2dd8, 
    data=0x2ad2b70) at /home/joni/lo/core/include/tools/link.hxx:84
#7  0x00002aaab30be860 in Button::<lambda()>::operator()(void) const (
    at /home/joni/lo/core/vcl/source/control/button.cxx:125
#8  0x00002aaab30d1080 in std::_Function_handler<void(), Button::Click()::<lamb

seems something went wrong in ScCheckListMenuWindow::setAllMemberState which calls ScCheckListBox::CheckEntry with nullptr

recent change was:

maybe its because tree lists with dates are not flat

adding Markus Mohrhard
Comment 4 Commit Notification 2016-04-30 15:32:18 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":


ignore missing children, tdf#99422

It will be available in 5.2.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:

Affected users are encouraged to test the fix and report feedback.
Comment 5 Jean-Baptiste Faure 2016-10-16 19:51:42 UTC
Could it be possible that bug 102904 is a duplicate of this one but for version 5.1.5 ? If this is the case could it be possible to backport the fix to 5.1.6 ?

Best regards. JBF