Bug 54264 - FILEOPEN: LO cannot open more than one file at a time from Mac Finder
Summary: FILEOPEN: LO cannot open more than one file at a time from Mac Finder
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium normal
Assignee: Stephan Bergmann
URL:
Whiteboard: target:4.2.0 target:4.1.1
Keywords: regression
: 55127 56661 56857 58688 61643 64147 64522 65248 (view as bug list)
Depends on:
Blocks: mab3.6
  Show dependency treegraph
 
Reported: 2012-08-30 12:52 UTC by Vossman
Modified: 2013-08-01 08:27 UTC (History)
21 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the nice alert (41.31 KB, image/png)
2012-09-01 17:06 UTC, Roman Eisele
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vossman 2012-08-30 12:52:27 UTC
Starting in LibreOffice 3.6, if you click on two office files in finder click command-O you get a path error. 

Opening 1 file at time works fine, you can open more than one file at time in LibreOffice 3.5.6

Running OS X 10.8, but that should not matter?
Comment 1 Rainer Bielefeld Retired 2012-08-30 13:15:13 UTC
We had something similar with "Bug 49441 - FILEOPEN for multiple documents fails from built-in File Dialog ", I do no know whether "Mac finder" also was involved. 

Vossman:
Can you check a.m. Bug and/or test with a current Master Build to see whether you prolbem still exists?
Comment 2 Roman Eisele 2012-09-01 12:22:03 UTC
Problem still exists in current master build, so this is a separate issue, not related to (at least not fixed with) bug 49441.

I will confirm this issue soon ...
Comment 3 Roman Eisele 2012-09-01 17:04:59 UTC
REPRODUCIBLE with
* LibreOffice 3.6.1.2 (Build ID: e29a214)
* LOdev 3.7.0.0.alpha0+ (Build ID: 4deb9d4; Pull time: 2012-08-31 04:36:39;
  installation file: master~2012-08-31_04.36.39_LibO-
  Dev_3.7.0.0.alpha0_MacOS_x86_install_en-US.dmg)
on Mac OS X 10.6.8 (Intel).

If I select two or more files which should open with LibreOffice (e.g., .odt or .rtf or .xls files) in the Finder and press Command + O or drag both/all files on the LibreOffice application icon, LibreOffice does not open the files (as expected), but shows an alert which says "<path of 1st document><path of 2nd document> does not exist.".

If this alert does make any sense, it seems to indicate that LibreOffice confuses both/all files and handles them just as one file, concatenating both/all file paths to one long (and non-existing) file path.

I will attach a screenshot of this alert.


This bug does NOT exist in LibreOffice 3.5.6.2 (Build-ID: e0fbe70-dcba98b-297ab39-994e618-0f858f0); if I do exactly the same with LibreOffice 3.5.x, the application opens both files, just as expected. Therefore a regression.
Comment 4 Roman Eisele 2012-09-01 17:06:45 UTC
Created attachment 66453 [details]
Screenshot of the nice alert
Comment 5 Roman Eisele 2012-09-01 17:12:06 UTC
@ Thorsten Behrens:
I'm sorry that you get so many bug CCs from me, but you should not miss this nice regression which (now that bug 49441 is fixed) is yet another Mac OS X only bug ;-) It would be wonderful if you could take a look at it ... Thank you!
Comment 6 Vossman 2012-09-01 19:14:41 UTC
Thanks for checking this Roman, I uninstalled 3.6 because of this and Bug #51023.
Comment 7 Roman Eisele 2012-09-20 10:06:33 UTC
*** Bug 55127 has been marked as a duplicate of this bug. ***
Comment 8 Albert Wiedemann 2012-10-16 15:01:16 UTC
Could reproduce the bug with LibreOffice 3.6.2.2 on all MacOs's from 10.5 through 10.8, on Intel Macs as well as on PPCs.
Comment 9 Roman Eisele 2012-11-02 14:02:02 UTC
*** Bug 56661 has been marked as a duplicate of this bug. ***
Comment 10 fabien.michel 2012-11-15 11:56:28 UTC
Always occurs with Version 3.6.3.2 (Build ID: 58f22d5) On Mac OS X Lion 10.7.5
Comment 11 Matthew Francis 2012-11-23 06:57:54 UTC
Still present in 3.6.4.1 rc

However, the bug presents slightly differently:

There is no longer an error dialog when two or more files are opened at once. However, only the first selected file is actually opened
Comment 12 Rainer Bielefeld Retired 2012-11-23 07:49:53 UTC
<http://wiki.documentfoundation.org/BugReport_Details#Version>
Comment 13 Matthew Francis 2012-11-23 08:09:55 UTC
(In reply to comment #12)
> <http://wiki.documentfoundation.org/BugReport_Details#Version>

Noted for future reference, thank you
Comment 14 Lincoln Ramsay 2012-12-09 00:19:31 UTC
Still happens for me with 3.6.4.3 (downloaded last night after running LO and being prompted to update). I am not seeing the behaviour mentioned in comment 11.

Problem description:
It is not possible to open multiple documents at once from the Finder.

Steps to reproduce:
1. Navigate to a folder with two .odt files
2. Select both files and open them (Command + O)

Current behavior:
LibreOffice puts up an error dialog with the following message:
/path/to/document1.odt /path/to/document2.odt does not exist. 

Expected behavior:
LibreOffice should open both documents. 


It seems LibreOffice does not correctly handle opening multiple documents at once, treating both filenames as one filename (to a file that does not exist).

It does not matter if LibreOffice is running or not. Opening one document at a time works as expected, it's only multiple documents that fails. I'm not sure if this affects older versions. I may not have attempted to open multiple documents until today.
Comment 15 Roman Eisele 2012-12-24 08:30:28 UTC
*** Bug 58688 has been marked as a duplicate of this bug. ***
Comment 16 Roman Eisele 2012-12-24 08:32:59 UTC
Bug 58688 - “FILEOPEN: Opening multiple files at once from Finder does not work” - shows that this bug is still reproducible in 4.0.0.0beta1, with the same symptoms as described by comment #14 for 3.6.4.3.

Attachment 72038 [details] shows a screenshot of the alert (error dialog) in 4.0.0.0beta1 (thanks to Christoph Sold for the screenshot!).
Comment 17 Jorendc 2012-12-31 14:00:09 UTC
*** Bug 56857 has been marked as a duplicate of this bug. ***
Comment 18 Jorendc 2012-12-31 15:29:19 UTC
Can't reproduce with LibreOffice 3.5.7.2 
Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b

CAN reproduce using 3.6.4.3, 4.0b1 and 2 and 4.1 master.
Comment 19 LeMoyne Castle 2013-01-04 01:05:45 UTC
This bug is opening files from Finder.  I note the test which says it doesn't matter whether LibreOffice is already running or not.  

Testing on v3.6.3.2 on Ubuntu Was able to reproduce the error message by giving bad file names on the command line.  Two bad files on one command line separated with a space come through with separate error 'does not exist' message boxes.  Any two files when quoted and mashed together ("file1.odt""file2.odt") or comma separated ("file1.odt","file2.odt") give a single error message that matches the symptom here.  

I can find no code in the command line argument parser (or any related/subsequent routine) to separate multiple files crammed into one command line argument.

From the above, I infer that the issue is in desktop/app -or- the issue may be as simple as a missing space in the call template in the desktop integration for the Mac.
Comment 20 L. Curtis Boyle 2013-02-12 04:48:20 UTC
Bug still exists in 4.0.0.3, tested under OSX 10.7.5. Opening files one at time from Finder works fine; attempting to open multiple files (does not matter if .DOC, .XLS(X), etc.) produces an error dialog that states that the files do not exist (actually, it will list the file path/names for all but the last one it tried to open; that one will say "does not exist").
Comment 21 Jorendc 2013-03-01 19:19:13 UTC
*** Bug 61643 has been marked as a duplicate of this bug. ***
Comment 22 Paul Morris 2013-03-18 14:37:54 UTC
Bug still exists in 4.0.1.2, under OSX 10.8.2  Same error message pattern as found in comment 20.
Comment 23 Jorendc 2013-05-02 13:32:57 UTC
*** Bug 64147 has been marked as a duplicate of this bug. ***
Comment 24 Jorendc 2013-05-13 09:25:13 UTC
*** Bug 64522 has been marked as a duplicate of this bug. ***
Comment 25 retired 2013-05-13 09:54:36 UTC
FYI: still valid for OS X 10.8.3 and LO 4.0.3.3.
Comment 26 Jorendc 2013-06-01 18:12:47 UTC
*** Bug 65248 has been marked as a duplicate of this bug. ***
Comment 27 Jorendc 2013-06-01 19:56:22 UTC
This string is the string we find back in the dialog/message:

http://opengrok.libreoffice.org/xref/core/uui/source/ids.src#166

Placing a breakpoint here: http://opengrok.libreoffice.org/xref/core/uui/source/iahndl-ioexceptions.cxx#261 using gdb, result in a break.

Which all initially created here: http://opengrok.libreoffice.org/xref/core/uui/source/interactionhandler.cxx#67 ( breaks also using gdb)
Comment 28 Kostya 2013-07-25 16:22:57 UTC
Problem still valid for Version: 4.1.0.4
Comment 29 Stephan Bergmann 2013-07-25 20:57:27 UTC
Looks like this got broken when desktop/source/app/cmdlineargs.hxx was changed from representing multiple arguments to open/print/etc. from a single string with \n delimiters to vector<string> in <http://cgit.freedesktop.org/libreoffice/core/commit/?id=5c22a03320f20ae9ac2c3c16025e7c5e3a7915d5> "Cleaned up CommandLineArgs" but openFiles/printFiles/etc. in vcl/aqua/source/app/vclnsapp.mm were not adapted accordingly.
Comment 30 Commit Notification 2013-07-27 17:58:55 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "master":

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

fdo#54264: Fix multi-argument ApplicationEvent::TYPE_OPEN/PRINT



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 31 Emir Sarı (away) 2013-07-29 13:20:19 UTC
Thank you Stephan, thanks for fixing this very annoying bug.
Comment 32 Stephan Bergmann 2013-07-30 08:28:20 UTC
Requested backport to libreoffice-4-1 towards LO 4.1.1 at <https://gerrit.libreoffice.org/#/c/5192/>.  Backporting to libreoffice-4-0 towards LO 4.0.5 would be possible though complicated by the code having diverged since then; raise your hand if anybody sees an urgent need for that.

For QA, please see <http://cgit.freedesktop.org/libreoffice/core/commit/?id=04f4d4bfb708ef477618fa47d5f17779f4e4cf3c> "Add TODO comment expressing doubts about existing code" and the link from there to <http://lists.freedesktop.org/archives/libreoffice/2013-July/054779.html> "DDE on Windows" about the Windows-specific DDE functionality touched by the fix.
Comment 33 Commit Notification 2013-07-30 10:13:46 UTC
Stephan Bergmann committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d5266a9e3f367752e2b2099e542518078271edcc&h=libreoffice-4-1

fdo#54264: Fix multi-argument ApplicationEvent::TYPE_OPEN/PRINT


It will be available in LibreOffice 4.1.1.

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.