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"
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to