Submitted On 18-APR-2006
doobnet
I have got this bug on every applet I have tested to compile and run. I have a single CPU computer and running jdk 1.5 and eclipse 3.1.1. I only get it the first time I run it after I changed anything in the code. And I can very easy reproduce the bug with minimal code.
Submitted On 19-APR-2006
dmitri_trembovetski
Could you please try this on the latest mustang (Java 6) build from http://mustang.dev.java.net ?
This bug appears to have been fixed in mustang b62.
Thank you,
Dmitri
Java2D Team
Submitted On 07-DEC-2006
Mustafa_KIRAC@CWRI
I was having the same problem with JDK 1.5 (with all updates including 10th) on machines with dual-core CPUs. I am using JDK 1.6 RC, and it seems that the bug is fixed now.
Mustafa Kirac.
Submitted On 06-FEB-2007
Is this bug fixed at all? It occurs all the time when I dispose of an applet properly. here are my stats:
Eclipse SDK
Version: 3.2.1
Build id: M20060921-0945
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: component argument pData
at sun.awt.windows.Win32SurfaceData.initOps(Native Method)
at sun.awt.windows.Win32SurfaceData.<init>(Unknown Source)
at sun.awt.windows.Win32SurfaceData.createData(Unknown Source)
at sun.awt.Win32GraphicsConfig.createSurfaceData(Unknown Source)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(Unknown Source)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(Unknown Source)
at sun.awt.windows.WComponentPeer$2.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Submitted On 06-FEB-2007
Sorry, my e-mail didn't show up. It is posted above.
Submitted On 06-FEB-2007
heh, nice. Ok, here it is:
joseph.st.onge@concurrenteda.com
Submitted On 09-MAR-2007
Here is some code from an Applet that reproduce this Bug very often:
package de.schmiereck.geneden;
import java.applet.Applet;
/*
* Created on 05.03.2007, Copyright (c) schmiereck, 2007
*/
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.HeadlessException;
import java.awt.Image;
import java.util.Iterator;
import java.util.Random;
/**
* <p>
* Main-Applet-View.
* </p>
*
* @author smk
* @version <p>05.03.2007: created, smk</p>
*/
public class MainApplet
extends Applet
{
private Image dbImage = null;
private Graphics dbGraphics = null;
private Dimension dbDimension = null;
private Color backgroundColor = Color.BLACK;
private Color areaColor = new Color(0, 0, 0);
private Color springColor = new Color(0, 200, 0);
private Color bottomColor = new Color(155, 55, 155);
/**
* Main-Model.
*/
private MainModel mainModel;
/**
* Main-Controller
* zum Benachrichtigen bei Eingaben des Users.
*/
private MainController mainController;
/**
* Breite der Zeichen-Area.
*/
private int maxX = 0;
/**
* Höhe der Zeichen-Area.
*/
private int maxY = 0;
private Random rnd = new Random();
private Color[] messengerColors = new Color[]
{
new Color(255, 0, 0),
new Color(0, 255, 0),
new Color(0, 0, 255)
};
/**
* Constructor.
*
*/
public MainApplet()
throws HeadlessException
{
this.mainModel = new MainModel();
this.mainController = new MainController(this.mainModel,
this);
}
/* (non-Javadoc)
* @see java.applet.Applet#init()
*/
public void init()
{
super.init();
this.setSize(640, 320);
}
/* (non-Javadoc)
* @see java.awt.Component#update(java.awt.Graphics)
*/
public void update(Graphics g)
{
// Um zu verhindern, das er den Hintergrund zeichnet,
// nicht super() aufrufen, sondern direkt paint().
//super.update(arg0);
Dimension d = this.getSize();
// Double-Buffer nicht initialisiert oder
// Größe geändert ?
if ((this.dbImage == null) ||
(d.width != this.dbDimension.width) ||
(d.height != this.dbDimension.height))
{
// Create the offscreen graphics context
this.dbDimension = d;
this.dbImage = this.createImage(d.width, d.height);
this.dbGraphics = this.dbImage.getGraphics();
this.dbGraphics.setColor(this.areaColor);
this.dbGraphics.fillRect(0, 0, d.width, d.height);
//this.viewerData.setSize(d.width, d.height);
this.maxX = this.getSize().width - this.getInsets().left - this.getInsets().right;
this.maxY = this.getSize().height - this.getInsets().top - this.getInsets().bottom;
}
// Erase the previous image
this.dbGraphics.setColor(this.backgroundColor);
this.dbGraphics.fillRect(0, 0, d.width, d.height);
// Offscreen Zeichnen.
this.paintFrame(this.dbGraphics);
// Puffer auf dem Screen anzeigen.
g.drawImage(this.dbImage, 0, 0, this);
//this.paint(g);
}
/**
* @param g
* ist das Grafik Objekt.
*/
private void paintFrame(Graphics g)
{
//==========================================================================================
// Bottom:
g.setColor(this.bottomColor);
this.drawLine(g,
(int)0, (int)this.mainModel.getBottomPosY(),
(int)this.maxX, (int)this.mainModel.getBottomPosY());
}
/* (non-Javadoc)
* @see java.awt.Component#paint(java.awt.Graphics)
*/
synchronized public void paint(Graphics g)
{
super.paint(g);
if (this.dbImage != null)
{
//int maxX = getSize().width - getInsets().left - getInsets().right;
//int maxY = getSize().height - getInsets().top - getInsets().bottom;
// Offscreen anzeigen.
g.drawImage(this.dbImage,
0, 0,
this);
}
}
}
Submitted On 10-APR-2007
java 1.6.0_01
and i have dual cpu
F:\java>appletviewer ScrollingSimple.html
initializing...
starting...
stopping...
preparing for unloading...
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: component
argument pData
at sun.awt.windows.Win32SurfaceData.initOps(Native Method)
at sun.awt.windows.Win32SurfaceData.<init>(Win32SurfaceData.java:448)
at sun.awt.windows.Win32SurfaceData.createData(Win32SurfaceData.java:316
)
at sun.awt.Win32GraphicsConfig.createSurfaceData(Win32GraphicsConfig.jav
a:357)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(WComponentPeer.java
:332)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(WComponentPeer.java
:313)
at sun.awt.windows.WComponentPeer$2.run(WComponentPeer.java:353)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Submitted On 15-MAY-2007
i m not catching what u wrote above.please write in easy
Submitted On 15-MAY-2007
I also got the same prb. .what to do please tell
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: component argument pData
at sun.awt.windows.Win32SurfaceData.initOps(Native Method)
at sun.awt.windows.Win32SurfaceData.<init>(Win32SurfaceData.java:448)
at sun.awt.windows.Win32SurfaceData.createData(Win32SurfaceData.java:316)
at sun.awt.Win32GraphicsConfig.createSurfaceData(Win32GraphicsConfig.java:357)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(WComponentPeer.java:332)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(WComponentPeer.java:313)
at sun.awt.windows.WComponentPeer$2.run(WComponentPeer.java:353)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Submitted On 15-MAY-2007
I also got the same prb. .what to do please tell
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: component argument pData
at sun.awt.windows.Win32SurfaceData.initOps(Native Method)
at sun.awt.windows.Win32SurfaceData.<init>(Win32SurfaceData.java:448)
at sun.awt.windows.Win32SurfaceData.createData(Win32SurfaceData.java:316)
at sun.awt.Win32GraphicsConfig.createSurfaceData(Win32GraphicsConfig.java:357)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(WComponentPeer.java:332)
at sun.awt.windows.WComponentPeer.replaceSurfaceData(WComponentPeer.java:313)
at sun.awt.windows.WComponentPeer$2.run(WComponentPeer.java:353)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Thank you
Sushma
Submitted On 04-JUL-2007
naansoft
Get the same error here. I'm running Java version 1.5.0_11 from Eclipse 3.2.2 on an Intel Pentium 4HT, 2600 MHz (13 x 200) , using Windows XP SP2.
Submitted On 27-JAN-2008
xgme
Sorry I can not figure out how to fix this problem. Is there any one to tell the solution in a easier voice.
Submitted On 30-SEP-2009
The solution is easy: stop using Java for graphics and use Flash/Flex.
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|