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 664447 - Leaking 1 values.
Leaking 1 values.
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2011-11-21 06:17 UTC by Andreas J. Guelzow
Modified: 2011-11-21 17:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (556 bytes, patch)
2011-11-21 15:39 UTC, Jean Bréfort
none Details | Review

Description Andreas J. Guelzow 2011-11-21 06:17:36 UTC
new Gnumeric
select File->Print
cancel
quit

aguelzow@kirkman:~/git/gnumeric$ jhbuild run gnumeric

(gnumeric:7984): Gtk-WARNING **: /build/buildd/gtk+3.0-3.2.0/./gtk/gtkcontainer.c:939: container class `GtkScrolledWindow' has no child property named `top-attach'

(gnumeric:7984): Gtk-WARNING **: /build/buildd/gtk+3.0-3.2.0/./gtk/gtkcontainer.c:939: container class `GtkScrolledWindow' has no child property named `top-attach'

(gnumeric:7984): Gtk-WARNING **: /build/buildd/gtk+3.0-3.2.0/./gtk/gtkcontainer.c:939: container class `GtkScrolledWindow' has no child property named `top-attach'
Leaking 1 values.
aguelzow@kirkman:~/git/gnumeric$ 

Note that we get GTK warnings as well as 1 leaked value...
Comment 1 Jean Bréfort 2011-11-21 06:44:29 UTC
I'll have a look at that during the evening or tomorrow.
Comment 2 Jean Bréfort 2011-11-21 07:52:27 UTC
Not a gnumeric bug. Gedit presents the same issue.
Comment 3 Andreas J. Guelzow 2011-11-21 15:02:52 UTC
The "Leaking 1 values." is probably a Gnumeric issue and I do not see it in 1.10.17.

I agree that the rest if a GTK issue:
  • #0 g_log
    from /lib/i386-linux-gnu/libglib-2.0.so.0
  • #1 gtk_container_child_get_valist
    at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkcontainer.c line 944
  • #2 gtk_container_child_get
    at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkcontainer.c line 1245
  • #3 grid_rows
    at /build/buildd/gtk+3.0-3.2.0/./gtk/gtkprintunixdialog.c line 1281

Comment 4 Jean Bréfort 2011-11-21 15:11:17 UTC
Looks like the criticals are gone for me after un update, I still see the leak though.
Comment 5 Andreas J. Guelzow 2011-11-21 15:37:14 UTC
In gnm_print_sheet we have:

case GTK_PRINT_OPERATION_RESULT_CANCEL:
	/* printing_instance_delete (pi); Done in response to end-print signal */
	break;

but in the sequence above printing_instance_delete appears to never be called. Whoever wrote that code (likely I) was sure that canceling triggered the end-print signal. Perhaps that has changed in gtk?
Comment 6 Jean Bréfort 2011-11-21 15:39:47 UTC
Created attachment 201825 [details] [review]
Proposed patch

Is the leak already there with gtk+-3.0 or is it new with 3.2. We might have to check gtk+ version there.
Comment 7 Andreas J. Guelzow 2011-11-21 15:56:58 UTC
I have fixed the leak. Assuming the WARNINGS are fixed in GTK:

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 8 Morten Welinder 2011-11-21 15:57:46 UTC
Leak plugged.
Comment 9 Andreas J. Guelzow 2011-11-21 15:59:17 UTC
Review of attachment 201825 [details] [review]:

We can also cancel a (large) print job after printing has commenced. In that case end-print will likely happen and so we cannot free the printing instance in both situations.
Comment 10 Jean Bréfort 2011-11-21 17:26:48 UTC
The warnings seem to be fixed: 
see #661328 and http://git.gnome.org/browse/gtk+/commit/gtk/gtkprintunixdialog.c?id=99266c4ceb188da9f365a9a1f6700fd7272041df