Apache OpenOffice (AOO) Bugzilla – Issue 122273
CRASH / Hang when open document via FTP
Last modified: 2013-06-10 04:47:46 UTC
Steps how to reproduce with server installation of "AOO 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev. 1479897 (2013-05-09)]" on WIN7 Home Premium (64bit)", own separate user profile (Save new document, save, close and try to reopen): 0. From LibO Start Center menu 'Tools -> Options -> AOO -> General - use AOO dialogs 1. From AOO Start Center open new Writer document, type few words into document 2. Menu 'File -> Save As - Filename=ftp://f0073d93@bielefeldundbuss.de' <Save> > After few seconds password dialog appears 3. type Password "cilbuPaQobiL", <ok> > After few moments folder contents will appear 4. Type a new file name (not an existing one) like "MyNameCocument.odt" replacing old contents in File Name line 5. <Save> > document will be saved 6. Menu 'File -> Close' > Document closed 7. Menu 'File -> Open' > FTP folder contents shown 8. Double Click your new document Bug: AOO will hang (WIN message appears), has to be terminated Additional Info: a) might be related to "Bug 118276 - LibreOffice writer crashes after Ctrl+click in a FTP hyperlink - Ubuntu 10.04 - LibreOffice/Openoffice 3.3.2" b) Still Reproducible with server installation of "AOO 4.0.0-Dev – English UI / German locale [AOO400m1(Build:9700) - Rev. 1479897 (2013-05-09)]" on WIN7 Home Premium (64bit)", own separate user profile c) I think that never worked d) Not a "Damaged document" problem, if you transfer the document to your HDD using FileZilla or similar you will see that the the documents can be opened without problems e) Might be the same as "Bug 96509 - Crash when opening document over ftp"
(In reply to rainerbielefeld from comment #0) > Bug: AOO will hang (WIN message appears), has to be terminated With 3.4.1 on Linux, I don't get a hang, but an error box: General Error. General input/output error.
The crash is reproducible on Windows 7 The problem is in http://svn.apache.org/viewvc/openoffice/trunk/main/ucb/source/ucp/ftp/ftpurl.cxx?revision=1413471&view=markup#l436 fclose(res) res is NULL, flcose(NULL) is producing the crash. The problem comes from FILE *res = tmpfile(); I get a "Permission denied" on Windows 7 with tmpfile(). On Linux, the problem is in FTPInputStream::readBytes() http://svn.apache.org/viewvc/openoffice/trunk/main/ucb/source/ucp/ftp/ftpinpstr.cxx?revision=1413471&view=markup#l95 The algorithm is wrong, throws an exception when it cannot read all bytes requested.
"arielch" committed SVN revision 1488548 into trunk: i122273 - Avoid using tmpfile()
Fixed on trunk by using our system abstraction layer instead of tmpfile()
*** Issue 118276 has been marked as a duplicate of this issue. ***
I did test due to original report, works fine. Thanks a lot for the fix!
I tested with server installation of "AOO 4.0.0-Dev – English UI / German locale [AOO400m2(Build:9701) - Rev. 1489073 2013-06-03 13:48:37]" on WIN7 Home Premium (64bit)", own separate user profile
*** Issue 96509 has been marked as a duplicate of this issue. ***