Bug 87984 - CRASH: Trying to open Google Drive via CMIS
Summary: CRASH: Trying to open Google Drive via CMIS
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.5.0.0.alpha0+ Master
Hardware: Other All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: haveBacktrace
: 89947 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-02 22:30 UTC by Robinson Tryon (qubit)
Modified: 2016-05-27 09:03 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
gdbtrace (2.33 KB, application/gzip)
2015-01-09 18:17 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robinson Tryon (qubit) 2015-01-02 22:30:10 UTC
Working on bug 87937 when suddenly... CRASH!

LO Version: 4.5.0.0.alpha0+
Build ID: 5c60dab390d66a4d5abeaf548efecf3913b90839
TinderBox: Linux-rpm_deb-x86_64@46-TDF
Branch:master
Time: 2014-12-31_00:20:30
Locale: en_US

Let's get some REPRO up in this bug:

- Enable LibreOffice dialogs
- File -> Open -> Servers
- Then File Service -> Type -> CMIS
- Name: "a"
- Type: CMIS
- Click the "⟳" (Refresh-looking) button

RESULT: LibreOffice will crash
Comment 1 Robinson Tryon (qubit) 2015-01-02 22:32:12 UTC
Looks like bug 73090 had the same behavior but unfortunately never got a confirmed REPRO.
Comment 2 Julien Nabet 2015-01-02 22:42:02 UTC
On pc Debian x86-64 with master sources updated today, here what I tried:
- open Writer
- enabled LO dialog (Tools/Options/General/"Use LibreOffice dialogs" checked)
- chose File Open
- clicked "Servers..." button
- Selected Type "CMIS" in "File Service"
- typed "a" in "Name" textbox
- chose "Alfresco 4" in "Server Type" (Server details) listbox
- clicked Refresh
=> A popup appeared to ask user password
Noticed, I let the default binding URL: http://<host>/alfresco/cmisws/RepositoryService?wsdl

Did I miss something?
Comment 3 Robinson Tryon (qubit) 2015-01-02 22:52:29 UTC
(In reply to Julien Nabet from comment #2)
> On pc Debian x86-64 with master sources updated today, here what I tried:
> - open Writer
> - enabled LO dialog (Tools/Options/General/"Use LibreOffice dialogs" checked)
> - chose File Open
> - clicked "Servers..." button

Ok

> - Selected Type "CMIS" in "File Service"
> - typed "a" in "Name" textbox

Are those fields in reverse-order for you? For me it's:
 Name:
 Type:

> - chose "Alfresco 4" in "Server Type" (Server details) listbox

Why? My instructions didn't say to click the 'Server Type' box :-)

> - clicked Refresh
> => A popup appeared to ask user password
> Noticed, I let the default binding URL:
> http://<host>/alfresco/cmisws/RepositoryService?wsdl

k

> 
> Did I miss something?

I think you were *nice* and tried to fill in all of the fields. My goal here is to break/crash LibreOffice, so this time please follow the steps and just click the Refresh-looking button.
Comment 4 Julien Nabet 2015-01-02 22:58:17 UTC
(In reply to Robinson Tryon (qubit) from comment #3)
...
> > - Selected Type "CMIS" in "File Service"
> > - typed "a" in "Name" textbox
> 
> Are those fields in reverse-order for you? For me it's:
>  Name:
>  Type:
No but you indicated:
"
- Then File Service -> Type -> CMIS
- Name: "a"
"

> > - chose "Alfresco 4" in "Server Type" (Server details) listbox
> 
> Why? My instructions didn't say to click the 'Server Type' box :-)
Where?
I just read:
"
Type: CMIS
"
after "Name: "a""
so thought you had made a mistake and meant Alfresco type

I tried again and definitely missed something since I still don't reproduce this :-(
Comment 5 Robinson Tryon (qubit) 2015-01-02 23:07:51 UTC
(In reply to Julien Nabet from comment #4)
> (In reply to Robinson Tryon (qubit) from comment #3)
> ...
> > > - Selected Type "CMIS" in "File Service"
> > > - typed "a" in "Name" textbox
> > 
> > Are those fields in reverse-order for you? For me it's:
> >  Name:
> >  Type:
> No but you indicated:
> "
> - Then File Service -> Type -> CMIS
> - Name: "a"

Ah, okay -- I copied-in some of the repro steps from another bug that I was trying to repro, but I was trying to do too many things at once. Let me rewrite my instructions to not be so shitty :-)

REPRO Steps:
- Open LibreOffice
- Enable LibreOffice dialogs
- File -> Open
- Click 'Servers' button
- Under 'File Service':
    - Name: a
    - Type: CMIS
- Now click the "⟳" (Refresh-looking) button

Expected: Anything but a crash

Result: Sadness
Comment 6 Julien Nabet 2015-01-02 23:12:39 UTC
I've got a popup error with "Nonexistent file."
Hope someone else will be luckier than me! :-)
Comment 7 David Gerard 2015-01-03 01:18:25 UTC
Just compiled on my PC, from latest master of an hour ago. I did the following:

- Enable LibreOffice dialogs
- File -> Open -> Servers
- Then File Service -> Type -> CMIS
- Name: "a"
- Type: CMIS
- Click the "⟳" (Refresh-looking) button

and I got a dialogue box "Nonexistent file."

I'm on Xubuntu 14.04 AMD64.
Comment 8 Robinson Tryon (qubit) 2015-01-03 05:35:42 UTC
(In reply to David Gerard from comment #7)
> Just compiled on my PC, from latest master of an hour ago. I did the
> following:
> ...[repro steps] 
> and I got a dialogue box "Nonexistent file."

Hmmm, hmm.

I'll test the next daily -- hopefully it's been fixed in the last couple of days :-)
Comment 9 Joel Madero 2015-01-09 17:08:38 UTC
Ubuntu 14.04 x 64
LibreOffice 4.5 
Build Date:   Fri Jan 2 21:30:03 2015 +0100

Cannot reproduce, I see same thing as Julien and David.

Closing as WFM. Robinson if you can reproduce on a newer build still, you know what to do :)
Comment 10 raal 2015-01-09 17:59:20 UTC
I can confirm crash with Version: 4.5.0.0.alpha0+
Build ID: a272f5b7b30f356418ecf28eb95d066f081d1624
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-01-09_09:50:59

Steps from description.
Comment 11 raal 2015-01-09 18:17:55 UTC
Created attachment 112022 [details]
gdbtrace
Comment 12 Julien Nabet 2015-01-09 22:19:17 UTC
Thank you raal for the bt.
I noticed this part:
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2274736 in vcl::Window::ImplCalcToTop(ImplCalcToTopData*) ()
   from /opt/libreofficedev4.5/program/libvcllo.so
(gdb) backtrace
#0  0x00007ffff2274736 in vcl::Window::ImplCalcToTop(ImplCalcToTopData*) ()
   from /opt/libreofficedev4.5/program/libvcllo.so

Caolan/Chris:
I noticed in the function ImplCalcToTop there was no check on pPrevData (which is the parameter of the function):
    227             if ( !aInvalidateRegion.IsEmpty() )
    228             {
    229                 ImplCalcToTopData* pData    = new ImplCalcToTopData;
    230                 pPrevData->mpNext           = pData;
    231                 pData->mpNext               = NULL;
    232                 pData->mpWindow             = this;
    233                 pData->mpInvalidateRegion   = new vcl::Region( aInvalidateRegion );
    234             }
so I thought about this straightforward patch:
-            if ( !aInvalidateRegion.IsEmpty() )
+            if ( pPrevData && !aInvalidateRegion.IsEmpty() )
Any idea?
Comment 13 Caolán McNamara 2015-01-12 09:24:10 UTC
Can't reproduce either and not sufficient symbols to determine if julien's theory of a NULL pPrevData is plausible.
Comment 14 Robinson Tryon (qubit) 2015-01-14 09:07:52 UTC
TESTING again with the latest daily build of master
OS: Ubuntu 14.04
LO Version: 4.5.0.0.alpha0+
Build ID: 84c69550bcb8139669de9cf98b51c35f21fe853d
TinderBox: Linux-rpm_deb-x86_64@46-TDF, 
Branch:master, 
Time: 2015-01-13_08:44:23
Locale: en_US

(In reply to Robinson Tryon (qubit) from comment #5)
> REPRO Steps:
> - Open LibreOffice
> - Enable LibreOffice dialogs
> - File -> Open
> - Click 'Servers' button
> - Under 'File Service':
>     - Name: a

(Faster repro: Leave the 'Name' field empty)

>     - Type: CMIS
> - Now click the "⟳" (Refresh-looking) button
> 
> Expected: Anything but a crash
> 
> Result: Sadness

CONFIRMED -- Same crash with 4.5-master build on 2015-01-13

(In reply to Caolán McNamara from comment #13)
> Can't reproduce either and not sufficient symbols to determine if julien's
> theory of a NULL pPrevData is plausible.

Caolan: What can we do to help track this down?
Comment 15 Gordo 2015-07-10 19:15:11 UTC
Might this be a dupe of bug 89947?
Comment 16 Julien Nabet 2015-11-18 22:13:24 UTC
Robinson: any update with last stable LO version 5.0.3?
Indeed, there've been some improvements on CMIS since July (see http://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=cmis)
Comment 17 David Gerard 2015-11-19 13:28:43 UTC
Trying again, with master f08d0142afbcb45c12604988022bb3da18be1d84 compiled from source on Xubuntu 14.04:

- Open Writer
- File -> Open Remote File ...
- Add Service -> Google Drive
- log in
- dialogue box: "General input/output error." (with the full stop)

So it's not *crashing* ...
Comment 18 Julien Nabet 2015-11-19 22:27:43 UTC
(In reply to David Gerard from comment #17)
> Trying again, with master f08d0142afbcb45c12604988022bb3da18be1d84 compiled
> from source on Xubuntu 14.04:
> 
> - Open Writer
> - File -> Open Remote File ...
> - Add Service -> Google Drive
> - log in
> - dialogue box: "General input/output error." (with the full stop)
> 
> So it's not *crashing* ...

With master sources updated today, once I clicked "Add Service" button, the by default option is "Google Drive" and everything is disabled except "Help" and "Cancel" button.

I noticed this on logs:
warn:vcl.layout:3106:1:vcl/source/window/builder.cxx:1759: probably need to implement GtkCellRendererText or add a makeGtkCellRendererText function
Comment 19 David Gerard 2015-11-19 23:02:32 UTC
>With master sources updated today, once I clicked "Add Service" button, the by default option is "Google Drive" and everything is disabled except "Help" and "Cancel" button.

That's what you get if you compile without the  --with-gdrive-client-secret and --with-gdrive-client-id - if you add those (either the ones in the TDF builds or get your own) it works, at least far enough to fail.
Comment 20 Giuseppe Castagno (aka beppec56) 2016-03-14 08:54:42 UTC
Daily masters are not Google Drive enabled, this one:

<http://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@70-TDF/gdrivetest2/LibreOfficeDev_5.2.0.0.alpha0_Linux_x86-64_deb.tar.gz>

It's a special version of master build created to check bug 98416.
It probably fixes this bug as well, or the connect to Google Drive part anyway.

Note that there's still bug 87938 (two-factor auth for gdrive not working) - so if you want to test, you have to disable two-factor authentication temporarily.

At <http://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@70-TDF/gdrivetest2> rpms are available as well.
Comment 21 Caolán McNamara 2016-05-26 16:29:23 UTC
The originally reported crash might also be bug 96279 where the various password dialogs could end up modal to the window behind the file dialog even when shown over it, and the resulting stack of widgets was out of sync. The "⟳" likely put up the username/password dialog.

Anyway, we're eol for 5-0 soon and its "all changed" in 5.1 onwards so I think this particular bug report is out of date now. If anyone can get 5.1 to crash in a similar fashion feel free to put me on cc on that new bug.
Comment 22 Caolán McNamara 2016-05-27 09:03:24 UTC
*** Bug 89947 has been marked as a duplicate of this bug. ***