[SRU] GUINT32/64_SWAP_LE_BE macros do not enclose val argument in parentheses

Bug #1214352 reported by Björn Michaelsen
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
GLib
Fix Released
Medium
LibreOffice
Fix Released
Critical
glib2.0 (Ubuntu)
Fix Released
Undecided
Adam Conrad
gvfs (Ubuntu)
Fix Released
Undecided
Unassigned
libreoffice (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

[Impact]
 * This bug affects Glib-dependent packages, one of them is modern version of LibreOffice 4.x from PPA (https://launchpad.net/~libreoffice/+archive/ubuntu/ppa).
* LibreOffice is very important software. Modern versions are more functional. Without them Ubuntu is nothing, it is a toy.

[Test Case]
 1. Place OpenDocument file (for example 'test.odt') on SMB/CIFS server (Samba on GNU/Linux, or from Windows). Make this share available for read-write.
 2a.1. Open Nautilus, navigate it to 'smb://server_name/share_name/', wait the share to be mounted with GVFS.
 2a.2. Double click on 'test.odt'
 2b. Launch terminal and send 'libreoffice smb://server_name/share_name/test.odt' command.
 3. Get error message from LibreOffice:
     "The file 'test.odt' is corrupt and therefore cannot be opened.
     LibreOffice can try to repair the file.

        The corruption could be the result of document manipulation or of
     structural document damage due to data transmission.
     We recommend that you do not trust the content of the repaired document.
     Execution of macros is disabled for this document.

        Should LibreOffice repair the file?

        Yes No"
 4a. If I click 'Yes', the file is opened, but the title of the document
          is "Untitled 1 (repaired document)", not original name.
 4b. If I click 'No', the dialog 'LibreOffice 4.4' is opened with text:
          The file 'test.odt' could not be repaired and therefore cannot be opened.
        OK"

        I click 'OK' here, the next window "LibreOffice 4.4.1.2" is opened with text:
        "General Error.
        General input/output error.

        OK"

        If I click OK here - no files are opened.

While step 3 gvfsd-smb process eats CPU then terminates with error. This error is caused by bug in Glib (wrong type conversion in macros).

[Regression Potential]

 * This functionality is essential. Please fix this bug.
I (and you) can't tell Windows users, that they should not open office files from network shares in GNU/Linux.

 * The patch has two lines (https://git.gnome.org/browse/glib/commit/?id=255c65f83c1515a7e3fc4609b36e72acc08a79e4) and well-tested at upstream.

 * This bug may cause potential loss of data.

[Other Info]

 * Corresponding links to LibO bugs are:
   https://bugs.freedesktop.org/show_bug.cgi?id=67527
   https://bugs.documentfoundation.org/show_bug.cgi?id=72337

[Original description]
On 12.04 LTS precise GUINT32/64_SWAP_LE_BE macros do not enclose val argument in parentheses, causing trouble down the stack in gvfs and LibreOffice (and possibly in lots of obscure bugs elsewhere).
There is a patch available, but as this touches the header, it needs a full recompile of rdepends.
see: https://lists.fedoraproject.org/pipermail/devel/2013-March/180302.html ff. for details

Revision history for this message
In , Oskar Rittsél (mail-rittsel) wrote :

I'm running LO 4.1.0.4 from your PPA on Ubuntu 12.04 64bit - libreoffice (1:4.1.0-0ubuntu1~precise1~ppa1)

After the last update to 4.1.0.4 I can't open odt, ods & xlsx (can be more extensions that I haven't found yet) over SMB within Nautilus. However .doc works fine.

If I open any of the others i get that the file is corrupt and the possibility to repair the file. Problem is that it's not corrupt, my colleagues can open them (other OS and software), and if I copy the file to my local computer I'm able to open them without a problem.

Doesn't matter if I start Writer and use the open file option there.

Even if i use this with terminal it's no problem:
$ libreoffice --writer /home/user/.gvfs/path/to/document.odt

So I don't know how to give you more information since I can't reproduce it through the terminal. Is there any way to debug with GUI or get a log file? Can't find any answers on Google for that.

To reproduce:
Nautilus -> Browse Network -> Windows network -> SHARE -> double click *.odt

Revision history for this message
In , Samuel Wolf (samuel-wolf) wrote :

Can not save or change .odb file over smb/nautilus mount, work fine in LO4.0.
It look like it is the same source problem you have.

Revision history for this message
In , Samuel Wolf (samuel-wolf) wrote :

Created attachment 83298
Can edit and save

Revision history for this message
In , Samuel Wolf (samuel-wolf) wrote :

Created attachment 83299
Can not edit or save

Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

confirmed by comment #2 => NEW, regression as claimed to have worked with 4.0.x.

Can you test (maybe in a VM) if a later Ubuntu version (e.g. 13.04) still shows the issue? => NEEDINFO

Revision history for this message
In , Samuel Wolf (samuel-wolf) wrote :

My system is debian 7.1 (wheezy) amd64.

Revision history for this message
In , Jmadero-dev (jmadero-dev) wrote :

Bjoern - going to go ahead and mark this as NEW - as you've confirmed. I'll leave any further discussion to you and <email address hidden> - seems like a nasty one so upping priority.

Revision history for this message
In , Oskar Rittsél (mail-rittsel) wrote :

(In reply to comment #4)
> confirmed by comment #2 => NEW, regression as claimed to have worked with
> 4.0.x.
>
> Can you test (maybe in a VM) if a later Ubuntu version (e.g. 13.04) still
> shows the issue? => NEEDINFO

Hi Björn,

I've installed 13.04 in a VM and funny enough it didn't work with the default installation of 4.0, however, I installed 4.1.0.4 through PPA for 13.04 (raring), and it works just fine!

I ran ps aux | grep libreoffice on both machines and they both show the same:

rittsel 2824 0.0 0.1 143728 3184 ? Sl 04:46 0:00 /usr/lib/libreoffice/program/oosplash --writer /run/user/rittsel/gvfs/smb-share:server=XXXXX,share=bibliotek/Serverdrift/Backupunderlag.ods
rittsel 2845 0.7 3.0 808068 61496 ? Dl 04:46 0:00 /usr/lib/libreoffice/program/soffice.bin --writer /run/user/rittsel/gvfs/smb-share:server=XXXXX,share=bibliotek/Serverdrift/Backupunderlag.ods --splash-pipe=6

Revision history for this message
In , Martijnbuikema (martijnbuikema) wrote :

Might this bug be similar to Bug 67675 & Bug 67769?

Revision history for this message
In , Oskar Rittsél (mail-rittsel) wrote :

(In reply to comment #8)
> Might this bug be similar to Bug 67675 & Bug 67769?

Looks like it's exactly the same as 67675, but 67769 says it disappears after 10 seconds, that's not the case for me. I get the repair dialog, just as 67675.

Revision history for this message
In , Ildar Saidashev (isaidashev) wrote :

I have the same problem

Revision history for this message
In , Momonasmon (momonasmon) wrote :

*** Bug 67675 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Momonasmon (momonasmon) wrote :

*** Bug 67892 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Momonasmon (momonasmon) wrote :

*** Bug 67769 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Libreo (libreo) wrote :

Can confirm this issue on my machine with Ubuntu 12.04 with LO 4.1.0.4 from ppa:libreoffice/ppa . I can only open .odt or .odp files successfully either from a local folder or by going via ~/.gvfs/sharename/document.odt . Opening from the share in Nautilus triggers the repair dialog.

Revision history for this message
In , Momonasmon (momonasmon) wrote :

Here is a WORKAROUND:

For Nautilus users:
Open the .desktop file (such as /usr/share/applications/libreoffice4.1-writer.desktop for LO Writer) and comment the following line:
X-GIO-NoFuse=true

For Dolphin users:
Open the same file, and comment the following line:
X-KDE-Protocols=file,http,smb,ftp,webdav

Revision history for this message
In , Momonasmon (momonasmon) wrote :

I've made some testing of this bug, and it seems that it depends on distribution\packages-source combination, as follows:

What was tested:
----------------
1) Ubuntu 12.04.2, 13.04 (64-bit) with packages from PPA and packages from libreoffice.org
2) Fedora 19 (64-bit) with packages from repos and packages from libreoffice.org
3) Ubuntu 13.10 (64-bit) with packages from repos
LO 4.1.0.4 was used in all cases.

Reproduction steps:
-------------------
1) Double-click in Nautilus
-OR-
2) From CLI: libreoffice(4.1) --writer smb://ip_address/share_name/document.odt
Both methods always gave the same results. Each time I couldn't open the document, applying the workaround from comment 15 did the job.

Results:
--------
1) Cases when I got the repair dialog:
Ubuntu 12.04.2 + Packages from PPA

2) Cases when LO just closed immediately (just like in bug 67769):
Ubuntu 12.04.2 + Packages from libreoffice.org
Ubuntu 13.04 + Packages from libreoffice.org
Ubuntu 13.10 + Packages from repos
Fedora 19 + Packages from libreoffice.org

3) Cases when I couldn't reproduce the bug:
Fedora 19 + Packages from repos

4) Uncertain:
Ubuntu 13.04 + Packages from PPA (This one is really strange, as it works when double-clicking in Nautilus, but don't work from the CLI, unless you opened Nautilus and mounted the share before that.)

Revision history for this message
In , Momonasmon (momonasmon) wrote :

Just to correct some inaccuracy in my last comment: Fedora 19 + Packages from repos behave the same as Ubuntu 13.04 + Packages from PPA.

Revision history for this message
In , Momonasmon (momonasmon) wrote :

*** Bug 68119 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Bryan Berndt (bberndt) wrote :

Problem happens with me as well. Fedora 18, x64, (KDE) LibreOffice 4.1, installed with rpm's from the LibreOffice site.

Doubleclicking on any Libreoffice file from a SBM share in Dolphin browser, Libreoffice starts, if its not already running, and then I get the bouncing icon next to my mouse cursor for a little while, and then no document. No obvious error, or anything, just no document. Clicking on a plain text file, for example works fine. LibreOffice 4.0 worked fine.

Work around in comment 15 also fixes problem. (so far with .xls files, Using Calc)

Revision history for this message
In , Sbergman (sbergman) wrote :

What I can reproduce on a Fedora 19 (x86_64) machine is as follows:

Installed a local samba server with
$ sudo yum install samba samba-client
$ sudo setsebool samba_enable_home_dirs on
$ sudo systemctl start smb.service
$ sudo smbpasswd -a "$USER"
first.

Then, used Nautilus "Connect to Server" to connect to smb://127.0.0.1/<USER>, and opened some *.odt file via double-click in the Fedora 19 distro LibreOffice (4.1.0), which worked as expected.

Then, used command line ".../soffice smb://127.0.0.1/"$USER"/...odt" to open that *.odt file in various LibreOffice versions:

It opened the document as expected in all those LibreOffice versions that are built with GIO support (the distro's LO 4.1.0, my own-built master).

But it failed to do anything and just silently returned with all those LibreOffice versions that are built with old GnomeVFS support (the LO 3.6, 4.0, 4.1 available from <http://www.libreoffice.org/download>).

So I created an own-built master with GnomeVFS rather than GIO support (--disable-gio --enable-gnome-vfs), which also failed to do anything, ultimately because the call to gnome_vfs_get_file_info in gvfs::Content::getInfo (ucb/source/ucp/gvfs/gvfs_content.cxx) failed with GNOME_VFS_ERROR_NOT_SUPPORTED. The reason for that, in turn, was that package gnome-vfs2-smb was not installed on the machine.

That is, installing the Fedora 19 package gnome-vfs2-smb made the command line ".../soffice smb://127.0.0.1/"$USER"/...odt" work for all those cases for which it had previously failed, incl. the LO 3.6., 4.0, 4.1 available from <http://www.libreoffice.org/download>.

This likely explains comment 19 "No obvious error, or anything, just no document."

What I could not (yet?) reproduce is a repair dialog appearing.

So, the new NEEDINFO request is whether there is anybody

Revision history for this message
In , Sbergman (sbergman) wrote :

(In reply to comment #20)
> So, the new NEEDINFO request is whether there is anybody

please ignore that junk at the end of the comment

Revision history for this message
In , Momonasmon (momonasmon) wrote :

(In reply to comment #20)
> What I could not (yet?) reproduce is a repair dialog appearing.
As it's reproducible only under Ubuntu 12.04, I guess it's caused by old versions of GNOME\Samba libs. This explains the fact you can't reproduce that on a recent distro.

Revision history for this message
In , Sbergman (sbergman) wrote :

(In reply to comment #22)
> (In reply to comment #20)
> > What I could not (yet?) reproduce is a repair dialog appearing.
> As it's reproducible only under Ubuntu 12.04, I guess it's caused by old
> versions of GNOME\Samba libs. This explains the fact you can't reproduce
> that on a recent distro.

That makes it sound suspiciously like yet another fallout of GLib bug <https://bugzilla.gnome.org/show_bug.cgi?id=695925> "GUINT32/64_SWAP_LE_BE macros do not enclose val argument in parentheses," "which [...] caused trouble with LibreOffice, where running 'soffice sftp://.../.../test.odt' to access an .odt file via GVFS failed to properly type-detect that file as a Writer document and produced bogus error messages about the file being broken."

Revision history for this message
In , Sbergman (sbergman) wrote :

(In reply to comment #23)
> (In reply to comment #22)
> > (In reply to comment #20)
> > > What I could not (yet?) reproduce is a repair dialog appearing.
> > As it's reproducible only under Ubuntu 12.04, I guess it's caused by old
> > versions of GNOME\Samba libs. This explains the fact you can't reproduce
> > that on a recent distro.
>
> That makes it sound suspiciously like yet another fallout of GLib bug
> <https://bugzilla.gnome.org/show_bug.cgi?id=695925> "GUINT32/64_SWAP_LE_BE
> macros do not enclose val argument in parentheses," "which [...] caused
> trouble with LibreOffice, where running 'soffice sftp://.../.../test.odt' to
> access an .odt file via GVFS failed to properly type-detect that file as a
> Writer document and produced bogus error messages about the file being
> broken."

Björn, can you verify whether on Ubuntu 12.04 this issue is indeed caused by <https://bugzilla.gnome.org/show_bug.cgi?id=695925> "GUINT32/64_SWAP_LE_BE macros do not enclose val argument in parentheses" not yet being fixed? (Note that it does not suffice to have that GLib header fix in place, you also need to have any relevant packages that include that header rebuilt.)

Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote :
Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

Confirming Ubuntu 12.04 does not have the extra parathesis, filed:

 https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/1214352

and adding remote bugs.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "patch from gnome bug 695925" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in df-libreoffice:
importance: Unknown → Critical
status: Unknown → Confirmed
Changed in glib:
importance: Unknown → Medium
status: Unknown → Fix Released
Revision history for this message
In , Momonasmon (momonasmon) wrote :

@Stephan Bergmann: Just tried to install gnome-vfs2-smb on Fedora 19 as you suggested, but in my case it didn't help. LO 4.1.0.4 from libreoffice.org still closes immediately, either when double-clicking in nautilus or using the CLI. BUT it helps with 4.2.0.0.alpha0+ Build ID: f4004429d339009bec6babe30becdc9c727940b8 TinderBox: Linux-x86-64@8-SLED11, Branch:master, Time: 2013-08-18_23:20:11

There is a problem also with distro's (Fedora 19) packages you didn't notice: The CLI doesn't work until you open nautilus and manually open the share. It's a problem because the whole point of using CLI is to avoid the GUI.

It's even worse for KDE users, since they can't even open by double-clicking in Dolphin, until they open nautilus and manually mount the share (although this can be avoided, by appling the workaround from comment 15, or by reverting commit 673be8e76856c6bc39f448f3374db4ae84258952)

BTW There is a seperate bug report about the CLI (bug 49776). Should we close it as a duplicate of the current bug?

Revision history for this message
In , Sbergman (sbergman) wrote :

[Please note bug 49776 comment 6 about the two different kinds of LO builds involved, the --enable-gnome-vfs and --enable-gio kinds.]

(In reply to comment #26)
> @Stephan Bergmann: Just tried to install gnome-vfs2-smb on Fedora 19 as you
> suggested, but in my case it didn't help. LO 4.1.0.4 from libreoffice.org
> still closes immediately, either when double-clicking in nautilus or using
> the CLI.

Hm, that's bad, and I cannot reproduce it on my up-to-date Fedora 19 x86_64 box with <http://donate.libreoffice.org/home/dl/rpm-x86_64/4.1.0/en-US/LibreOffice_4.1.0_Linux_x86-64_rpm.tar.gz>: With the setup from comment 20, "/opt/libreoffice4.1/program/soffice smb://127.0.0.1/"$USER"/Documents/test.odt" first pops up an "Authentication Required" dialog and then loads the document.

> BUT it helps with 4.2.0.0.alpha0+ Build ID:
> f4004429d339009bec6babe30becdc9c727940b8 TinderBox: Linux-x86-64@8-SLED11,
> Branch:master, Time: 2013-08-18_23:20:11

OK, that tinderbox is indeed one that produces LO builds of the first, --enable-gnome-vfs kind (cf. e.g. <http://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=MASTER&full-log=1377058201.26472#5>), so it will be affected by presence of gnome-vfs2-smb package. Odd though that things don't work for you with the above LO 4.1 of the same kind.

> There is a problem also with distro's (Fedora 19) packages you didn't
> notice: The CLI doesn't work until you open nautilus and manually open the
> share. It's a problem because the whole point of using CLI is to avoid the
> GUI.

See the comment at <https://bugzilla.redhat.com/show_bug.cgi?id=895690#c15> "Libreoffice causing errors when SAVING files by gvfs-mount (Samba)."

> BTW There is a seperate bug report about the CLI (bug 49776). Should we
> close it as a duplicate of the current bug?

I would prefer to wait until somebody who observed that bug in the past with a LO build of one kind is able to verify the bug is fixed with a later LO build of the same kind.

Changed in glib2.0 (Ubuntu):
assignee: nobody → Adam Conrad (adconrad)
Revision history for this message
In , Siegles (siegles) wrote :

Same problem as comment 19 with Ubuntu 13.04. simply no document. 4.0.2.2 works fine, 4.1 does not.

Revision history for this message
In , Momonasmon (momonasmon) wrote :

(In reply to comment #28)
> Same problem as comment 19 with Ubuntu 13.04. simply no document. 4.0.2.2
> works fine, 4.1 does not.
Hi,
Unfortunately you didn't say which LO package do you use - from PPA or from libreoffice.org. Each of them has completely different problems.

- If you're using the packages from PPA, then the bug should be solved with 4.1.2 (unfortunately the PPA currently stuck with 4.1.1). When it will be updated to 4.1.2, it should work if you also install 'gvfs-backends' and 'libreoffice-gnome' packages. That way it works with Ubuntu 13.10.

- If you're using the packages from libreoffice.org site, then theoretically it should work if you install 'libgnomevfs2-extra' package. But for some reason it's not working. I can confirm that it's not working with 4.1.2.3 under both Ubuntu 13.04 and 13.10 (64-bit). Same happens under Fedora 19 (64-bit), as you can see from the first paragraph of comment 26. And it's still the case for 4.1.2.3. There is definitely some problem with the official builds.

So currently you have to apply the workaround from comment 15, or upgrade to Ubuntu 13.10.

Revision history for this message
In , Bryan Berndt (bberndt) wrote :

Problem still exists, it seems, for me. Using Fedora 19 x64 this time, and the RPMs from the LibreOffice site. Version 4.1.3.

Revision history for this message
In , Jmadero-dev (jmadero-dev) wrote :

Can someone do a bibisect of this so that we can maybe get a range?

https://wiki.documentfoundation.org/QA/HowToBibisect

Revision history for this message
In , Momonasmon (momonasmon) wrote :

(In reply to comment #31)
> Can someone do a bibisect of this so that we can maybe get a range?
@Joel Madero: There is no need for bibisect. The problem probably is with the build environment where we build official releases (maybe some old headers or something similar). Please see Stephan Bergmann's comment at comment 20 that it works in his own build, and also see my comment at comment 26 that it works with a build from tinderbox, but not with the official build. Same under Ubuntu - see comment 29.

Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

(In reply to comment #29)
> - If you're using the packages from PPA, then the bug should be solved with
> 4.1.2 (unfortunately the PPA currently stuck with 4.1.1). When it will be
> updated to 4.1.2, it should work if you also install 'gvfs-backends' and
> 'libreoffice-gnome' packages. That way it works with Ubuntu 13.10.
Note that the ppa has:
1:4.1.3~rc2-0ubuntu1~saucy1~ppa3
1:4.1.3~rc2-0ubuntu1~raring1~ppa1
1:4.1.3~rc2-0ubuntu1~precise1~ppa1

so all versions should be good, unless the bug is in the respective baseline on that ppa.

Revision history for this message
In , Sbergman (sbergman) wrote :

(In reply to comment #30)
> Problem still exists, it seems, for me. Using Fedora 19 x64 this time, and
> the RPMs from the LibreOffice site. Version 4.1.3.

What problem exactly still exists?

Also, do you have the gnome-vfs2-smb package installed, see comment 20?

Revision history for this message
In , Momonasmon (momonasmon) wrote :

(In reply to comment #34)
> What problem exactly still exists?
@Stephan Bergmann: Bryan Berndt explained his problem at comment 19.

Revision history for this message
In , Sbergman (sbergman) wrote :

(In reply to comment #35)
> (In reply to comment #34)
> > What problem exactly still exists?
> @Stephan Bergmann: Bryan Berndt explained his problem at comment 19.

Ah, right. So /if/ he doesn't have gnome-vfs2-smb package installed, his findings in comment 30 would be consistent with my findings in comment 20.

Bryan, can you please clarify?

Revision history for this message
In , Momonasmon (momonasmon) wrote :

@Stephan Bergmann: I found what causes the problem with the official build: Looking at the strace output showed that libORBit-2.so.0 can't be found. So I did 'sudo yum install ORBit2' and now it works!

Revision history for this message
In , Momonasmon (momonasmon) wrote :

(In reply to comment #33)
> Note that the ppa has:
> 1:4.1.3~rc2-0ubuntu1~saucy1~ppa3
> 1:4.1.3~rc2-0ubuntu1~raring1~ppa1
> 1:4.1.3~rc2-0ubuntu1~precise1~ppa1
>
> so all versions should be good, unless the bug is in the respective baseline
> on that ppa.
Indeed. I can confirm that it works now under Ubuntu 13.04 (64-bit). Thanks.

Revision history for this message
In , Momonasmon (momonasmon) wrote :

(In reply to comment #37)
> @Stephan Bergmann: I found what causes the problem with the official build:
> Looking at the strace output showed that libORBit-2.so.0 can't be found. So
> I did 'sudo yum install ORBit2' and now it works!
I can confirm the same for Ubuntu 13.10 (64-bit). Installing 'liborbit2' package solves the problem.

But unfortunately it still won't work under KDE, unless exporting 'OOO_FORCE_DESKTOP=gnome'. That is: Running 'soffice smb://some_ip/share/document.odt' under KDE doesn't work, but 'OOO_FORCE_DESKTOP=gnome soffice smb://some_ip/share/document.odt' does work. Tested under Fedora 19 (64-bit) & Ubuntu 13.10 (64-bit). Tested with 4.1.3.2 & master build (Build ID: 732ec36edfd09d2091d70c4d71b5f182fe279c45 TinderBox: Linux-rpm_deb-x86_64@46-TDF) built with --enable-gnome-vfs.

Same for MATE desktop. Tested with MATE 1.6.0 under Fedora 19 (64-bit) & LMDE MATE Edition (64-bit).

Revision history for this message
In , Momonasmon (momonasmon) wrote :

*** Bug 71981 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Momonasmon (momonasmon) wrote :

@Stephan Bergmann: I found why builds with --enable-gnome-vfs won't work under KDE. It's because there is a check for GNOME desktop at http://opengrok.libreoffice.org/xref/core/desktop/source/app/appinit.cxx#86. Removing that check solves the problem. Is it OK to just remove that check, or there could be some side effects which I'm not aware of?

Revision history for this message
In , Sbergman (sbergman) wrote :

(In reply to comment #41)
> @Stephan Bergmann: I found why builds with --enable-gnome-vfs won't work
> under KDE. It's because there is a check for GNOME desktop at
> http://opengrok.libreoffice.org/xref/core/desktop/source/app/appinit.cxx#86.
> Removing that check solves the problem. Is it OK to just remove that check,
> or there could be some side effects which I'm not aware of?

No idea whether it would make sense to use that GnomeVFSContentProvider on non-Gnome desktops, too. Maybe mmeeks knows?

Revision history for this message
In , Michael-meeks-1 (michael-meeks-1) wrote :

In general not using gnome-vfs at all is what makes most sense ;-)
gio - if anything - but surely KIO uses paths into a FUSE mount just like GNOME does - making that mostly pointless ?

Revision history for this message
In , Momonasmon (momonasmon) wrote :

(In reply to comment #43)
> but surely KIO uses paths into a FUSE mount just like GNOME does -
> making that mostly pointless ?
No, KIO doesn't deal with any kind of mount. It just downloads the file into a temp folder, and opens it from there. It may cause troubles as in Bug 39591.

The problem now is that starting with 4.1 the .desktop files contain 'X-KDE-Protocols' definition, which is the equivalent of 'X-GIO-NoFuse'. So when users double-click on a file we get 'smb://adderss/share/filename', and should deal with it ourselves. And because the official build uses gnome-vfs, it fails. So there are 3 solutions:

1. Make gnome-vfs work under KDE as suggested above.
2. Force gnome desktop in official build (by exporting OOO_FORCE_DESKTOP=gnome in startup script, or something similar). It won't hurt anyone, since we don't ship KDE4 integration anyway.
3. Remove 'X-KDE-Protocols' from .desktop files. (But it will bring back Bug 39591.)

Revision history for this message
In , Momonasmon (momonasmon) wrote :

(In reply to comment #44)
> 3. Remove 'X-KDE-Protocols' from .desktop files. (But it will bring back Bug
> 39591.)
Also it won't solve the problem for MATE desktop, which is not detected as GNOME (See http://opengrok.libreoffice.org/xref/core/vcl/unx/generic/desktopdetect/desktopdetector.cxx#369. BTW the code there is broken, since MATE doesn't define XDG_CURRENT_DESKTOP)

Revision history for this message
In , Grahha-8 (grahha-8) wrote :

Still an issue with Ubuntu 12.04.3 and LibreOffice 1:4.1.3~rc2-0ubuntu1~precise1~ppa1

Revision history for this message
Launchpad Janitor (janitor) wrote : Re: GUINT32/64_SWAP_LE_BE macros do not enclose val argument in parentheses

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in glib2.0 (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Iveand (iveand) wrote :

confirming the problem still exists in Ubuntu 12.04.3, with LO 4.1.3 PPA version (version 4.1.3~rc2-0ubuntu1~precise1~ppa1) as prior comment indicates. Workaround of:

sudo sed -i 's/X-GIO-NoFuse=true/#X-GIO-NoFuse=true/' /usr/share/applications/libreoffice-* as

as alluded to above does seem to help.

Revision history for this message
In , Iveand (iveand) wrote :

Update: attempting to open a .odt on a remote linux share using sftp (so not using samba) will result in the SAME ERROR. The .desktop sed hack does NOT solve the problem in this regard. So, from what I know there is no workaround for Ubuntu 12.04.3 to open .odf files on sftp shares.

Revision history for this message
In , Momonasmon (momonasmon) wrote :

*** Bug 73187 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Ritesh Khadgaray (khadgaray) wrote :

(In reply to comment #48)
> Update: attempting to open a .odt on a remote linux share using sftp (so not
> using samba) will result in the SAME ERROR. The .desktop sed hack does NOT
> solve the problem in this regard. So, from what I know there is no
> workaround for Ubuntu 12.04.3 to open .odf files on sftp shares.

Hi. This works fine with precise. Is there an lp for this ?

Revision history for this message
In , Bryan Berndt (bberndt) wrote :

(In reply to comment #36)
> (In reply to comment #35)
> > (In reply to comment #34)
> > > What problem exactly still exists?
> > @Stephan Bergmann: Bryan Berndt explained his problem at comment 19.
>
> Ah, right. So /if/ he doesn't have gnome-vfs2-smb package installed, his
> findings in comment 30 would be consistent with my findings in comment 20.
>
> Bryan, can you please clarify?

Sorry, been away for a while. And Just added myself to the CC list, so I can try to keep up.

Im now on Fedora 20, x64, and using Libre Office 4.1.4. problem still exists, as explained in comment 19. Though, the failure is MUCH faster, less than a second.

The fix in comment 15 still works, as well.

I use KDE, gnome-vfs2-smb is NOT installed.

Revision history for this message
In , Ritesh Khadgaray (khadgaray) wrote :

Hi

(In reply to comment #51)
> (In reply to comment #36)
> > (In reply to comment #35)
> > > (In reply to comment #34)
> > > > What problem exactly still exists?
> > > @Stephan Bergmann: Bryan Berndt explained his problem at comment 19.
> >
> > Ah, right. So /if/ he doesn't have gnome-vfs2-smb package installed, his
> > findings in comment 30 would be consistent with my findings in comment 20.
> >
> > Bryan, can you please clarify?
>
> Sorry, been away for a while. And Just added myself to the CC list, so I can
> try to keep up.
>
> Im now on Fedora 20, x64, and using Libre Office 4.1.4. problem still
> exists, as explained in comment 19. Though, the failure is MUCH faster, less
> than a second.
>
> The fix in comment 15 still works, as well.
>
> I use KDE, gnome-vfs2-smb is NOT installed.

works fine using lo 4.1.4 shipped with fc20. Would you provide the "ps aux" o/p , after trying to open the document ( without the c#15 workaround).

I personally prefer this (c#15). Is there a reason we do not do delegate this to gvfs/kio backend by default ?

__self:
http://techbase.kde.org/Projects/KioFuse
https://wiki.gnome.org/Projects/KioGioBridge

Revision history for this message
In , Bryan Berndt (bberndt) wrote :

Created attachment 93088
'ps aux' immediately after failed attempt to open an xls file from SMB share

'ps aux' immediately after failed attempt to open an xls file from SMB share

As requested.

I removed the comment in the .desktop file or Libreoffice Calc. (comment 15) Then tried to open an xls file from a SMB share, by doubleclicking on the icon in Dolphin. I see the Libreoffice logo for a second, and then nothing.

Revision history for this message
In , Iveand (iveand) wrote :

I have just confirmed this bug is NOT PRESENT for the following:

Client: Ubuntu 14.04
LibreOffice Version 4.1.3.2
Connection: smb:// from nautilus, so mounted to ~/.gvfs

Client: Ubuntu 12.04.3
LibreOffice Version: 4.1.4.2
Connection: cifs entry in /etc/fstab

I have just confirmed this bug IS STILL present for the following:

Client: Ubuntu 12.04.3
LibreOffice Version: 4.1.4.2
Connection: smb:// from nautilus, so mounted to ~/.gvfs

(the work-around from comment 15 above does still work, however)

Revision history for this message
In , Iveand (iveand) wrote :

Sorry I wasn't clear enough: I mean that in Ubuntu 14.04 this bug seems SOLVED. The workaround of comment 15 is NOT REQUIRED.

Revision history for this message
In , Bryan Berndt (bberndt) wrote :

Just tried the latest LibreOffice 4.2.0.4 from the main libreoffice site.

Problem still exists (comment 19), and is still fixed with comment 15.

Revision history for this message
In , Iveand (iveand) wrote :

Bryan,

What OS are you running? Again from my testing I see the problem SOLVED in Ubuntu 14.04, but still present in Ubuntu 12.04. It is some combination of LibreOffice 4.1 (+) in combination with *something* present in Ubuntu 12.04 that is not in Ubuntu 14.04. I am not sure about interim releases. I can't speak to Windows or OSX.

Revision history for this message
In , Iveand (iveand) wrote :

Bryan, sorry I missed the earlier comment where you indicate you are using Fedora 20, KDE desktop.

To clarify, my testing results above are with Gnome-Shell / Unity / Cinnamon desktops, and I have not tested with KDE.

Revision history for this message
In , Momonasmon (momonasmon) wrote :

@iveand, Bryan Berndt: Too bad you didn't read carefully the whole thread. Anyway, here is a summary:

- The repair dialog is an Ubuntu 12.04 specific bug, related to glib package. See https://launchpad.net/bugs/1214352

The problem with KDE is another problem, mostly related to missing packages:

- For the build from distro repositories, you should also install 'gvfs' and 'gvfs-smb' packages for Fedora, or 'gvfs', 'gvfs-backends', 'libreoffice-gnome' for Ubuntu.

- For the build from libreoffice.org, you should also install 'gnome-vfs2', 'gnome-vfs2-smb', 'ORBit2' for Fedora, or 'libgnomevfs2-0', 'libgnomevfs2-extra', 'liborbit2'. You should also export 'OOO_FORCE_DESKTOP=gnome', otherwise it won't work.

Revision history for this message
In , gegon69 (gegon69) wrote :

I have the same problem with version 4.1.5.3
mainly libreoffice files .odt .ods .odp

My SO: Ubuntu 12.04

Revision history for this message
In , Renato S. Yamane (renatoyamane) wrote :

Same problem.
Kubuntu 13.10
Libreoffice 4.1.5 (PPA)

Revision history for this message
In , Koen Roggemans (koen-roggemans) wrote :

Same problem on Ubuntu 12.04/64 with LibreOffice 4.2.1.1 (ppa)

Revision history for this message
In , Venco (venco) wrote :

Same problem on Ubuntu 12.04/64 with LibreOffice 4.2.1.1 (download from LO site)

Revision history for this message
In , sophie (gautier-sophie) wrote :

*** Bug 75055 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

*** Bug 58236 has been marked as a duplicate of this bug. ***

Revision history for this message
Andreas Heinlein (aheinlein) wrote : Re: GUINT32/64_SWAP_LE_BE macros do not enclose val argument in parentheses

I can finally confirm that the patch from gnome bug 695925 above actually fixes the problem with Ubuntu 12.04.4 and LO 4.2.4 from the PPA. I have applied the patch to the glib source package and rebuilt and installed it, and then rebuilt libreoffice, gtk+3.0, dbus-glib and gvfs against the patched glib.

This now finally seems to work.

Unfortunately, this whole rebuilding is a PITA and takes a long time, especially for libreoffice. I'm not sure if everything is needed, but anyway I have a bad feeling with this. Now there are still lots of packages on my system which were built against the unpatched glib, so I really think this needs to be fixed in Ubuntu 12.04 with *ALL* packages which depend on glib being rebuilt against a patched version.

How can we achieve this?

Revision history for this message
In , Bryan Berndt (bberndt) wrote :

(In reply to comment #59)
> @iveand, Bryan Berndt: Too bad you didn't read carefully the whole thread.
> Anyway, here is a summary:
>
> - The repair dialog is an Ubuntu 12.04 specific bug, related to glib
> package. See https://launchpad.net/bugs/1214352
>
> The problem with KDE is another problem, mostly related to missing packages:
>
> - For the build from distro repositories, you should also install 'gvfs' and
> 'gvfs-smb' packages for Fedora, or 'gvfs', 'gvfs-backends',
> 'libreoffice-gnome' for Ubuntu.
>
> - For the build from libreoffice.org, you should also install 'gnome-vfs2',
> 'gnome-vfs2-smb', 'ORBit2' for Fedora, or 'libgnomevfs2-0',
> 'libgnomevfs2-extra', 'liborbit2'. You should also export
> 'OOO_FORCE_DESKTOP=gnome', otherwise it won't work.

Upgraded to LO 4.3 with the rpm's from the LO web site. (rpm -U.....) Problem is recreated, as with every upgrade so far (comment 15). Most of the packages you mention were already installed. Then added the export to a KDE environment script: http://forums.opensuse.org/showthread.php/478619-LibreOffice-looks-ugly-in-SUSE-KDE ; vairation of post #3.

I log into the SMB file server, and then when I double click the file I want to opem it asks to log in again, I assume that this is GVFS asking that. Once I do, then file opens.

Revision history for this message
In , Momonasmon (momonasmon) wrote :

Again: This one doesn't need bibisecting.

Revision history for this message
In , Björn Michaelsen (bjoern-michaelsen) wrote :

Scoping this bug clearly only on the missing deps for KDE thanks to the excellent summary in comment 59. Everything else is fdo#49776. Please dont scope-creep this bug, thanks.

Revision history for this message
In , Sbergman (sbergman) wrote :

(In reply to Björn Michaelsen from comment #68)
> Scoping this bug clearly only on the missing deps for KDE thanks to the
> excellent summary in comment 59.

...which has become moot with <http://cgit.freedesktop.org/libreoffice/core/commit/?id=f9f9aa9873c5851da86d33ca75e937ac022206a3> "Remove smb from X-KDE-Protocols lines," see <http://lists.freedesktop.org/archives/libreoffice/2014-October/063904.html> "Re: X-KDE-Protocols=...,smb,..."

Changed in df-libreoffice:
status: Confirmed → Fix Released
Revision history for this message
Norbert (nrbrtx) wrote : Re: GUINT32/64_SWAP_LE_BE macros do not enclose val argument in parentheses

Dear Adam Conrad !

It seems that the following problems in LibreOffice:
https://bugs.documentfoundation.org/show_bug.cgi?id=67527

are caused by libglib2.0-0 package in Ubuntu 12.04.5.
Please apply this patch (https://git.gnome.org/browse/glib/commit/?id=255c65f83c1515a7e3fc4609b36e72acc08a79e4) on distro-wide level.

Ubuntu 12.04.5 is LTS, users may not want to switch to the next LTS.
But they need normal openning of office files from network shares with LibreOffice.

Norbert (nrbrtx)
tags: added: apport-collected precise third-party-packages
Revision history for this message
Norbert (nrbrtx) wrote : apport information

ApportVersion: 2.0.1-0ubuntu17.8
Architecture: amd64
DistroRelease: Ubuntu 12.04
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100429)
MarkForUpload: True
NonfreeKernelModules: nvidia
Package: gvfs 1.12.1-0ubuntu1.2
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 3.13.0-46.75~precise1-generic 3.13.11-ckt15
Tags: precise
Uname: Linux 3.13.0-46-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm admin cdrom dialout disk fuse libvirtd lp lpadmin plugdev sambashare vboxusers

Revision history for this message
Norbert (nrbrtx) wrote : Dependencies.txt

apport information

Revision history for this message
Norbert (nrbrtx) wrote : ProcEnviron.txt

apport information

tags: removed: third-party-packages
Revision history for this message
Dave Kokandy (drkokandy) wrote : Re: GUINT32/64_SWAP_LE_BE macros do not enclose val argument in parentheses

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in Trusty Tahr, Utopic Unicorn, and the development release, Vivid Vervet. If upgrading is an option, please know that upgrading to Trusty (Ubuntu 14.04 - also an LTS) will fix this issue for you.

The fix for this bug appears to have been released in GLib 2.35.9, according to this: http://upstream.rosalinux.ru/changelogs/glib/2.40.0/changelog.html - Newer versions of glib are available in official repositories of Trusty, Utopic, and Vivid.

If you would like to request a fix for the bug in previous versions of Ubuntu, please perform as much as possible of the SRU Procedure [1] to bring the need to a developer's attention. Please be advised, it may not be possible to push an update a component like this due to regression potential.

[1]: https://wiki.ubuntu.com/StableReleaseUpdates#Procedure

The Stable Release Update Procedure is the proper method to bring these requests to developers. Please refrain from posting complaints that bugs are not fixed to the developer mailing lists. Please read our suggested bug reporting etiquette [2].

[2]: https://help.ubuntu.com/community/ReportingBugs#Bug_reporting_etiquette

Changed in glib2.0 (Ubuntu):
status: Confirmed → Fix Released
Norbert (nrbrtx)
summary: - GUINT32/64_SWAP_LE_BE macros do not enclose val argument in parentheses
+ [SRU] GUINT32/64_SWAP_LE_BE macros do not enclose val argument in
+ parentheses
description: updated
description: updated
Norbert (nrbrtx)
tags: added: ppa
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hi Norbert, did you try to download glib 2.24.1-0ubuntu2 and try to apply the patch?

I tried, but the file is completely different, so you need to ask somebody to rebase the patch if you really want the bug fixed in lucid.

Revision history for this message
Norbert (nrbrtx) wrote :

Dear LocutusOfBorg (costamagnagianfranco)!

I'm on Ubuntu 12.04.5 (Precise Pangolin) LTS, not on 10.04 (Lucid Lynx) LTS.

I tried to apply patch locally on my 12.04.5, but got into dependency problems.

Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

@ Norbert

I'm unsuscribing the Ubuntu Bug Control team from this bug. If you think there's a good reason for the team to be subscribed, please email me.

Thanks.

Revision history for this message
Norbert (nrbrtx) wrote : SRU request for lp#1214352

Dear Ubuntu Bug Control team!

There is a bug in Glib in Ubuntu 12.04.5 - bug 1214352
<https://bugs.launchpad.net/bugs/1214352>.

If it possible please apply an SRU for it.

With best regards,
Ubuntu user,
Norbert.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :
Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

thanks Norbert, I missed that :)

https://launchpad.net/~costamagnagianfranco/+archive/ubuntu/locutusofborg-ppa

package with the fix above uploaded here, can you please test it?

Revision history for this message
Norbert (nrbrtx) wrote :

Dear LocutusOfBorg!
Thank you for your patched packages! This Glib fix is very important, it should be SRUed.

I tested your packages with libreoffice packages from PPA (4.4.1~rc2-0ubuntu1~precise1, 4.3.6~rc2-0ubuntu1~precise1).
But what is interesting - the bug is not fixed.
I can't understand why - you rebuild package, *.so files are new, they would be dynamically linked to other applications.

Is is possible to rebuild main "rdepends" too, as mentioned in comment 70 ( https://bugs.launchpad.net/ubuntu/+source/glib2.0/+bug/1214352/comments/70 )?
Dear Andreas Heinlein, could you please consult us on the method?
Björn Michaelsen have recommended to rebuild all dependencies too ( https://bugs.documentfoundation.org/show_bug.cgi?id=67527#c71 ).

Revision history for this message
Adam Conrad (adconrad) wrote :

We are not going to be rebuilding all of glib's rdeps for this in an SRU. That's insanity. I'm going to look at this later to see if there's anything we can do that looks like a sensible and targeted fix, but it does look like this is just a poor SRU candidate, due to the regression potential being worse than the fix, and people who really care deeply should perhaps just upgrade to 14.04.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hi Adam, yes, I missed the rdeps thing.

Deleting from my ppa and unsubscribing sponsors.

Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote :

Just quickly: Of course its insane to rebuild all rdeps. However, this is what would be the only way to fix this properly.

A. Heinlein in comment 70 only rebuild the packages between glib and LibreOffice, which fixes the immediate problem, but might cause unforseeable and hard to debug/triage problems with all the other packages depending on glib that were _not_ rebuild. As such it is not recommendable in an production environment.

So: upgrading to 14.04 still is the recommended action.

@Adam Conrad: Possibly this bug in 12.04 should have a target for 12.04 and be "Wont Fix" there, just to make this more explicit.

Revision history for this message
Norbert (nrbrtx) wrote :

Thank you, guys!
I understand that doing massive rebuild may cause unexpected regressions.
Please let me know if you find other reasonable method.

As temporary solution I downgraded LibreOffice to 3.5.7.2 from precise-updates.
But what is interesting - I can't open files from Samba share (r/w of course, nautilus-share or smb.conf).
I ran into other bug ("Document in Use" = bug 1430531 ).
It affects LibreOffice 3.5.7.2 and more modern versions from PPA. Modern versions of Ubuntu (as client) are affected too.
I can't understand why this standard functionality does not work as expected.

Revision history for this message
Andreas Heinlein (aheinlein) wrote :

I fully agree that rebuilding only a few packages is no suitable general solution. But so is the recommendation to upgrade to 14.04.

There is a reason that corporate environments do not upgrade so often, and even 2 years is a very short time in this context. I have only recently upgraded a few smaller networks from Windows XP to Windows 7, and I am pretty sure these will stick with it until 2020. Thats why we highly appreciated the announcement that Ubuntu 12.04 would get 5 years of LTS support, so we decided to skip 14.04 entirely and target 16.04 as the next upgrade.

We cannot change that plan just because of this bug. It took us several hundreds of hours of manpower to evaluate and test the upgrade from 10.04 to 12.04, and it took the complete lifespan of 10.04 until it was done. We worked out around 50 fixes and workarounds for all sorts of weird bugs and shortcomings which are still not fixed, and I cannot count how often I have read that this and that bug will not be fixed in the current version, despite it being an LTS release. Just two recent examples, #949468 and #886327. They're both not as critical as this one, but still annoying.

We are a non-profit and as such cannot afford paid support like RHEL or SuSE Enterprise. We decided to try and contribute back instead, wherever we can. I still feel comfortable with that. But sometimes I get frustrated because it seems that some people behind Ubuntu think a shiny new tablet running Ubuntu is more important than people being able to get their work done.

I would be happy to help testing if you decided to go the hard way and rebuild the rdeps.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Hi Andreas, I guess you can (at your own risk) create a ppa, upload the fix and upload the rdeps there.

you will fix your problem, without affecting the whole distro.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gvfs (Ubuntu):
status: New → Confirmed
Changed in libreoffice (Ubuntu):
status: New → Confirmed
Revision history for this message
Norbert (nrbrtx) wrote :

Bug is confirmed with the newest LibreOffice 5.0 (1:5.0.0~rc5-0ubuntu1~precise1).

Could anybody suggest a full list of packages to be rebuilt for fixing this bug on Precise?

Revision history for this message
Björn Michaelsen (bjoern-michaelsen) wrote :

Marking this as "Fix released" for glib and LibreOffice in Ubuntu as there are Ubuntu releases where this is fixed.

A SRU for Ubuntu 12.04 would need a series target. But that is theoretical as the amount of rebuilds needed for that are way too high risk and it will get closed WontFix anyway.

Changed in gvfs (Ubuntu):
status: Confirmed → Fix Released
Changed in libreoffice (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.