[kaffe] Problem with gnu.java.awt.peer.gtk.GtkImagePainter.drawPixels
Max Gilead
gilead at yellowhedgehog.com
Thu Sep 30 12:24:08 PDT 2004
Hi!
I tried to run XMage (http://yellowhedgehog.com/xmage/) using software
renderer with Kaffe and got a problem with
gnu.java.awt.peer.gtk.GtkImagePainter.drawPixels native implementation.
It happens only occassionally - ie. after I put a number of printlns
before the call I got several hundred successful calls for one that fails.
This code:
int[] convPixels = convertPixels (pixels, model);
System.out.println("gc="+ gc);
System.out.println("redBG="+ redBG);
System.out.println("greenBG="+ greenBG);
System.out.println("blueBG="+ blueBG);
System.out.println("startX + x="+ (startX + x));
System.out.println("startY + y="+ (startY + y));
System.out.println("width="+ width);
System.out.println("height="+ height);
System.out.println("convPixels="+ convPixels);
System.out.println("offset="+ offset);
System.out.println("scansize="+ scansize);
System.out.println("affine="+ affine);
drawPixels (gc, redBG, greenBG, blueBG,
startX + x, startY + y,
width, height, convertPixels (pixels, model), offset,
scansize, affine);
produces this log during failed call:
gc=gnu.java.awt.peer.gtk.GdkGraphics[font=java.awt.Font[family=Helvetica,name=Helvetica,style=plain,size=12],color=java.awt.SystemColor[i=9]]
redBG=192
greenBG=192
blueBG=192
startX + x=0
startY + y=0
width=600
height=600
convPixels=[I at 8d6100c
offset=0
scansize=600
affine=null
Exception during event dispatch:
java.lang.NullPointerException
at gnu.java.awt.peer.gtk.GtkImagePainter.drawPixels
(GtkImagePainter.java)
at gnu.java.awt.peer.gtk.GtkImagePainter.setPixels
(GtkImagePainter.java:195)
at gnu.java.awt.peer.gtk.GtkImage.startProduction (GtkImage.java:302)
at gnu.java.awt.peer.gtk.GtkImagePainter.run (GtkImagePainter.java:114)
at gnu.java.awt.peer.gtk.GtkImagePainter.<init> (GtkImagePainter.java:78)
at gnu.java.awt.peer.gtk.GdkGraphics.drawImage (GdkGraphics.java:144)
at gnu.java.awt.peer.gtk.GdkGraphics.drawImage (GdkGraphics.java:158)
at go.GoInterface.paint (GoInterface.java:406)
at go.GoInterface.update (GoInterface.java:385)
at gnu.java.awt.peer.gtk.GtkCanvasPeer.handleEvent
(GtkCanvasPeer.java:82)
at java.awt.Component.dispatchEvent (Component.java:2257)
at java.awt.EventQueue.dispatchEvent (EventQueue.java:425)
at java.awt.EventDispatchThread.run (EventDispatchThread.java:80)
at java.lang.VMThread.run (VMThread.java:139)
While this code:
int[] convPixels = convertPixels (pixels, model);
System.out.println("gc="+ gc);
System.out.println("redBG="+ redBG);
System.out.println("greenBG="+ greenBG);
System.out.println("blueBG="+ blueBG);
System.out.println("startX + x="+ (startX + x));
System.out.println("startY + y="+ (startY + y));
System.out.println("width="+ width);
System.out.println("height="+ height);
System.out.println("convPixels="+ convPixels);
System.out.println("offset="+ offset);
System.out.println("scansize="+ scansize);
System.out.println("affine="+ affine);
drawPixels (gc, redBG, greenBG, blueBG,
startX + x, startY + y,
width, height, convPixels, offset,
scansize, affine);
produces this log during failed call:
gc=gnu.java.awt.peer.gtk.GdkGraphics[font=java.awt.Font[family=Helvetica,name=He
lvetica,style=plain,size=12],color=java.awt.SystemColor[i=9]]
redBG=192
greenBG=192
blueBG=192
startX + x=0
startY + y=0
width=600
height=600
convPixels=[I at 95f200c
offset=0
scansize=600
affine=null
Exception during event dispatch:
java.lang.NullPointerException
at gnu.java.awt.peer.gtk.GtkImagePainter.drawPixels
(GtkImagePainter.java)
at gnu.java.awt.peer.gtk.GtkImagePainter.setPixels
(GtkImagePainter.java:195)
at java.awt.image.MemoryImageSource.sendPicture
(MemoryImageSource.java:234)
at java.awt.image.MemoryImageSource.startProduction
(MemoryImageSource.java:1 69)
at gnu.java.awt.peer.gtk.GtkImage.startProduction (GtkImage.java:308)
at gnu.java.awt.peer.gtk.GtkImagePainter.run (GtkImagePainter.java:114)
at gnu.java.awt.peer.gtk.GtkImagePainter.<init> (GtkImagePainter.java:78)
at gnu.java.awt.peer.gtk.GdkGraphics.drawImage (GdkGraphics.java:144)
at gnu.java.awt.peer.gtk.GdkGraphics.drawImage (GdkGraphics.java:158)
at jgl.GL.glXSwapBuffers (GL.java:6140)
at xmage.turbine.render.jgl.JGLRenderingCanvas.paint
(JGLRenderingCanvas.java :68)
at java.awt.Canvas.update (Canvas.java:212)
at gnu.java.awt.peer.gtk.GtkCanvasPeer.handleEvent
(GtkCanvasPeer.java:82)
at java.awt.Component.dispatchEvent (Component.java:2257)
at java.awt.EventQueue.dispatchEvent (EventQueue.java:425)
at java.awt.EventDispatchThread.run (EventDispatchThread.java:80)
at java.lang.VMThread.run (VMThread.java:139)
Log for successful call is exactly the same as for unsuccessful one.
Regards,
Max
--
-----------------------------------------------------------
Cthulhu for President. Why vote for a lesser evil?
More information about the kaffe
mailing list