[Fwd: Bug#406378: gnucash bug #406378]

Chris Shoemaker c.shoemaker at cox.net
Sun Jan 14 19:47:05 EST 2007


On Sun, Jan 14, 2007 at 12:52:34PM -0800, Thomas Bushnell BSG wrote:
> See the attached message. :)
> 
> Please don't cast GType into guint; it breaks the API and fails on Alpha
> (at least).  If you look at http://bugs.debian.org/406378, there is a
> patch at the end of the bug log which Steve Langasek says fixes the
> current problems.  Can someone please check that into gnucash for the
> next release?

I'll take care of it.

> And, please, don't cast GType into guint.
> 
> Also, Steve is serious in asking "where did they get the idea this was
> ok"; apparently there are *lots* of gtk+ programs which are doing this,
> and so he really would like to find what documentation or whatever is
> confusing and leading people to make this mistake so often in so many
> different programs.

It's historical.  g_type_register_static() was advertized as a
replacement for gtk_type_unique() which returned GtkType, which was a
guint.  See:
http://developer.gnome.org/doc/API/gtk/gtk-types.html#GTKTYPE

When we switched from GtkType to GType, we missed the fact that GType
wasn't also a guint.

-chris

> 
> Thomas
> 

Content-Description: Forwarded message - Bug#406378: gnucash bug #406378
> X-UIDL: 2fda1099cc5ea9cf109a2f05d45f8763.1168804738.81
> Envelope-to: tb at becket.net
> Delivery-date: Sun, 14 Jan 2007 04:11:07 -0800
> X-Loop: owner at bugs.debian.org
> Subject: Bug#406378: gnucash bug #406378
> Reply-To: Steve Langasek <vorlon at debian.org>, 406378 at bugs.debian.org
> Resent-From: Steve Langasek <vorlon at debian.org>
> Resent-To: debian-bugs-dist at lists.debian.org
> Resent-CC: tb at debian.org (Thomas Bushnell, BSG)
> Resent-Date: Sun, 14 Jan 2007 12:03:12 +0000
> Resent-Message-ID: <handler.406378.B406378.11687757494778 at bugs.debian.org>
> X-Debian-PR-Message: report 406378
> X-Debian-PR-Package: gnucash
> X-Debian-PR-Keywords: unreproducible
> X-Debian-PR-Source: gnucash
> Date: Sun, 14 Jan 2007 03:55:45 -0800
> From: Steve Langasek <vorlon at debian.org>
> To: Thomas Bushnell BSG <tb at becket.net>
> Cc: 406378 at bugs.debian.org
> In-Reply-To: <1168752378.10564.29.camel at kempis.becket.net>
> User-Agent: Mutt/1.5.13 (2006-08-11)
> X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02
> 	(1.212-2003-09-23-exp) on spohr.debian.org
> X-Spam-Level: 
> X-Spam-Status: No, hits=-0.3 required=4.0 tests=BAYES_00,SUBJ_HAS_UNIQ_ID
> 	autolearn=no version=2.60-bugs.debian.org_2005_01_02
> Resent-Sender: Debian BTS <debbugs at bugs.debian.org>
> Resent-Date: Sun, 14 Jan 2007 04:03:13 -0800
> 
> On Sat, Jan 13, 2007 at 09:26:13PM -0800, Thomas Bushnell BSG wrote:
> > Hi Steve; you were very helpful with the last alpha bug reported by this
> > submitter; I'm wondering if you can give it a little attention.  I don't
> > have easy access to an alpha to reproduce the problem.
> 
> Please ask upstream where they got the idea that g_type_register_static()
> returned a guint, or that it was otherwise ok to cast its GType return type
> to a guint.  Years of debugging crashing gtk+ programs on alpha, and it's
> always the same thing -- somehow, GTK programmers are consistently getting
> bad information about how to use gobject, and I want to know where it's
> coming from so I can lart the people responsible.
> 
> Attached is a partial patch which fixes the bug responsible for the
> *current* crasher bug on alpha.  Searching the code, there are several more
> instances of this type abuse that will also need to be cleaned up if we want
> things like searching to not crash.  I'll follow up with a full patch soon.
> 
> -- 
> Steve Langasek                   Give me a lever long enough and a Free OS
> Debian Developer                   to set it on, and I can move the world.
> vorlon at debian.org                                   http://www.debian.org/
> 




> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel



More information about the gnucash-devel mailing list