Bug 98805 - FILESAVE: Save As crashes when specific file is present in working directory
Summary: FILESAVE: Save As crashes when specific file is present in working directory
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.1.1.3 release
Hardware: All macOS (All)
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace, notBibisectable, regression
Depends on:
Blocks:
 
Reported: 2016-03-21 15:22 UTC by mslbork
Modified: 2020-05-21 14:45 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
file that breaks the save as dialog (244.23 KB, application/pdf)
2016-03-21 15:22 UTC, mslbork
Details
Backtrace (2.56 MB, text/plain)
2018-04-09 19:05 UTC, eisa01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mslbork 2016-03-21 15:22:59 UTC
Created attachment 123760 [details]
file that breaks the save as dialog

While attempting to Save As, if the current working directory starts at or moves to a directory containing this specific file, Libreoffice crashes.  I tested in both Calc and Writer components; the behavior was identical.  It doesn't seem to matter what the current file contains (crash happened even on a brand-new file).

The file appears to be a broken MacOS alias.  I broke some fresh new aliases and was unable to reproduce, but copying this file still produced a directory-breaking file.

Non-Libreoffice applications are not affected.

I am using MacOS 10.11.3 (15D21) on a MacBook (Retina, 12-inch, Early 2015), in case that is relevant.
Comment 1 Buovjaga 2016-04-02 16:59:24 UTC
No problem here. Having the file in the same directory as a document being saved as works ok.

Version: 5.1.1.3
Build ID: 89f508ef3ecebd2cfb8e1def0f0ba9a803b88a6d
CPU Threads: 4; OS Version: Mac OS X 10.11.4; UI Render: default; 
Locale: en-US (en.UTF-8)
Comment 2 Alex Thurgood 2016-06-13 13:10:58 UTC
mslbork : what kind of file are you attempting to save ? Does the crash happen with any Save as file format, or only specific ones ?
Comment 3 Alex Thurgood 2016-06-13 13:16:37 UTC
Confirming with

Version: 5.1.3.2
Build ID: 644e4637d1d8544fd9f56425bd6cec110e49301b
CPU Threads: 2; OS Version: Mac OS X 10.11.5; UI Render: default; 
Locale: fr-FR (fr.UTF-8)

1) Downloaded the PDF file to /Downloads.
2) Then opened a Writer document in LO.
3) File > Save as, the Finder dialog appears, and then LO crashes.
4) Tried the same with a Calc file, same results.
5) Removed PDF from Downloads, repeated tests, no crash.
Comment 4 mslbork 2016-06-13 14:49:14 UTC
Looks like you got reproduction on your own, but as you noted it happens with (at least) empty documents in either Writer or Calc.
Comment 5 Buovjaga 2016-06-13 14:56:36 UTC
Alex: can you get debug output?
Comment 6 Alex Thurgood 2016-06-13 21:05:06 UTC
(In reply to Buovjaga from comment #5)
> Alex: can you get debug output?

If I get some time tomorrow, I'll see if I can get anything out of my build-nocheck dbgutil enabled build.

What I would note is that the PDF is not a recognizable PDF by any of the apps I have on my Mac, whether it be Adobe Reader, Preview, Abby Fine Reader Pro, etc. In fact, the PDF in question provided by the OP is clearly incomplete, buggy or malformed. It is this malformed PDF that is causing the problem - maybe there is some kind of file type inspection performed by LO and stored in memory when LO accesses a directory ?
Comment 7 QA Administrators 2017-09-01 11:15:16 UTC Comment hidden (obsolete)
Comment 8 eisa01 2017-11-10 21:20:47 UTC
Still present, was not present in 3.3 so this could be worth a bibisect

Version: 6.0.0.0.alpha1+
Build ID: 7e03c4eed72452fdfb87341214a21956c08ba969
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2017-10-25_23:45:02
Locale: en-US (en_US.UTF-8); Calc: group
Comment 9 eisa01 2017-11-15 23:01:03 UTC Comment hidden (obsolete)
Comment 10 Buovjaga 2017-11-16 14:35:10 UTC
(In reply to eisa01 from comment #9)
> Bibisected down to this, is this something for you to look at Norbert? Or
> are you just mentioned as author since you manage the bibisect repository?

Yes, he is the author of the repo.

Somehow does not seem https://cgit.freedesktop.org/libreoffice/core/commit/?id=6319803762d051c4aa645692cde7245a1bbcf7ee is the commit to blame.
Comment 11 eisa01 2018-04-08 20:13:07 UTC
I tried to bibisect this again, found a new bad commit, tested it, turned out the previous was also bad, tried again, turned out to work after all, tried again and the first good was the previous which no longer worked...

So I think this is not bibisectable

Still present in master as of March 26 2018
Comment 12 Buovjaga 2018-04-09 05:53:15 UTC
eisa01: can you get debug output for the crash? https://wiki.documentfoundation.org/QA/BugReport/Debug_Information#Mac_OSX
Comment 13 eisa01 2018-04-09 19:05:59 UTC
Created attachment 141235 [details]
Backtrace

Backtrace from

Version: 6.1.0.0.alpha0+
Build ID: a488c7ad2763b944713997911c1ddb0315d8c93f
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-03-26_00:38:29
Locale: en-US (en_US.UTF-8); Calc: group
Comment 14 QA Administrators 2019-04-10 02:59:03 UTC Comment hidden (obsolete)
Comment 15 eisa01 2019-04-20 18:38:47 UTC
I can't seem to repro this any more, however I haven't tried the exact same build as I did back then...

Version: 6.3.0.0.alpha0+
Build ID: ea9c13be02ba731074fa4207944ff7df40a0fb5c
CPU threads: 2; OS: Mac OS X 10.13.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-04-10_20:43:17
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

Version: 6.0.0.3
Build ID: 64a0f66915f38c6217de274f0aa8e15618924765
CPU threads: 2; OS: Mac OS X 10.13.6; UI render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 16 Buovjaga 2019-04-20 19:04:46 UTC Comment hidden (obsolete)
Comment 17 Buovjaga 2019-04-20 19:05:51 UTC
(In reply to Buovjaga from comment #16)
> (In reply to eisa01 from comment #15)
> > I can't seem to repro this any more, however I haven't tried the exact same
> > build as I did back then...
> 
> mslbork: as eisa01 is unable to repro, could you please test with a recent
> release, preferably 6.2.3?

Eh, accidentally commented in "silent mode" so asking again.
Comment 18 eisa01 2019-04-20 19:25:26 UTC
I managed to repro this after all, but I had to download the file via Firefox as Safari seems to have issues with bugzilla - e.g., .doc files saved as .dot and filename referring UTF8 and so on

Version: 6.3.0.0.alpha0+
Build ID: ea9c13be02ba731074fa4207944ff7df40a0fb5c
CPU threads: 2; OS: Mac OS X 10.13.6; UI render: default; VCL: osx; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2019-04-10_20:43:17
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded
Comment 19 eisa01 2020-05-21 14:45:12 UTC
This works fine. Probably fixed by moving to the native save as dialogs?

Version: 6.4.3.5
Build ID: 4db9852e73d9e9d662fc8a2783bace79addf1805
CPU threads: 4; OS: Mac OS X 10.14.6; UI render: default; VCL: osx; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded