[maemo-developers] [maemo-developers] Problem with Maemo's version of GTK
From: Clemens Eisserer linuxhippy at gmail.comDate: Fri Oct 28 19:20:17 EEST 2005
- Previous message: [maemo-developers] Problem with Maemo's version of GTK
- Next message: compatibility vs speed and bloat Re: [maemo-developers] gtk+ builtin stock icons removed
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hello again,
Thanks a lot for replying, I really was near going postal ;-)
> You should replace the g_assert above with 'g_assert (GDK_IS_PIXMAP
> (pixmap))'
>
> If it fails you need to track down where the supposedly valid pixmap
> object gets turned into an invalid pointer. Is it properly initialized
> in the first place? Does it get destroyed for one reason or another in
> between?
I now check with "g_assert (GDK_IS_PIXMAP(pixmap))" straight after
creation of the pixmap and just before gdk_pixmap_ref(), and it never
asserts but fails again at gdk_pixmap_ref.
Hmmm... strange since I first thought that could be since the
JNI-implementation of the JVM maybe does some weird things on ARM, but
since it passes GDK_IS_PIXMAP am I right to assume that the pointer is
ok?
Thanks again, lg Clemens
Creation-time:
-----------------------------------------------------------------------------------------------
if (offScreen (env, obj) == JNI_FALSE)
{
GdkPixmap* pix = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8,
width, height);
g_assert(GDK_IS_PIXMAP(pix));
createRawData (env, obj, pix);
}
else
{
GdkPixmap* pix = gdk_pixmap_new (NULL, width, height,
gdk_rgb_get_visual ()->depth);
g_assert(GDK_IS_PIXMAP(pix));
createRawData (env, obj, pix);
}
Use-Time:
---------------------------------------------------------------------------------------------
pixmap = cp_gtk_image_get_pixmap (env, source);
g_assert(pixmap != NULL);
g_assert(GDK_IS_PIXMAP(pixmap));
gdk_pixmap_ref (pixmap);
<------------------------> Dies here with message: "g_object_ref:
assertion `G_IS_OBJECT (object)' failed"
- Previous message: [maemo-developers] Problem with Maemo's version of GTK
- Next message: compatibility vs speed and bloat Re: [maemo-developers] gtk+ builtin stock icons removed
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
