Bug Hunting Session
Bug 113834 - FILESAVE Crashes when saving remotely when service host is empty
Summary: FILESAVE Crashes when saving remotely when service host is empty
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.1.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:6.3.0 target:6.2.4
Keywords: haveBacktrace
Depends on:
Blocks: CMIS
  Show dependency treegraph
 
Reported: 2017-11-14 15:56 UTC by Emil Tanev
Modified: 2019-05-03 15:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Error message displayed on Linux (58.39 KB, image/png)
2017-11-14 16:16 UTC, Xisco Faulí
Details
bt from uui/source/iahndl.cxx (23.23 KB, text/plain)
2019-04-24 19:19 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Tanev 2017-11-14 15:56:31 UTC
Open Writer
Open File > Save Remote
Open Add Service
In the Host field, delete the host
Click the refresh arrow
(here the app freezes)
Right-click the toolbar icon for Writer and open another instance of Writer
Open File > Save Remote

Issue - the app crashes


https://www.screencast.com/t/PzQ3EE9j

Version: 6.0.0.0.alpha1+ (x64)
Build ID: a5af0fd9f27af42cf2e8571f659cdad6e606215b
CPU threads: 1; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2017-11-07_00:30:02
Locale: ja-JP (ja_JP); Calc: group
Comment 1 Xisco Faulí 2017-11-14 16:15:28 UTC
I can reproduce it in

Versión: 5.4.1.2
Id. de compilación: ea7cb86e6eeb2bf3a5af73a8f7777ac570321527
Subproc. CPU: 1; SO: Windows 6.1; Repres. IU: predet.; 
Configuración regional: es-ES (es_ES); Calc: group

but not in

Version: 6.0.0.0.alpha1+
Build ID: 9050854c35c389466923f0224a36572d36cd471a
CPU threads: 4; OS: Linux 4.10; UI render: default; VCL: x11; 
Locale: th-TH (ca_ES.UTF-8); Calc: group

as an error is displayed ( see attached image )

Thus, only Window
Comment 2 Xisco Faulí 2017-11-14 16:16:31 UTC
Created attachment 137755 [details]
Error message displayed on Linux
Comment 3 Julien Nabet 2017-11-14 20:25:06 UTC
On pc Debian x86-64 with master sources updated today + gen rendering, I don't reproduce this.
In fact, I can't open a new instance of Writer.

It could be interesting you give a try with a daily build including last fixes about parent window managing. Ideally it should include https://cgit.freedesktop.org/libreoffice/core/commit/?id=31b26130d90d4746cbb126fd9b6c1cb3487f644f
Comment 4 Julien Nabet 2019-01-29 15:21:53 UTC
On Win7 with master sources updated today, I got an hang when following provided procedure at refresh step.

I noticed this on console:
warn:sfx.dialog:11564:15696:sfx2/source/dialog/filedlghelper.cxx:1297: FileDialogHelper_Impl::implDoExecute: caught an exception!
warn:sfx.doc:11564:15696:sfx2/source/doc/objserv.cxx:845: Fatal IO error during save class com::sun::star::uno::Exception msg: ModelData_Impl::OutputFileDialog: ERRCODE_IO_ABORT
Comment 5 Julien Nabet 2019-04-24 14:01:17 UTC
On Win10 + master sources updated today, I still reproduce this.
warn:sfx.dialog:32532:10204:sfx2/source/dialog/filedlghelper.cxx:1309: FileDialogHelper_Impl::implDoExecute: caught an exception com.sun.star.ucb.ContentCreationException message: No Content Provider available for URL:  eError: (com.sun.star.ucb.ContentCreationError) NO_CONTENT_PROVIDER
warn:sfx.doc:32532:10204:sfx2/source/doc/objserv.cxx:841: Fatal IO error during save class com::sun::star::uno::Exception msg: ModelData_Impl::OutputFileDialog: ERRCODE_IO_ABORT
Comment 6 Julien Nabet 2019-04-24 19:09:41 UTC
On pc Debian x86-64 with master sources updated today + gtk3, no crash and this on console:
warn:uui:18584:18584:uui/source/iahndl.cxx:240: replaceMessageWithArguments: No arguments passed!
warn:sfx.doc:18584:18584:sfx2/source/doc/objserv.cxx:841: Fatal IO error during save N3com3sun4star3uno9ExceptionE msg: ModelData_Impl::OutputFileDialog: ERRCODE_IO_ABORT
Comment 7 Julien Nabet 2019-04-24 19:19:18 UTC
Created attachment 150986 [details]
bt from uui/source/iahndl.cxx

I thought it could be interesting to understand why in Linux it doesn't hang.
Comment 8 Julien Nabet 2019-04-25 09:32:51 UTC
After some investigation, the problem is here:
https://opengrok.libreoffice.org/xref/core/svtools/source/dialogs/ServerDetailsControls.cxx?r=e3e6f43b#450
449      // Get the Content
450      ::ucbhelper::Content aCnt( sUrl, m_xCmdEnv, comphelper::getProcessComponentContext() );
451      Sequence<OUString> aProps { "Title" };
    try
    {
        Reference< XResultSet > xResultSet( aCnt.createCursor( aProps ), UNO_QUERY_THROW );

The call of constructor of Content line 450 throws and since we're not in a try/catch it triggers an hang.
I don't know why it's ok for Linux and not for Windows. Just for curiosity, I'd like to know the behavior on Macos.

Anyway I'll submit a patch for review tonight after my daytime job.
I'll just put the quoted lines in the try/catch or perhaps we should just return if url is empty.
Comment 9 Julien Nabet 2019-04-25 16:57:41 UTC
https://gerrit.libreoffice.org/#/c/71321/
Comment 10 Commit Notification 2019-04-29 11:14:32 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/b9b930046368532c61b20637cb0356e195529440%5E%21

tdf#113834: fix crash when service host empty

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Julien Nabet 2019-04-30 19:01:05 UTC
Cherry-pick for 6.2 branch on review here:
https://gerrit.libreoffice.org/#/c/71593/
Comment 12 Commit Notification 2019-05-03 15:13:21 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/580e8c72c83265c9ead0bde6845521558546b3df%5E%21

tdf#113834: fix crash when service host empty

It will be available in 6.2.4.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.