Hello list,
I have a problem using Gtk-2.10.13 on DirectFB (1.0.0-rc2, 1.0.0 doens't
run for some reason) running on a mips device. At some point, my
application creates a GtkIconView with some icons in a GtkWindow. When
this window is destroyed, some memory is not freed. Most of this memory
is allocated here:

#0  malloc (bytes=273616) at malloc.c:834
#1  0x2c0f8f00 in fusion_dbg_shmalloc (
        pool=0x2c32afc0,
        file=0x2c0a83b0 "surfaces.c",
        line=1828,
        func=0x2c0a8eb8 "system_access_by_software",
        __size=273616)
                at shmalloc.c:509
#2  0x2c0831ec in system_access_by_software (
        buffer=0x2c740d68,
        flags=DSLF_WRITE)
                at surfaces.c:1828
#3  0x2c07fb78 in dfb_surface_software_lock (
        surface=0x2c740c60, flags=DSLF_WRITE,
        data=0x2c7351cc, pitch=0x2c7351e4,
        front=104)
                at surfaces.c:798
#4  0x2c038250 in gAcquire (
        state=0x2c735068,
        accel=DFXL_FILLRECTANGLE)
                at generic.c:8478
#5  0x2c059eec in dfb_gfxcard_fillrectangles (
        rects=0x7fff0830, num=1,
        state=0x2c735068)
                at gfxcard.c:808
#6  0x2c0124ac in IDirectFBSurface_FillRectangle (
        thiz=0x2c740ea8, x=1828, y=738889400,
        w=360, h=190)
                at idirectfbsurface.c:1101
#7  0x2b7805ac in _gdk_directfb_draw_rectangle (
        drawable=0x2c3569b8,
        gc=0x2c5f49c8, filled=1, x=0, y=0,
        width=360, height=190)
                at gdkdrawable-directfb.c:443
#8  0x2b731098 in gdk_draw_rectangle (
        drawable=0x2c3569b8,
        gc=0x2c5f49c8, filled=1, x=0, y=0,
        width=360, height=190)
                at gdkdraw.c:408
#9  0x2b76c60c in gdk_window_draw_rectangle (
        drawable=0x2c356960, gc=0x2c5f49c8,
        filled=1, x=0, y=0, width=360,
        height=190)
                at gdkwindow.c:1257
#10 0x2b731098 in gdk_draw_rectangle (
        drawable=0x2c356960, gc=0x2c5f49c8,
        filled=1, x=0, y=0, width=360,
        height=190)
                at gdkdraw.c:408
#11 0x2aed6c04 in gtk_default_draw_flat_box (
        style=0x2c364518, window=0x2c356960,
        state_type=GTK_STATE_NORMAL,
        shadow_type=GTK_SHADOW_NONE,
        area=0x0, widget=0x2c3628a8, 
        detail=0x2b1bb7a4 "base", x=0, y=0,
        width=360, height=190)
                at gtkstyle.c:3592
#12 0x2aee43a8 in gtk_paint_flat_box (
        style=0x2c364518,
        window=0x2c356960, state_type=GTK_STATE_NORMAL,
        shadow_type=GTK_SHADOW_NONE,
        area=0x0, widget=0x2c3628a8, 
        detail=0x2b1bb7a4 "base",
         x=0, y=0, width=-1, height=-1)
                at gtkstyle.c:5917
#13 0x2b0a3364 in gtk_window_paint (
        widget=0x2c3628a8, area=0x0)
                at gtkwindow.c:6059
#14 0x2b09dc70 in gtk_window_realize (
        widget=0x2c3628a8)
                at gtkwindow.c:4345


When the GtkWindow is destroyed, I see these calls:
  gtk_window_unrealize()
  --> gdk_window_destroy()
    --> _gdk_window_destroy_hierarchy()
      --> _gdk_windowing_window_destroy()
        --> IDirectFBWindow_Close()
        --> IDirectFBWindow_Release()
          --> IDirectFBWindow_Destruct()

  gtk_window_destroy()
  gtk_window_finalize()

However, the GdkWindow and the allocated directfb resources are not
freed, gdk_window_finalize() (which would be called by
gdk_window_destroy_notify() after a DWET_DESTROYED event) is not called.
I'm not sure whether this is a bug in the program or somewhere else,
does anyone have an idea about this?

Best regards,
Simon

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to