Re: [gtk-osx-devel] Gdk::Pixbuf::create(Gdk::Window, int, int, int, int) on Mac LION
- From: John Ralls <jralls ceridwen us>
- To: charltn gmail com
- Cc: gtk-osx-devel-list gnome org
- Subject: Re: [gtk-osx-devel] Gdk::Pixbuf::create(Gdk::Window, int, int, int, int) on Mac LION
- Date: Wed, 11 Jul 2012 07:44:43 +0100
On Jul 11, 2012, at 6:27 AM, Jim Charlton wrote:
> John:
>
> As so often happens... when I ran gdb again and looked more closely at my code with the subject line call, I found that the previously encountered segmentation fault and bad_alloc error message did not come from that call. It comes from subsequent code that tries to use the Cairo::RefPtr<Cairo::Pixbuf> that is returned by the call. The call to "create" itself only generates
> (myprog:480): glibmm-CRITICAL **: Glib::Interface::Interface(const Glib::Interface_Class&): assertion `gobject_ != 0' failed
>
> (myprog:480): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
>
> (myprog:480): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
>
> I am still struggling to figure out how to get the debugger to step into the glibmm library code.
Jim,
OK. So (as always) you should protect your code after calling a create function with an assert or g_return_if_fail() checking for a NULL object and that the type of the object is what you expect.
The bad object itself appears to originate from motion_notify_event_callback(). Do you have a custom handler for motion_notify?
Regards,
John Ralls
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]