Re: What is the significance of pygtk.require('2.0')?



----- "Robert Park" <rbpark exolucere ca> wrote:

> On Fri, Oct 29, 2010 at 10:23 AM, John Palmieri <johnp redhat com>
> wrote:
> > If your app is running under PyGI and gtk2 without crashing most
> likely it will run fine with Gtk 3.
> 
> Ok. For the most part it isn't crashing, but there are specific
> things
> I've found that will crash reliably, most of which are in
> libchamplain, but there is one particular crash in Gdk that's been
> bothering me.
> 
> Gdk.keyval_name(keyval)
> 
> segfaults _every_time_. What should I do?

I just fixed this in Gtk 3.0.  It is an annotation error.  We were returning the static name string as "transfer full" which means the bindings should take ownership of the return value.  That in turn means the bindings need to free it when done.  Freeing a static string causes crashes.  I annotated it "transfer none" and it works.  Most likely this will not be fixed in Gtk 2.  Whenever you get a crash the most likely cause is an incorrect transfer annotation.  Let us know if you run into others.

--
John (J5) Palmieri
Software Engineer
Red Hat, Inc.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]