Bug 120318 - branch crashes in bibliography database -> Data -> autofilter
Summary: branch crashes in bibliography database -> Data -> autofilter
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.2.1 release
Hardware: All All
: highest critical
Assignee: Julien Nabet
URL:
Whiteboard: target:6.2.0 target:6.1.3
Keywords: bibisected, bisected, haveBacktrace, regression
Depends on:
Blocks:
 
Reported: 2018-10-04 15:58 UTC by Hussam Al-Tayeb
Modified: 2018-10-10 08:50 UTC (History)
3 users (show)

See Also:
Crash report or crash signature: ["cppu::_copyConstructAny(_uno_Any *,void *,_typelib_TypeDescriptionReference *,_typelib_TypeDescription *,void (*)(void *),_uno_Mapping *)"]


Attachments
bt with debug symbols (6.38 KB, text/plain)
2018-10-05 21:29 UTC, Julien Nabet
Details
bt from toolbar when it's ok (2.46 KB, text/plain)
2018-10-07 19:02 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hussam Al-Tayeb 2018-10-04 15:58:02 UTC
libreoffice-6-1 branch crashes in bibliography database -> Data -> autofilter.
The button doesn't cause a crash. only the menu item does.
This is using gtk3 on Linux.
Version: 6.1.3.0.0+
Build ID: 20c72c0f79fa1d416c68537ecb914f197228eea5
CPU threads: 4; OS: Linux 4.14; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group threaded
Comment 1 Hussam Al-Tayeb 2018-10-04 17:27:18 UTC
Same thing with last build from https://dev-builds.libreoffice.org/daily/master/Linux-archive-x86_64@80-updater/current/
Comment 2 Xisco Faulí 2018-10-04 17:56:25 UTC
So, the menubar 'data' was added in https://cgit.freedesktop.org/libreoffice/core/commit/?id=6cc88407acd148982ba05a9a52e390225449c031
Comment 3 Xisco Faulí 2018-10-04 17:58:47 UTC
So, it only crashes when calling autofilter from the menu, not when doing it from the toolbar...

@Andreas, Do you have more insight of what is going on ?
Comment 4 andreas_k 2018-10-05 05:29:04 UTC
Hi,

I tested libo-61-64~2018-10-04_04.40.26_LibreOfficeDev_6.1.3.0.0_Win_x64.msi and there was no crash and on master libo crash.

libo-61-64~2018-10-04_04.40.26_LibreOfficeDev_6.1.3.0.0_Win_x64.msi -> no crash
libo-master64~2018-10-03_23.04.03_LibreOfficeDev_6.2.0.0.alpha0_Win_x64.msi -> crash

As I saw in the patch
https://cgit.freedesktop.org/libreoffice/core/commit/?id=6cc88407acd148982ba05a9a52e390225449c031
.uno:Bib/autoFilter was included to the menubar which wasn't available before. The command is from the toolbar.ui file, maybe this command doesn't work in the menubar.

conclusio:
----------
.uno:Bib/autoFilter command from toolbar.ui was added to menubar.xml but maybe the command didn't work (out of the box) in the menubar.

suggestion:
-----------
remove .uno:Bib/autoFilter from the menubar.xml file cause it wasn't there before the patch.
Comment 5 Xisco Faulí 2018-10-05 14:33:46 UTC
> suggestion:
> -----------
> remove .uno:Bib/autoFilter from the menubar.xml file cause it wasn't there
> before the patch.

The question is, why was it added in the first place ? is there any reasoning behind the decision ?
Comment 6 andreas_k 2018-10-05 14:38:23 UTC
Because its available in the toolbar and there is no reason (exclude) it didnt work to have it not in the menubar the other filter actions are also available in the menubar.
Comment 7 Julien Nabet 2018-10-05 21:29:30 UTC
Created attachment 145421 [details]
bt with debug symbols

On pc Debian x86-64 with master sources updated today + enable-dbgutil + gtk3, I could reproduce this.
Comment 8 Julien Nabet 2018-10-05 23:11:24 UTC
(In reply to andreas_k from comment #6)
> Because its available in the toolbar and there is no reason (exclude) it
> didnt work to have it not in the menubar the other filter actions are also
> available in the menubar.

Why not but how menu Data/Autofilter should retrieve "queryfield" and "querytext" values?
The toolbar equivalent retrieves these from extensions/source/bibliography/toolbar.cxx#484
by retrieving "Search Key" for "querytext" value and shows a list to select "queryfield" value.

Should it open a new dialog containing the list of fields and a textbox for querytext?
Comment 9 Julien Nabet 2018-10-07 19:02:03 UTC
Created attachment 145453 [details]
bt from toolbar when it's ok

I added the contents of args in the bt.
$1 = uno::Sequence of length 2 = {{Name = "QueryText", Handle = 0, Value = uno::Any("string": "gris"), 
    State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}, {Name = "QueryField", Handle = 0, Value = uno::Any("string": "Author"), 
    State = com::sun::star::beans::PropertyState::PropertyState_DIRECT_VALUE}}
Comment 10 Hussam Al-Tayeb 2018-10-08 18:44:10 UTC
Has there been a decision yet on how to handle this?
For now, I've edited out the menu entry in my local 6-1 build as per comment #4.
Comment 11 Julien Nabet 2018-10-08 19:05:18 UTC
I submitted a patch to remove the entry, see https://gerrit.libreoffice.org/#/c/61558/
Comment 12 Commit Notification 2018-10-09 07:49:59 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#120318: remove autofilter for the moment

It will be available in 6.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:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2018-10-09 12:12:41 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5012a1b0e60416c3397b75d42c2a8eaef1500bdc&h=libreoffice-6-1

tdf#120318: remove autofilter for the moment

It will be available in 6.1.3.

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 14 Julien Nabet 2018-10-09 12:15:35 UTC
The crash is fixed.
Now I let people create an enhancement to implement the feature describing what's expected (synchronisation of params between toolbar and menu)
Comment 15 Xisco Faulí 2018-10-10 08:50:22 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 87e3539d69626780c6d7531b725dd0d64c69e6d8
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

@Julien, Thanks for fixing this!