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 461483 - Wrong check in gtk_window_group_remove_window
Wrong check in gtk_window_group_remove_window
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.11.x
Other Linux
: Normal minor
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2007-07-29 14:00 UTC by Josselin Mouette
Modified: 2008-02-23 14:29 UTC
See Also:
GNOME target: ---
GNOME version: 2.17/2.18


Attachments
Proposed patch (394 bytes, patch)
2007-07-29 14:00 UTC, Josselin Mouette
committed Details | Review

Description Josselin Mouette 2007-07-29 14:00:13 UTC
The type checking in gtk_window_group_remove_window looks for a GtkWidget while the argument is a GtkWindow.

This leads to a critical warning when leaving Epiphany, see http://bugs.debian.org/432672
Comment 1 Josselin Mouette 2007-07-29 14:00:40 UTC
Created attachment 92642 [details] [review]
Proposed patch
Comment 2 Christian Persch 2007-07-29 14:26:35 UTC
While I think this patch is correct, I'd like to note that this is not the cause of the crash in epiphany. (Since if it's failing the GTK_IS_WIDGET test, it's going to fail the GTK_IS_WINDOW test as well. Plus, adding a g_return_if_fail in some API function is _never_ a valid fix for a bug in an application using that API function!) The crash in epiphany is purely a debian bug, caused by the debian xulrunner package containing a buggy patch. I'm speaking of the patch from https://bugzilla.mozilla.org/show_bug.cgi?id=296002 / debian#367106; please have it removed from debian's xulrunner package.
Comment 3 Josselin Mouette 2007-07-29 15:17:55 UTC
OK, I wasn't sure of that, as on first sight I didn't see anything that could change the type of the object that is passed to gtk_window_set_transient_for. That reduces the severity of this bug.
Comment 4 Tim Janik 2007-08-23 13:08:11 UTC
(In reply to comment #1)
> Created an attachment (id=92642) [edit]
> Proposed patch

please create patches with diff -up so we get the required context.

bratsche,tbf, assuming the patch modifies gtk_window_group_remove_window, can you please apply, test, commit?
Comment 5 Mathias Hasselmann (IRC: tbf) 2007-08-28 07:35:33 UTC
Seems Cody commited that patch already:

commit 75b9993061e60683a8e003ee2243e1ec1682a89e
Author: bratsche <bratsche@7eb1c76a-c725-0410-a3b5-a37faf6256f8>
Date:   Thu Aug 23 16:00:10 2007 +0000

    2007-08-23  Cody Russell  <bratsche@gnome.org>
            * gtk/gtkwindow.c (gtk_window_group_remove_window: Use the
            correct type check on `window'.  We now check GTK_IS_WINDOW
            rather than GTK_IS_WIDGET. (#461483, Josselin Mouette)


    git-svn-id: svn+ssh://svn.gnome.org/svn/gtk+/trunk@18681 7eb1c76a-c725-0410-a3b5-a37faf6256f8

Comment 6 mh 2008-02-23 10:18:14 UTC
(In reply to comment #2)
> The crash in epiphany is purely a debian
> bug, caused by the debian xulrunner package containing a buggy patch. I'm
> speaking of the patch from https://bugzilla.mozilla.org/show_bug.cgi?id=296002
> / debian#367106; please have it removed from debian's xulrunner package.

Yet, this is your patch. So what is your solution for mozilla's bug (which is still not fixed after a few years) ?

Comment 7 Christian Persch 2008-02-23 14:29:37 UTC
(In reply to comment #6)
> (In reply to comment #2)
> > The crash in epiphany is purely a debian
> > bug, caused by the debian xulrunner package containing a buggy patch. I'm
> > speaking of the patch from https://bugzilla.mozilla.org/show_bug.cgi?id=296002
> > / debian#367106; please have it removed from debian's xulrunner package.
> 
> Yet, this is your patch.

So what? There's nothing in the upstream bug report suggesting that the patch is ready to be used; it clearly has issues beyond the crash, meriting a review-.

> So what is your solution for mozilla's bug (which is
> still not fixed after a few years) ?

It's not my bug; it's not up to me to solve it. I don't care about that bug at all; so I'm not working on it.