Bug 94829 - LibreOffice splash screen sets invalid WM_SIZE_HINTS
Summary: LibreOffice splash screen sets invalid WM_SIZE_HINTS
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
5.0.2.2 release
Hardware: All Linux (All)
: medium minor
Assignee: Julien Nabet
URL:
Whiteboard: target:5.1.0 target:5.0.4
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-06 16:05 UTC by Tomasz Nitecki
Modified: 2016-10-25 19:20 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Splash screen on i3 wm. (156.93 KB, image/jpeg)
2015-10-06 16:05 UTC, Tomasz Nitecki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Nitecki 2015-10-06 16:05:53 UTC
Created attachment 119358 [details]
Splash screen on i3 wm.

It appears that LibreOffice splash screen sets invalid WM_SIZE_HINTS. This results in a broken splash screen - multiplicated splash windows cover the whole desktop on my i3 window manager (see attached screenshot).

Here is the xprop ouptut (splash window):
WM_STATE(WM_STATE):
        window state: Normal
        icon window: 0x0
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0xf, 0x2, 0x0, 0x0, 0x41
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_SPLASH
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        program specified location: 1749947648, 32749
        program specified size: 885613960 by 32766
        program specified minimum size: 661 by 169
        program specified maximum size: 661 by 169
WM_ICON_NAME(STRING) = "icon"
WM_NAME(STRING) = "LibreOffice"

This bug was originally reported against i3 wm at [1]

[1] https://github.com/i3/i3/issues/1970
Comment 1 Julien Nabet 2015-10-06 20:33:10 UTC
Here are the locations where XSizeHints is used:
http://opengrok.libreoffice.org/search?q=XSizeHints&project=core&defs=&refs=&path=&hist=

Just a guess but I wonder if the pb could be here:
http://opengrok.libreoffice.org/xref/core/desktop/unx/source/splashx.c#483

Indeed, in all the other places (which are in C++), initialization of the XSizeHints element is done with some calls of method (XAllocSizeHints, XGetWMNormalHints, ...)

I found this link indicating how to initialize XSizeHints in C:
http://www.unix-manuals.com/tutorials/xlib/xlib.html

So I gave a try with this patch waiting for review:
https://gerrit.libreoffice.org/#/c/19219/1
Comment 2 Commit Notification 2015-10-07 12:42:41 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a614568c4356fe37ba132972e6f3649d606e2c9a

tdf#94829: Splash screen sets invalid XSizeHints

It will be available in 5.1.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 3 Samuel Mehrbrodt (allotropia) 2015-10-07 12:44:19 UTC
Hi Tomasz,
would you please test the fix (daily build or compile yourself) and report whether this is fixed for you? It can then be backported to 5.0 branch.
Comment 4 Tomasz Nitecki 2015-10-08 11:22:44 UTC
According to [1], there was a successful build that incorporated Juliens' fix [2]. However, I'm unable to locate it at [3] - the newest one that is available (LibreOfficeDev 5.1.0.0.alpha1 955c8f4c7b6038aa802e33074623b8eab0494d0c) [4] probably doesn't include the fix (and the bug is still there).

Am I missing something or should I simply wait?

[1] http://tinderbox.libreoffice.org/MASTER/status.html
[2] http://cgit.freedesktop.org/libreoffice/core/log/?id=99b935ff7dd069f2a0aad5054d07bc6f71411d84
[3] http://dev-builds.libreoffice.org/
[4] http://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@70-TDF-dbg/current/master_dbg~2015-10-07_08.03.41_LibreOfficeDev_5.1.0.0.alpha1_Linux_x86-64_archive.tar.gz
Comment 5 Julien Nabet 2015-10-08 12:00:28 UTC
(In reply to Tomasz Nitecki from comment #4)
> According to [1], there was a successful build that incorporated Juliens'
> fix [2]. However, I'm unable to locate it at [3] - the newest one that is
> available (LibreOfficeDev 5.1.0.0.alpha1
> 955c8f4c7b6038aa802e33074623b8eab0494d0c) [4] probably doesn't include the
> fix (and the bug is still there).
> 
> Am I missing something or should I simply wait?
> 
> [1] http://tinderbox.libreoffice.org/MASTER/status.html
> [2]
> http://cgit.freedesktop.org/libreoffice/core/log/
> ?id=99b935ff7dd069f2a0aad5054d07bc6f71411d84
> [3] http://dev-builds.libreoffice.org/
> [4]
> http://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@70-TDF-
> dbg/current/master_dbg~2015-10-07_08.03.41_LibreOfficeDev_5.1.0.0.
> alpha1_Linux_x86-64_archive.tar.gz
[1] I'm not sure but it seems more a kind of "internal build" to check if everything is ok rather than a daily build made public.

A patch is included in daily build after 24/48hours max. So just wait the next build and check if it includes the patch before testing.
Comment 6 Tomasz Nitecki 2015-10-08 12:20:20 UTC
(In reply to Julien Nabet from comment #5)
> A patch is included in daily build after 24/48hours max. So just wait the
> next build and check if it includes the patch before testing.

Ok, I believe that I simply misread the table at [1]. The manual [2] states that: "If the tinderbox script is setup as such, it will attempt the upload the first successful build of the day (that is after 00:00 UTC)". I simply didn't notice that there was an earlier, successful build that day (that is the available one). I'll wait for a new one then and report back the results here.

And thanks for the quick fix Julien!

[1] http://tinderbox.libreoffice.org/MASTER/status.html
[2] https://wiki.documentfoundation.org/QA/Testing_Daily_Builds
Comment 7 Julien Nabet 2015-10-08 14:23:24 UTC
(In reply to Tomasz Nitecki from comment #6)
> (In reply to Julien Nabet from comment #5)
> > A patch is included in daily build after 24/48hours max. So just wait the
> > next build and check if it includes the patch before testing.
> 
> Ok, I believe that I simply misread the table at [1]. The manual [2] states
> that: "If the tinderbox script is setup as such, it will attempt the upload
> the first successful build of the day (that is after 00:00 UTC)". I simply
> didn't notice that there was an earlier, successful build that day (that is
> the available one). I'll wait for a new one then and report back the results
> here.
> 
> And thanks for the quick fix Julien!
> 
> [1] http://tinderbox.libreoffice.org/MASTER/status.html
> [2] https://wiki.documentfoundation.org/QA/Testing_Daily_Builds

As I indicated on gerrit, I'm not sure the patch fixed the pb since I don't know how to test it.
That's why Samuel suggested you to test a daily build which includes the fix.
Comment 8 Tomasz Nitecki 2015-10-09 10:29:04 UTC
(In reply to Julien Nabet from comment #7)
> As I indicated on gerrit, I'm not sure the patch fixed the pb since I don't
> know how to test it.
> That's why Samuel suggested you to test a daily build which includes the fix.

And that's why I wanted to test it asap. I misread the docs and tried a build that didn't contain the fix - my bad, sorry for the confusion.

Anyway, I have tested the newest dev build (LibreOfficeDev 5.1.0.0.alpha1 7fccad27c97d256c0def7b51e9947f13d5c9c977) [1] and I can confirm that the issue is really fixed.

xprop log:
WM_STATE(WM_STATE):
		window state: Normal
		icon window: 0x0
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0xf, 0x2, 0x0, 0x0, 0x3b4540e0
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_SPLASH
WM_NORMAL_HINTS(WM_SIZE_HINTS):
		program specified location: 0, 0
		program specified size: 661 by 169
		program specified minimum size: 661 by 169
		program specified maximum size: 661 by 169
WM_ICON_NAME(STRING) = "icon"
WM_NAME(STRING) = "LibreOffice"


Thanks again Julien :)

[1] http://dev-builds.libreoffice.org/daily/master/Linux-rpm_deb-x86_64@70-TDF-dbg/current/master_dbg~2015-10-08_23.09.34_LibreOfficeDev_5.1.0.0.alpha1_Linux_x86-64_archive.tar.gz
Comment 9 Julien Nabet 2015-10-09 11:43:58 UTC
Thank you Tomasz for your feedback, I cherry-picked the patch for 5.0 branch, see https://gerrit.libreoffice.org/#/c/19273/
Comment 10 Commit Notification 2015-10-09 13:51:23 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=f019692639bac82fd17ef8b990cfbe6b5fefdf49&h=libreoffice-5-0

tdf#94829: Splash screen sets invalid XSizeHints

It will be available in 5.0.4.

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

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