classpath
[Top][All Lists]
Advanced

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

Re: Problems running GTK-peers on Nokia-770


From: Clemens Eisserer
Subject: Re: Problems running GTK-peers on Nokia-770
Date: Sun, 6 Nov 2005 14:39:30 +0000

Hello again,

I just played a bit further and found out that
gdk_rgb_get_visual()->depth returns 24-bit as depth.
I do not have any deeper experiences with GTK/GDK at all (since I
dislike it a bit to be honest ;) ), but the gdk documentation says
that "This colormap and the corresponding visual should be used when
creating windows that will be drawn in by GdkRgb".

So this is what the gtk-awt peers do, they create a 24-bit depth
pixmap although we use a 16-bit display - this may or may not be a
problem, I don't know.
But when I change the pixmap-depth to 16-bit instead of
gdk_rgb_get_visual()->depth everything seems to work well - I just
receive warnings saying that I draw a 16-bit pixmap onto a 24-bit
visual or so and nothing is displayed but it does not assert anymore.
So maybe GDK just thinks its using a 24-bit display although its
running on a 16-bit one?

The strange thing is that I wrote a small test-sample myself which
does succeed in both cases with a 16 and a 24 bit pixmap, also
colormap creation works for both depths, I don't have any clue why it
fails inside of classpath's peers.

lg Clemens

> > I've just got my Nokia770 2 days ago and today I was able to build a
> > working sablevm package for it, after I sadly failed with kaffe.
> >
> > It really works well (and slow ;) ) expect  some glitches with
> > AWT/Peers, however one main problem is there which I wasn't able to
> > solve:
> >
> > As soon as I create a JFrame I get the following expections, although
> > adding Swing components to a Frame works:
> > jamvm[1625]: GLIB CRITICAL ** GLib-GObject - g_object_ref: assertion
> > `G_IS_OBJECT (object)' failed
> > java.lang.InternalError: GLib-GObject: g_object_ref: assertion
> > `G_IS_OBJECT (object)' failed
>
> My guess is that gdk_drawable_get_colormap returns something we're not
> expecting.  Can you put a printf in
> native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkGraphics.c in
> Java_gnu_java_awt_peer_gtk_GdkGraphics_initFromImage to see what it
> returns?  It looks like GDK is having trouble allocating colours in its
> colormap.
>
> Tom
>
> >    at gnu.java.awt.peer.gtk.GdkGraphics.initFromImage (Native Method)
> >    at gnu.java.awt.peer.gtk.GdkGraphics.<init> (GdkGraphics.java:108)
> >    at gnu.java.awt.peer.gtk.GtkImage.getGraphics (GtkImage.java:405)
> >    at gnu.java.awt.peer.gtk.GtkComponentPeer.createImage
> > (GtkComponentPeer.java:236)
> >    at java.awt.Component.createImage (Component.java:2083)
> >    at java.awt.Component.createImage (Component.java:2081)
> >    at javax.swing.RepaintManager.getOffscreenBuffer 
> > (RepaintManager.java:487)
> >    at javax.swing.JComponent.paint (JComponent.java:1442)
> >    at java.awt.Container$GfxPaintVisitor.visit (Container.java:1765)
> >    at java.awt.Container.visitChild (Container.java:1569)
> >    at java.awt.Container.visitChildren (Container.java:1531)
> >    at java.awt.Container.paint (Container.java:764)
> >    at gnu.java.awt.peer.gtk.GtkComponentPeer.handleEvent
> > (GtkComponentPeer.java:313)
> >    at java.awt.Component.dispatchEventImpl (Component.java:4845)
> >    at java.awt.Container.dispatchEventImpl (Container.java:1592)
> >    at java.awt.Window.dispatchEventImpl (Window.java:628)
> >    at java.awt.Component.dispatchEvent (Component.java:2343)
> >    at java.awt.EventQueue.dispatchEvent (EventQueue.java:475)
> >    at java.awt.EventDispatchThread.run (EventDispatchThread.java:75)
> > jamvm[1625]: GLIB CRITICAL ** Gdk - gdk_colormap_alloc_colors:
> > assertion `GDK_IS_COLORMAP (colormap)' failed
> > java.lang.InternalError: Gdk: gdk_colormap_alloc_colors: assertion
> > `GDK_IS_COLORMAP (colormap)' failed
> >    at gnu.java.awt.peer.gtk.GdkGraphics.setFGColor (Native Method)
> >    at gnu.java.awt.peer.gtk.GdkGraphics.setColor (GdkGraphics.java:372)
> > .....
> >
> > Nokia claims that the modified GTK-2.6.? they use is binary compatible
> > to GTK-2.6.
> > I went a bit through the peers code and it was quite straightforeward
> > to read, however I did not find a function call to "g_object_ref" and
> > I have to admit that I am a gtk noob.
> > As far as I can see either classpath makes some assumptions how GTK
> > should be (low probability) or Nokia's GTK implementation is broken
> > (more likely). Any ideas where the root of the problem could come
> > from?
> >
> > Thank you in advance, lg Clemens
> >
> >
> > _______________________________________________
> > Classpath mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/classpath
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]