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 600176 - Murrine engine sometimes loops on murrine_draw_progressbar_fill
Murrine engine sometimes loops on murrine_draw_progressbar_fill
Status: RESOLVED FIXED
Product: murrine
Classification: Other
Component: general
0.90.x
Other Linux
: Normal critical
: ---
Assigned To: murrine-maint
Depends on:
Blocks:
 
 
Reported: 2009-10-30 22:33 UTC by C de-Avillez
Modified: 2009-11-05 15:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
add assertion for height and width (1.02 KB, patch)
2009-10-30 22:41 UTC, C de-Avillez
none Details | Review
same approach for clearlooks. (1.14 KB, patch)
2009-10-31 00:24 UTC, Alexander Sack
none Details | Review

Description C de-Avillez 2009-10-30 22:33:17 UTC
Original Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/460710

There is no check for height or width == 0 so -- if called this way -- an infinite loop results.


  • #0 *INT_cairo_matrix_transform_point
    at /build/buildd/cairo-1.8.8/src/cairo-matrix.c line 359
  • #1 *INT_cairo_line_to
    at /build/buildd/cairo-1.8.8/src/cairo.c line 1443
  • #2 murrine_draw_progressbar_fill
    at ./src/murrine_draw.c line 644
  • #3 murrine_style_draw_box
    at ./src/murrine_style.c line 1025
  • #4 IA__gtk_paint_box
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkstyle.c line 6090
  • #5 gtk_cell_renderer_progress_render
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkcellrendererprogress.c line 600
  • #6 IA__gtk_cell_renderer_render
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkcellrenderer.c line 578
  • #7 gtk_icon_view_paint_item
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkiconview.c line 3222
  • #8 gtk_icon_view_expose
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkiconview.c line 1574
  • #9 _gtk_marshal_BOOLEAN__BOXED
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmarshalers.c line 84
  • #10 g_type_class_meta_marshal
    at /build/buildd/glib2.0-2.22.2/gobject/gclosure.c line 878
  • #11 IA__g_closure_invoke
    at /build/buildd/glib2.0-2.22.2/gobject/gclosure.c line 767
  • #12 signal_emit_unlocked_R
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3285
  • #13 IA__g_signal_emit_valist
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 2990
  • #14 IA__g_signal_emit
    at /build/buildd/glib2.0-2.22.2/gobject/gsignal.c line 3037
  • #15 gtk_widget_event_internal
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkwidget.c line 4767
  • #16 IA__gtk_main_do_event
    at /build/buildd/gtk+2.0-2.18.3/gtk/gtkmain.c line 1571
  • #17 _gdk_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5061
  • #18 _gdk_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5034
  • #19 _gdk_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5034
  • #20 _gdk_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5034
  • #21 _gdk_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5034
  • #22 _gdk_windowing_window_process_updates_recurse
    at /build/buildd/gtk+2.0-2.18.3/gdk/x11/gdkwindow-x11.c line 5566
  • #23 gdk_window_process_updates_internal
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5220
  • #24 IA__gdk_window_process_all_updates
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 5328
  • #25 gdk_window_update_idle
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdkwindow.c line 4954
  • #26 gdk_threads_dispatch
    at /build/buildd/gtk+2.0-2.18.3/gdk/gdk.c line 506
  • #27 g_idle_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 4065
  • #28 g_main_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 1960
  • #29 IA__g_main_context_dispatch
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2513
  • #30 g_main_context_iterate
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2591
  • #31 IA__g_main_loop_run
    at /build/buildd/glib2.0-2.22.2/glib/gmain.c line 2799
  • #32 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #33 main
    at main.c line 732

Comment 1 C de-Avillez 2009-10-30 22:34:39 UTC
A patch has been proposed on the Ubuntu bug, and I will forward it as soon as it is verified to work.
Comment 2 C de-Avillez 2009-10-30 22:41:10 UTC
Created attachment 146603 [details] [review]
add assertion for height and width

proposed patch. This, of course, does not solve the basic problem (width == 0, on the Ubuntu bug), but allows the system to survive.

Without this patch the system runs out of memory very fast.
Comment 3 Andrea Cimitan 2009-10-30 23:05:11 UTC
Could you reproduce the bug with clearlooks?
Comment 4 Michael Laß 2009-10-30 23:11:45 UTC
I can reproduce this with clearlooks under Ubuntu 9.10 and Arch Linux.
Comment 5 C de-Avillez 2009-10-30 23:12:42 UTC
No. I am actually unable to reproduce it with either Clearlooks, or Human, or
even Murrine. So... I still do not know what causes this.
Comment 6 Andrea Cimitan 2009-10-30 23:23:45 UTC
stroke_width is height*2.0, so if height is = 0.0, then it enters the loop and doesn't exit.
Why on earth we are drawing a progressbar with height = 0?
Comment 7 Alexander Sack 2009-10-31 00:11:03 UTC
(In reply to comment #6)
> stroke_width is height*2.0, so if height is = 0.0, then it enters the loop and
> doesn't exit.
> Why on earth we are drawing a progressbar with height = 0?

yes, that's a different bug somewhere in evolution (or gtk) ... but murrine definitely shouldn't go in infinite loop if that happen as height = 0 is strictly speaking a valid height. thanks for committing ;)
Comment 8 Alexander Sack 2009-10-31 00:15:09 UTC
and yes, clearlooks suffers from the same problem:

from src/clearlooks_draw.c:922

       /* Draw the Strokes */
        while (tile_pos <= width+x_step)
        {
                cairo_move_to (cr, stroke_width/2-x_step, 0);
                cairo_line_to (cr, stroke_width-x_step,   0);
                cairo_line_to (cr, stroke_width/2-x_step, height);
                cairo_line_to (cr, -x_step, height);

                cairo_translate (cr, stroke_width, 0);
                tile_pos += stroke_width;
        }
Comment 9 Alexander Sack 2009-10-31 00:24:24 UTC
Created attachment 146612 [details] [review]
same approach for clearlooks.

also checked the other engines in gtk-engines ... though seem to not do tiled progressbar drawing don't have code that would be affected.
Comment 10 Alexander Sack 2009-10-31 00:25:54 UTC
if you can't review clearlooks patches, please CC someone who could drive that part so we do not have to open a new bug. Thanks!
Comment 11 Andrea Cimitan 2009-11-01 01:05:21 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 12 Andrea Cimitan 2009-11-01 01:06:23 UTC
Fixed also for clearlooks!
Comment 13 C de-Avillez 2009-11-02 17:53:05 UTC
@Andrea -- I looked for the fix on GIT, but cannot find it...
Comment 15 Alexander Sack 2009-11-05 15:03:38 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > @Andrea -- I looked for the fix on GIT, but cannot find it...
> 
> http://git.gnome.org/cgit/murrine/commit/?h=border-shade-and-expander&id=beaeda3e777f9e91a2f17d61584a38ee043b7866http://git.gnome.org/cgit/murrine/commit/?h=border-shade-and-expander&id=beaeda3e777f9e91a2f17d61584a38ee043b7866

hmm ... so you think applications are not buggy if they pass-in height/width==0 ? otherwise, the assertions would have been the right approach to address this ...
Comment 16 Andrea Cimitan 2009-11-05 15:23:07 UTC
I just made sure the engine won't loop in that while, I just don't care about the sizes, should not be engines's fault to monitor them.