Bug 106729 - Crash setting setMultiSelectionMode for FilePicker
Summary: Crash setting setMultiSelectionMode for FilePicker
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.3.1.2 release
Hardware: All Windows (All)
: highest critical
Assignee: Caolán McNamara
URL:
Whiteboard: target:5.4.0 target:5.2.7 target:5.3.3
Keywords: notBibisectable, regression
: 106747 (view as bug list)
Depends on:
Blocks:
 
Reported: 2017-03-23 19:54 UTC by Gerhard Weydt
Modified: 2020-01-26 17:06 UTC (History)
4 users (show)

See Also:
Crash report or crash signature: ["fpicker::win32::vista::VistaFilePickerImpl::impl_sta_SetMultiSelectionMode(std::shared_ptr<fpicker::win32::vista::Request> const &)"]


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerhard Weydt 2017-03-23 19:54:39 UTC
Description:
When I execute the macro

sub testFilePicker

dim oFilePicker as object

oFilePicker = createUnoService("com.sun.star.ui.dialogs.FilePicker")
oFilePicker.setMultiSelectionMode(false)
msgbox "A"

end sub

in release 5.3.1.2 LibO crashes. If the "...setMultiSelection..." is set inactive it works (and opens the dialog in my original program).
The same macro does still work in LibO 5.2.3.3, as I have tested after reinstalling this older version.

Steps to Reproduce:
1. Run the above macro

Actual Results:  
LibO crashes

Expected Results:
A messagebox with text "A"


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Julien Nabet 2017-03-23 20:13:18 UTC
Would it be possible you attach a backtrace?
(see https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Windows:_How_to_get_a_backtrace)
Comment 2 Xisco Faulí 2017-03-24 09:45:33 UTC
Reproduced in

Versión: 5.3.1.1
Id. de compilación: 72fee18f394a980128dc111963f2eefb05998eeb
Subpr. de CPU: 1; SO: Windows 6.1; Repr. de IU: predet.; Motor de trazado: HarfBuzz; 
Configuración regional: es-ES (es_ES); Calc: group

but not in

Version: 5.3.1.2
Build ID: 1:5.3.1-0ubuntu1~yakkety0
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; Layout Engine: new; 
Locale: es-ES (ca_ES.UTF-8); Calc: group
Comment 3 Xisco Faulí 2017-03-24 09:46:48 UTC
Also reproduced in

Version: 5.4.0.0.alpha0+
Build ID: 2356bfdb1b99a93fcb35fefc0f587158e7d160c2
CPU threads: 1; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-03-20_00:30:32
Locale: es-ES (es_ES); Calc: group
Comment 4 Xisco Faulí 2017-03-24 09:48:59 UTC
Not reproduced in

Versión: 5.2.6.2
Id. de compilación: a3100ed2409ebf1c212f5048fbe377c281438fdc
Subprocesos de CPU: 1; SO: Windows 6.1; Repr. de IU: predeterminado; 
Configuración regional: es-ES (es_ES); Calc: group

@Aron, would you like to bisect this one ?
Comment 5 Xisco Faulí 2017-03-24 14:40:37 UTC
*** Bug 106747 has been marked as a duplicate of this bug. ***
Comment 6 Caolán McNamara 2017-03-24 15:48:53 UTC
I can reproduce this and have an idea where things may have gone wrong
Comment 7 Aron Budea 2017-03-25 01:21:26 UTC
Turns out bibisect-win32-5.3 also has a long series of failed builds, because it lead me to this range, which is single commit in the bibisect repo:

https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=62c047ffb397802c09df9070492e70725928cadf..c8a94cae37029b037507ce86d149ba56ca341f11
Comment 8 Caolán McNamara 2017-03-25 21:45:57 UTC
I think this might have always been "broken", and that

commit 62c047ffb397802c09df9070492e70725928cadf
Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date:   Mon Jun 20 09:02:47 2016 +0200

    switch to EHs on windows
    
    This seems to be a good idea based on several discussions
    in the project. In the end catching SEH exceptions is just
    going to cause strange platform dependent bahavior.

revealed this

if the code is changed to...

sub testFilePicker

dim oFilePicker as object

oFilePicker = createUnoService("com.sun.star.ui.dialogs.FilePicker")
oFilePicker.initialize(com.sun.star.ui.dialogs.TemplateDescription.FILEOPEN_SIMPLE)
oFilePicker.setMultiSelectionMode(false)
msgbox "A"

end sub

then it'll run fine. I guess we could do fallback initialization if we don't already have one before we set things that don't exist until they are initialized
Comment 9 Commit Notification 2017-03-27 08:27:05 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

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

Resolves: tdf#106729 ensure VistaFilePicker init before access

It will be available in 5.4.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 10 Caolán McNamara 2017-03-27 08:28:07 UTC
that should work now, backports for 5-3 and 5-2 in gerrit
Comment 11 Commit Notification 2017-03-27 09:49:04 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=51433f10b67685ad64dc77c848c689706f2afdd8&h=libreoffice-5-2

Resolves: tdf#106729 ensure VistaFilePicker init before access

It will be available in 5.2.7.

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 12 Commit Notification 2017-03-27 09:49:18 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=de87afd6d8302d2c000be39010196cb1aef865c1&h=libreoffice-5-3

Resolves: tdf#106729 ensure VistaFilePicker init before access

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