Bug 107269 - FilePicker crashes LO when using setDisplayDirectory method
Summary: FilePicker crashes LO when using setDisplayDirectory method
Status: RESOLVED INSUFFICIENTDATA
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
5.3.2.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-19 12:02 UTC by GUTH Christophe
Modified: 2017-12-04 12:39 UTC (History)
1 user (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 GUTH Christophe 2017-04-19 12:02:20 UTC
Hello,

I have macros which worked fine since Lo 5.3.2.1. When I installed Lo 5.3.2.1, one of my macros crashes Calc at every attempt.

Executing my macros step by step, i've found that using setDisplayDirectory causes the crash.

here's the code of my function to let the user to choose a file (with extension TXT) :

public function PAQOuvrirDialogueFichierTXT( url as String ) as string
  dim oFilePicker as object,oPathSettings as object,oSimpleFileAccess as object,sFiles as variant,fichierchoisi as string
  fichierchoisi=""
  oFilePicker = CreateUnoService("com.sun.star.ui.dialogs.FilePicker")
  oFilePicker.AppendFilter("fichiers TXT (*.TXT)","*.txt")
  oFilePicker.AppendFilter("tous les fichiers (*.*)","*.*")
  oFilePicker.SetCurrentFilter("fichiers TXT (*.TXT)")
  if url="" then
    oPathSettings = CreateUnoService("com.sun.star.util.PathSettings")
    url = oPathSettings.Work
  endif
  oSimpleFileAccess = CreateUnoService("com.sun.star.ucb.SimpleFileAccess")
  if oSimpleFileAccess.exists(url) and oSimpleFileAccess.isFolder(url) then 
    oFilePicker.setDisplayDirectory(url)
  endif
  if oFilePicker.execute() then
    sFiles = oFilePicker.getFiles()
    fichierchoisi = sFiles(0)
    if not oSimpleFileAccess.exists(fichierchoisi) then 
      fichierchoisi = ""
    endif
  endif
  PAQOuvrirDialogueFichierTXT = fichierchoisi
end function

what it should do :
- if url is a directory and exists, the dialog sould open this directory and list all TXT files.
- the user should choose one file
- the function return the file choosen.

when i call it with the url : "file://serveur/archives/180/1801701522_001" (which is a directory on my Linux server with samba),

the function came at the line "oFilePicker.setDisplayDirectory(url)", (it mean that the url is a directory and exists).

When this method call is executed, Calc crashes, and Lo goes in recovery mode (to recover open documents).

I used it until Lo version 5.3.2.1 and tested it on Lo 5.3.2.2 (with crash)

Thanks
Comment 1 Xisco Faulí 2017-04-19 13:30:30 UTC Comment hidden (obsolete)
Comment 2 GUTH Christophe 2017-04-19 13:58:18 UTC
I've downloaded the most recent build (18/04/2017 at 23h).

Running Filepicker doesn't crash Calc anymore with this version. But it simply ignore the url passed to the dialog.

The dialog is displaying the last opened directory is FilePicker (in my case \\serveur\paq) but not the url passed to the method (file://serveur/archives/180/etc...)
Comment 3 QA Administrators 2017-10-30 10:54:09 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2017-12-04 12:39:30 UTC
Dear Bug Submitter,

Please read this message in its entirety before proceeding.

Your bug report is being closed as INSUFFICIENTDATA due to inactivity and
a lack of information which is needed in order to accurately
reproduce and confirm the problem. We encourage you to retest
your bug against the latest release. If the issue is still
present in the latest stable release, we need the following
information (please ignore any that you've already provided):

a) Provide details of your system including your operating
   system and the latest version of LibreOffice that you have
   confirmed the bug to be present

b) Provide easy to reproduce steps – the simpler the better

c) Provide any test case(s) which will help us confirm the problem

d) Provide screenshots of the problem if you think it might help

e) Read all comments and provide any requested information

Once all of this is done, please set the bug back to UNCONFIRMED
and we will attempt to reproduce the issue. Please do not:

a) respond via email 

b) update the version field in the bug or any of the other details
   on the top section of our bug tracker

Warm Regards,
QA Team

MassPing-NeedInfo-20171204