Bug 57806 - undefined: Crash when trying to save a file on ssh share
Summary: undefined: Crash when trying to save a file on ssh share
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.0.alpha0+ Master
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard: BSA (target:4.2.4)
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-02 14:37 UTC by Julien Nabet
Modified: 2014-06-19 21:46 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
bt with symbols + console logs (8.34 KB, text/plain)
2012-12-02 14:54 UTC, Julien Nabet
Details
another bt (3.93 KB, text/plain)
2012-12-02 22:37 UTC, Julien Nabet
Details
popup + bt (5.05 KB, text/plain)
2012-12-05 18:15 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Nabet 2012-12-02 14:37:40 UTC
Problem description:
On pc Debian x86-64 with master sources updated today (commit 1a8f7865450047e6e5b01598c5658026f392388e) I opened Writer, declared an ssh location.
Then I tried to save a file on it but LO crashed

Steps to reproduce:
1. Open Writer
2. Enable LO dialogs in Options, LibreOffice/General/ Use LO dialogs
3. Create a ssh location after having selected "Save as"
  a) Connect to server
  b) Enter parameters
4. Select ssh location, it asks for the password (notice it didn't retain the user defined)
5. Give a name to the file
6. Click on Save
->
Popup window telling: 
Error saving the document Untitle1:
NonExistent file.
(notice it didn't record the filename you gave)
7. Click OK

Crash
Current behavior:
Crash
Expected behavior:
No crash + file recording

I got this too with 3.6 sources updated today (commit bc19a37be6a6c8538d8a7b07adedd754db17f1df)
Operating System: Debian
Comment 1 Julien Nabet 2012-12-02 14:54:11 UTC
Created attachment 70929 [details]
bt with symbols + console logs

I attached bt with symbols + console logs at the exact location where it crashed
since this doesn't help:
0x00007f184ce7e475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
64	../nptl/sysdeps/unix/sysv/linux/raise.c: Aucun fichier ou dossier de ce type.
(gdb) bt
#0  0x00007f184ce7e475 in *__GI_raise (sig=<optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007f184ce816f0 in *__GI_abort () at abort.c:92
#2  0x00007f184d6d389d in __gnu_cxx::__verbose_terminate_handler() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#3  0x00007f184d6d1996 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#4  0x00007f184d6d19c3 in std::terminate() () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#5  0x00007f184d6d19d6 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#6  0x00007f184d6d1620 in __cxa_call_unexpected () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7  0x00007f184b4649e6 in SfxBaseModel::storeAsURL (this=0x46ee2c0, rURL="ssh://SSH_SITE/test3.odt", rArgs=uno::Sequence of length 4 = {...})
    at /home/julien/compile-libreoffice/libo/sfx2/source/doc/sfxbasemodel.cxx:1682
#8  0x00007f184b3fafb2 in SfxStoringHelper::GUIStoreModel (this=0x7fff71407f90, xModel=
    uno::Reference to {<com::sun::star::lang::XComponent> = {<com::sun::star::uno::XInterface> = {_vptr.XInterface = 0x7f182fd4fa30}, <No data fields>}, <No data fields>}, 
    aSlotName="SaveAs", aArgsSequence=uno::Sequence of length 4 = {...}, bPreselectPassword=0 '\000', aSuggestedName="test3.odt", nDocumentSignatureState=0)
    at /home/julien/compile-libreoffice/libo/sfx2/source/doc/guisaveas.cxx:1629
#9  0x00007f184b4186e4 in SfxObjectShell::ExecFile_Impl (this=0x46edb80, rReq=...) at /home/julien/compile-libreoffice/libo/sfx2/source/doc/objserv.cxx:673
#10 0x00007f184b415e7f in SfxStubSfxObjectShellExecFile_Impl (pShell=0x46edb80, rReq=...)
    at /home/julien/compile-libreoffice/libo/workdir/unxlngx6/SdiTarget/sfx2/sdi/sfxslots.hxx:180
#11 0x00007f184b248f1a in SfxShell::CallExec (this=0x46edb80, pFunc=0x7f184b415e5c <SfxStubSfxObjectShellExecFile_Impl(SfxShell*, SfxRequest&)>, rReq=...)
    at /home/julien/compile-libreoffice/libo/sfx2/inc/sfx2/shell.hxx:188

(of "SSH_site" is just to hide the real ssh site)
Comment 2 Julien Nabet 2012-12-02 14:56:22 UTC
Another thing: in description I told:
- notice it didn't retain the user defined
- notice it didn't record the filename you gave
I must add, that when dialog window shows ssh location, no directory or file are displayed (whereas there are some)

Perhaps everything is linked?
Comment 3 Julien Nabet 2012-12-02 14:57:02 UTC
Increase importance since it's a crash.
Comment 4 Julien Nabet 2012-12-02 22:20:31 UTC
a try catch for this block of sfx2/source/doc/docfile.cxx

   1974             Any aAny = aDestContent.getPropertyValue( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title" )) );
   1975             aAny >>= aFileName;

avoids the crash but not the popup:
Error saving the document Untitle1:
NonExistent file.

Then I got another popup message:
Error saving the document Untitle1:
General Internet error has occured
Comment 5 Julien Nabet 2012-12-02 22:37:19 UTC
Created attachment 70945 [details]
another bt

still have to dig but GNOME_VFS_ERROR_NOT_PERMITTED in bt may give some hints
Comment 6 Julien Nabet 2012-12-05 12:35:41 UTC
Michael: I'm a bit stuck with this, because 
1) I wonder if the crash isn't due to the other "minor" bugs see https://bugs.freedesktop.org/show_bug.cgi?id=57806#c2
2) sfx2 part is not easy
Do you know who could help here?
Comment 7 Michael Meeks 2012-12-05 14:22:52 UTC
Interesting; I suspect the file-selector is exercising bits of the ucp / gnome-vfs backend that other uses (load+save) don't reach.

Then again - have you tried passing an ssh:// URL on the command-line and seeing if you can load-save without problems ? [ I guess gnome-vfs is itself a bit old and creaking by now ;-].

Finally - to catch this we really need to do:

'catch throw' in gdb to find where the exception is thrown from - if you can break in gdb at the point you insert your new 'try' and instead do:

catch throw

or 'b __cxa_throw' if that fails

and get a trace from where the exception is thrown - that is prolly more useful.

Thanks ! :-)
Comment 8 Julien Nabet 2012-12-05 18:15:09 UTC
Created attachment 71033 [details]
popup + bt

Thank you Mike for your support.

Still on master sources (so future 4.1) updated today (commit 9f417544f83fb5645abd7b74382bede2246c73b8) and with complete rebuild + brand new profile, I launch LO from console:

./soffice.bin -nologo ssh://<username>@<ssh site>

I had a popup asking for password (the username has been recorded and is gray, so in read-only)

Then I had a popup error telling this:
Error reading data from the Internet.
Server error message: Erreur d'E/S.

(notice, I hadn't put any localization option in autogen.lastrun and had the message in French = IO Error)
This error comes from /home/julien/compile-libreoffice/libo/uui/source/iahndl.cxx +590 (see my previous bt).

Then, gdb caught in __cxa_throw () (see bt)

There are others caught exceptions afterwards:
Breakpoint 1, 0x00007f6a683b6b90 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00007f6a683b6b90 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007f6a4b1bf41b in filter::config::TypeDetection::impl_openStream (this=0x462f2a0, rDescriptor=...)
    at /home/julien/compile-libreoffice/libo/filter/source/config/cache/typedetection.cxx:1190
#2  0x00007f6a4b1bea19 in filter::config::TypeDetection::impl_askDetectService (this=0x462f2a0, sDetectService="com.sun.comp.hwpimport.HwpImportFilter", rDescriptor=...)
    at /home/julien/compile-libreoffice/libo/filter/source/config/cache/typedetection.cxx:1029
#3  0x00007f6a4b1be2d0 in filter::config::TypeDetection::impl_detectTypeDeepOnly (this=0x462f2a0, rDescriptor=..., lOutsideUsedDetectors=...)
    at /home/julien/compile-libreoffice/libo/filter/source/config/cache/typedetection.cxx:989
#4  0x00007f6a4b1bab6b in filter::config::TypeDetection::queryTypeByDescriptor (this=0x462f2a0, lDescriptor=uno::Sequence of length 5 = {...}, bAllowDeep=1 '\001')
    at /home/julien/compile-libreoffice/libo/filter/source/config/cache/typedetection.cxx:308


then again:
Breakpoint 1, 0x00007f6a683b6b90 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(gdb) bt
#0  0x00007f6a683b6b90 in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#1  0x00007f6a4b19c765 in filter::config::FilterCache::impl_loadItemOnDemand (this=0x45f24d0, eType=filter::config::FilterCache::E_TYPE, sItem="")
    at /home/julien/compile-libreoffice/libo/filter/source/config/cache/filtercache.cxx:1930
#2  0x00007f6a4b192224 in filter::config::FilterCache::getItem (this=0x45f24d0, eType=filter::config::FilterCache::E_TYPE, sItem="")
    at /home/julien/compile-libreoffice/libo/filter/source/config/cache/filtercache.cxx:398
#3  0x00007f6a4b1bb5bc in filter::config::TypeDetection::impl_checkResultsAndAddBestFilter (this=0x462f2a0, rDescriptor=..., sType="")
    at /home/julien/compile-libreoffice/libo/filter/source/config/cache/typedetection.cxx:430
#4  0x00007f6a4b1bac8b in filter::config::TypeDetection::queryTypeByDescriptor (this=0x462f2a0, lDescriptor=uno::Sequence of length 5 = {...}, bAllowDeep=1 '\001')
    at /home/julien/compile-libreoffice/libo/filter/source/config/cache/typedetection.cxx:336
Comment 9 Joel Madero 2012-12-11 16:50:16 UTC
Can we mark this one as NEW so that it's out of the UNCONFIRMED list?? Thanks Julien & Michael
Comment 10 Julien Nabet 2012-12-11 20:37:56 UTC
Joel: No pb for me to put it at "New" but I suppose since I created the bug, it could be better someone else confirm. (just in case an environment problem on my workstation)
Michael: have you reproduced this by any chance?
Comment 11 ydutrieux 2012-12-21 09:37:00 UTC
CONFIRMED on libo Version 4.0.0.0.beta1+ (Build ID: 51ecd2f55d608f853852335808b643f61b9a844)
TinderBox: Linux-x86_64_11-Release-Configuration, Branch:libreoffice-4-0, Time: 2012-12-17_20:11:04

Ubuntu 12.04
Comment 12 Julien Nabet 2014-06-19 21:40:40 UTC
On pc Debian x86-64 with 4.2.4 LO Debian package, I made a new test with local ssh server, it works.
I put it as WFM (at least from 4.2.4)

If someone can reproduce with LO (from 4.2.4 version), just reopen this tracker.