Bug 1284728 - matchbox-window crash in libmb.so.1.0.9
matchbox-window crash in libmb.so.1.0.9
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: matchbox-window-manager (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Petr Lautrbach
Karel Srot
Depends On:
  Show dependency treegraph
Reported: 2015-11-23 22:06 EST by Marc Sauton
Modified: 2016-11-03 22:49 EDT (History)
3 users (show)

See Also:
Fixed In Version: matchbox-window-manager-1.2-16.1.20070628svn.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-11-03 22:49:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Marc Sauton 2015-11-23 22:06:45 EST
Description of problem:

trying to get a working lightweight window manager on RHEL 7.2
as I cannot find fluxbox nor blackbox nor i3 for RHEL 7.2 and in EPEL 7, I tried matchbox-window-manager, but it systematically crashes shortly after a vncviewer launch, when clicking in the top bar.
This is a KVM guest.

Version-Release number of selected component (if applicable):

Red Hat Enterprise Linux Server release 7.2 (Maipo)
Linux ipaserver1.example.com 3.10.0-327.el7.x86_64 #1 SMP Thu Oct 29 17:29:29 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux

How reproducible:

Steps to Reproduce:

1. install RHEL 7.2 from first release, from released ISO file
2. yum install matchbox-window-manager
3. optional: edit /etc/X11/xinit/Xclients to add /usr/bin/matchbox-window-manager instead of /usr/bin/twm
3. xinit via a vncserver command
4. start a vncviewer session
5. optional: do if step 3 was not done: run matchbox-window-manager either from already launched xterm
6. click on top bar of the activated window, in my case it was Firefox

Actual results:

Floating point exception
Nov 23 11:44:00 ipaserver1 kernel: traps: matchbox-window[28700] trap divide error ip:7f60fb9ddcfb sp:7ffc71fa8bf0 error:0 in libmb.so.1.0.9[7f60fb9ce000+17000]

Expected results:

Additional info:
Comment 3 Petr Lautrbach 2015-12-18 11:44:00 EST
While this is a bug in libmb which should not try to compute new proportions of a pixmap image when one of them is 0, matchbox-window-manager could detect if img data is correct and use the generic icon when there's 0 height or width:

--- a/src/mbtheme.c
+++ b/src/mbtheme.c
@@ -152,10 +152,14 @@ void theme_frame_icon_paint(MBTheme *t, Client *c,
+  if (img != NULL && (img->height == 0 || img->width == 0)) {
+    mb_pixbuf_img_free(t->wm->pb, img);
+    img = NULL;
+  }
   if( img == NULL)
     img = mb_pixbuf_img_clone(t->wm->pb, c->wm->img_generic_icon);
-  if (img->width != 16 || img->height != 16) 
+  if (img->width != 16 || img->height != 16)
       MBPixbufImage *tmp_img;
       tmp_img = mb_pixbuf_img_scale(t->wm->pb, img, 16, 16); 

A scratch build with this patch can be found at http://brewweb.devel.redhat.com/brew/taskinfo?taskID=10252500
Comment 4 Milos Malik 2016-04-13 03:45:13 EDT
SELinux sandbox for X windows uses this window manager. I'm going to test it, if nobody complains.
Comment 11 errata-xmlrpc 2016-11-03 22:49:15 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.