System: Ubuntu Hoary, openbox 3.2 from the ubuntu packages
Steps to reproduce:
* Compile anjuta 2.0.0 from anjuta.sf.net.
* Run it
* Maximize the window, and witness openbox crash (signal 8).
Although anjuta 2.0.0 is considered by its developpers to be alpha quality and
not ready for production use, I believe ob shouldnt crash here. If anjuta is
doing something really really wrong, it should probably just ignore it, and emit
some warning, not crash.
I can reproduce the crash everytime I maximize the main anjuta window, and this
does not happen with metacity. I have never seen this before with any other
application, and couldn't find any open nor closed bug about this kind of problem.
I'll try to reproduce this bug on different setups, and attach a coredump later.
I succesfully reproduced the crash on a gentoo box with openbox 3.3rc a few
minutes ago. This is worse than I thought, because a simple window resize
triggered it.
I'm going to recompile openbox with debugging symbols on this box so I can
provide a meaningful stacktrace.
Here is the backtrace and some additional info from gdb:
(gdb) run
Starting program: /home/mat/perso/openbox-3.2/openbox/.libs/openbox
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 16656)]
Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 16384 (LWP 16656)]
client_configure_full (self=0x81b1728, anchor=OB_CORNER_TOPLEFT, x=12, y=31,
w=0, h=391, user=1, final=0, force_reply=0) at client.c:2043
2043 w /= self->size_inc.width;
(gdb) bt
#0 client_configure_full (self=0x81b1728, anchor=OB_CORNER_TOPLEFT, x=12,
y=31, w=0, h=391, user=1, final=0, force_reply=0) at client.c:2043
#1 0x08068ba2 in do_resize (resist=0) at moveresize.c:228
#2 0x08068d5a in moveresize_event (e=0x278) at moveresize.c:305
#3 0x0805eef9 in event_process (ec=0x0, data=0x0) at event.c:526
#4 0x080652bf in ob_main_loop_run (loop=0x8083230) at mainloop.c:313
#5 0x08069ade in main (argc=1, argv=0xafffeb44) at openbox.c:274
(gdb) p self->size_inc
$1 = {width = 0, height = 0}
(gdb) p w
$2 = 0
(gdb)
does this patch fix the problem? (against cvs, but you should be able to write it in manually)
Index: openbox/client.c
===================================================================
RCS file: /cvs/cvsroot/openbox/openbox/client.c,v
retrieving revision 1.358
diff -p -u -d -r1.358 client.c
--- openbox/client.c 2 Aug 2006 06:07:12 -0000 1.358
+++ openbox/client.c 2 Aug 2006 14:24:50 -0000
@@ -1234,7 +1234,7 @@ void client_update_normal_hints(ObClient
if (size.flags & PBaseSize)
SIZE_SET(self->base_size, size.base_width, size.base_height);
- if (size.flags & PResizeInc)
+ if (size.flags & PResizeInc && size.width_inc && size_height_inc)
SIZE_SET(self->size_inc, size.width_inc, size.height_inc);
}
}
Here is the backtrace and some additional info from gdb: (gdb) run Starting program: /home/mat/perso/openbox-3.2/openbox/.libs/openbox [Thread debugging using libthread_db enabled] [New Thread 16384 (LWP 16656)] Program received signal SIGFPE, Arithmetic exception. [Switching to Thread 16384 (LWP 16656)] client_configure_full (self=0x81b1728, anchor=OB_CORNER_TOPLEFT, x=12, y=31, w=0, h=391, user=1, final=0, force_reply=0) at client.c:2043 2043 w /= self->size_inc.width; (gdb) bt #0 client_configure_full (self=0x81b1728, anchor=OB_CORNER_TOPLEFT, x=12, y=31, w=0, h=391, user=1, final=0, force_reply=0) at client.c:2043 #1 0x08068ba2 in do_resize (resist=0) at moveresize.c:228 #2 0x08068d5a in moveresize_event (e=0x278) at moveresize.c:305 #3 0x0805eef9 in event_process (ec=0x0, data=0x0) at event.c:526 #4 0x080652bf in ob_main_loop_run (loop=0x8083230) at mainloop.c:313 #5 0x08069ade in main (argc=1, argv=0xafffeb44) at openbox.c:274 (gdb) p self->size_inc $1 = {width = 0, height = 0} (gdb) p w $2 = 0 (gdb)does this patch fix the problem? (against cvs, but you should be able to write it in manually) Index: openbox/client.c =================================================================== RCS file: /cvs/cvsroot/openbox/openbox/client.c,v retrieving revision 1.358 diff -p -u -d -r1.358 client.c --- openbox/client.c 2 Aug 2006 06:07:12 -0000 1.358 +++ openbox/client.c 2 Aug 2006 14:24:50 -0000 @@ -1234,7 +1234,7 @@ void client_update_normal_hints(ObClient if (size.flags & PBaseSize) SIZE_SET(self->base_size, size.base_width, size.base_height); - if (size.flags & PResizeInc) + if (size.flags & PResizeInc && size.width_inc && size_height_inc) SIZE_SET(self->size_inc, size.width_inc, size.height_inc); } }