After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746898 - Metacity debug output cuts off window title
Metacity debug output cuts off window title
Status: RESOLVED FIXED
Product: metacity
Classification: Other
Component: general
trunk
Other Linux
: Normal normal
: ---
Assigned To: Metacity maintainers list
Metacity maintainers list
Depends on:
Blocks:
 
 
Reported: 2015-03-27 15:25 UTC by Sebastian
Modified: 2015-04-03 20:15 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian 2015-03-27 15:25:06 UTC
When a window sends buggy timestamps metacity outputs debug messages. The debug messages contain the title of the window to identify which window has problems. But unfortunately it is hardcoded that the length of the title is always 10. This can be found in: metacity/src/core/window-props.c:653

 652   /* strndup is a hack since GNU libc has broken %.10s */
 653   str = g_strndup (window->title, 10);

Current debug output:

    Window manager warning: 0x1600018 (Bottom Exp) appears to be one of the offending windows with a timestamp of 39887360.  Working around...

Expected debug output:

    Window manager warning: 0x1600018 (Bottom Expanded Edge Panel) appears to be one of the offending windows with a timestamp of 39887360.  Working around...

I suggest to increase the length of the title either to `strlen(title)` or a more sensibel length such as 255:

-str = g_strndup (window->title, 10);
+str = g_strndup (window->title, strlen(window->title));

This was introduced by commit 9feebc05c799190fa5ff699dd3f358b2d6c95eee a long time ago, I dont know why that was choosen to be so short in the first place, but it does not seem to have technical reasons.