[maemo-developers] [maemo-developers] Problem with Maemo's version of GTK

From: Clemens Eisserer linuxhippy at gmail.com
Date: Thu Oct 27 15:49:26 EEST 2005
Hello again,

While playing a bit with classpath-based jvm's on my 770 I found a
quite interresting problem I can't explain myself.

When I try to create an offscreen-image in java I get the following assertion:
jamvm[1625]: GLIB CRITICAL ** GLib-GObject - g_object_ref: assertion
`G_IS_OBJECT (object)' failed

although it works with the x86-version of maemo running in scatchbox,
sadly I was not able to run it on arm-emulation since it dies with
Signal11 (in fact any program that is a bit more complicated bahaves
strange when running in qemu).

The source-code is pretty simple, I attached it at the end of the mail.

The only problems I could imagine:
- JamVM is broken and passes a "broken" pointer to the native code, so
that cp_gtk_image_get_pixmap does actually not return something
useful.
This could be but is quite unlikely since a lot of JNI code is working
great (basically a lot of AWT stuff)
- Maemo's GTK is broken in some way?

Any help would be really appreciated, thank you in advance, lg Clemens

Source-Code of initFromImage:
-------------------------------------------------------------------------------------------------------------
pixmap = cp_gtk_image_get_pixmap (env, source);  <-------------> Just
returns the pixmap pointer from the java-code
  g_assert(pixmap != NULL);
  gdk_pixmap_ref (pixmap);                              
<----------------> fails here?
  g = (struct graphics *) g_malloc (sizeof (struct graphics));
  g->x_offset = g->y_offset = 0;
  g->drawable = (GdkDrawable *)pixmap;
  g->cm = gdk_drawable_get_colormap (g->drawable);
  gdk_colormap_ref (g->cm);
  g->gc = gdk_gc_new (g->drawable);
--------------------------------------------------------------------------------------------------------------

More information about the maemo-developers mailing list