Bug 133785 - autofilter with dates crashes when search entry is used and then cleared
Summary: autofilter with dates crashes when search entry is used and then cleared
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.0.0.beta1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.1.0 target:7.0.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-08 08:58 UTC by Caolán McNamara
Modified: 2020-06-09 09:37 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caolán McNamara 2020-06-08 08:58:23 UTC
Description:
regression from

commit f71557e958a8a626dfc1eef646b84b3c8b72569a
Date:   Thu May 21 15:05:08 2020 +0200

    tdf#76481 speed up searching in autofilter pulldown

I think

Steps to Reproduce:
1. ./instdir/program/soffice sc/qa/uitest/autofilter/data/autofilter.ods
2. open first autofilter dropdown (which has dates in it)
3. type asd into edit box
4. backspace to remove text

Actual Results:
5. crash when it becomes empty

Expected Results:
.


Reproducible: Always


User Profile Reset: No



Additional Info:
.
Comment 1 Caolán McNamara 2020-06-08 09:06:53 UTC
adding...

for (size_t i = 0; i < n; ++i)
    maMembers[i].mpParent = nullptr;

before

nSelCount = initMembers()

makes it not crash, but doesn't restore to the original hierarchy, maybe only do the clearall optimization if setHasDates has not been used would be sufficient?
Comment 2 Commit Notification 2020-06-08 12:50:09 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/962309d282415ff54e9c6347d616457bcbeb9d4c

tdf#133785 autofilter with dates crashes when search entry is used and cleared

It will be available in 7.1.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 3 Commit Notification 2020-06-08 14:59:59 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/ec24a2a139f9bb8104b324a1009d934a4dbe9fd2

tdf#133785 autofilter with dates crashes when search entry is used and cleared

It will be available in 7.0.0.1.

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 4 Commit Notification 2020-06-09 08:02:24 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/7a21b3f098a09e498e7d79f07d3b65463a0d0913

tdf#133785: sc: Add UItest

It will be available in 7.1.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 5 Xisco Faulí 2020-06-09 09:37:29 UTC
Verified in

Version: 7.1.0.0.alpha0+
Build ID: e0f058bcd5e185b89e4b7c680a7901bc7eb2a790
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!!