Bug 162987 - Executing .uno:DataFilterAutoFilter on a hidden spreadsheet crashes
Summary: Executing .uno:DataFilterAutoFilter on a hidden spreadsheet crashes
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:25.2.0 target:24.8.2 target:24...
Keywords: bibisectRequest, regression
Depends on:
Blocks: AutoFilter
  Show dependency treegraph
 
Reported: 2024-09-16 09:27 UTC by Mike Kaganski
Modified: 2024-09-17 09:49 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 Mike Kaganski 2024-09-16 09:27:12 UTC
Consider this Basic code:

sub crash
  Dim args1(0) As New com.sun.star.beans.PropertyValue
  args1(0).Name = "Hidden"
  args1(0).Value = True
  doc = StarDesktop.loadComponentFromURL("private:factory/scalc", "_blank", 0, args1())
  sheet = doc.Sheets(0)
  sheet.getCellRangeByName("A1").Formula = "values"
  sheet.getCellRangeByName("A2").Formula = "0"
  sheet.getCellRangeByName("A3").Formula = "1"
  frame = doc.CurrentController.Frame
  dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
  Dim args2(0) As New com.sun.star.beans.PropertyValue
  args2(0).Name = "ToPoint"
  args2(0).Value = "$A$1"
  dispatcher.executeDispatch(frame, ".uno:GoToCell", "", 0, args2())
  dispatcher.executeDispatch(frame, ".uno:DataFilterAutoFilter", "", 0, Array())
  doc.close(true)
end sub

It crashes on the dispatching of .uno:DataFilterAutoFilter.
Comment 1 Xisco Faulí 2024-09-16 09:38:56 UTC
Reproduced in

Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e6e7b8498aba69af8eee8edd1d3a1fb17c36836a
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

and

Version: 24.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 898d5d470e24a55556f2fb244fec24df33ba8855
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded

but not with

Version: 7.0.7.0.0+
Build ID: 626ea4e62a3e5005fe9825923a1c0c5bdb61cc08
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 2 Mike Kaganski 2024-09-16 11:17:53 UTC
https://gerrit.libreoffice.org/c/core/+/173435
Comment 3 Commit Notification 2024-09-17 03:55:33 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#162987: check return value of GetViewBindings

It will be available in 25.2.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 4 Commit Notification 2024-09-17 09:30:49 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-8":

https://git.libreoffice.org/core/commit/01ddcbbff6ac3a54c9bafdbd260820b6a4f75d18

tdf#162987: check return value of GetViewBindings

It will be available in 24.8.2.

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 Commit Notification 2024-09-17 09:49:54 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/93a78d4a90cdc41d166e65d402ac244f4fa376ec

tdf#162987: check return value of GetViewBindings

It will be available in 24.2.7.

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.