-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.0.1, 1.2.2, 1.3.0
-
generic, x86
-
generic, windows_95, windows_98, windows_nt, windows_2000
m21.addActionListener(temp); m22.addActionListener(temp);
m23.addActionListener(temp); m24.addActionListener(temp);
m25.addActionListener(temp); m26.addActionListener(temp);
m27.addActionListener(temp); m28.addActionListener(temp);
m29.addActionListener(temp);
menu2.add(m21); menu2.add(m22); menu2.add(m23); menu2.add(m24);
menu2.add(m25); menu2.add(m26); menu2.add(m27); menu2.add(m28); menu2.add
(m29);
setLayout(new BorderLayout());
add(menu1,BorderLayout.WEST);
add(menu2,BorderLayout.SOUTH);
setSize(500,500);
}
public void setCurrentColor(Color tt){
clr=tt;
validate();
repaint();
}
public void setCurrentState(String stt){
stateString=stt;
System.out.println(stateString+"\t"+stt);
}
public void paint(Graphics g){
g.translate(60,5);
g.setColor(Color.red);
g.fillRect(x1 , y1 , x2, y2 );
g.setColor(clr);
g.fillRect((x1+10) , (y1+10) , x2-20, y2-20 );
g.setColor(Color.yellow);
g.fillOval(x1-3 , y1-3 , 6 , 6 );
g.fillOval(x2-3 , y2-3 , 6 , 6 );
g.drawString("("+x1+","+y1+")" , x1 , y1 );
g.drawString("("+x2+","+y2+")" , x2 , y2 );
g.drawLine(x1 , y1 , x2 , y2 );
g.setColor(Color.black);
g.drawRect(0 , 0 , 435 , 470 );
}
}
class CheckColor implements ActionListener{
Drow theGui;
public CheckColor(Drow curGui){
theGui=curGui;
}
public void actionPerformed(ActionEvent ae){
if(ae.getActionCommand().equals("Red")){
theGui.setCurrentColor(Color.red);
}
else if(ae.getActionCommand().equals("Orange")){
theGui.setCurrentColor(Color.orange);
}
else if(ae.getActionCommand().equals("Yellow")){
theGui.setCurrentColor(Color.yellow);
}
else if(ae.getActionCommand().equals("White")){
theGui.setCurrentColor(Color.white);
}
else if(ae.getActionCommand().equals("Green")){
theGui.setCurrentColor(Color.green);
}
else if(ae.getActionCommand().equals("Pink")){
theGui.setCurrentColor(Color.pink);
}
else if(ae.getActionCommand().equals("Blue")){
theGui.setCurrentColor(Color.blue);
}
else if(ae.getActionCommand().equals("Gray")){
theGui.setCurrentColor(Color.gray);
}
else if(ae.getActionCommand().equals("Black")){
theGui.setCurrentColor(Color.black);
System.out.println("got to BLACK");
}
-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?
else{
System.out.println("got to ELSE");
String stttr=ae.getActionCommand();
System.out.println("got to stttr=...");
theGui.setCurrentState(stttr);
System.out.println("got to theGui...");
}
-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?
}
}
-------------------------------------------------------------------------------
-------------------------------------*/
(Review ID: 106044)
======================================================================
Name: skT45625 Date: 06/13/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.2.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
I receive the following error shortly after I call a C++
function from a Java class via a 'native' method. I have
a diagnostic 'printf' at the beginning of the C++ function
that successfully runs, but during my
'(*a_pJNIEnv).GetStringUTFChars( )' calls that follow, the
crash occurs.
HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
Error ID: 4F533F57494E13120E43505002D4
(Review ID: 106101)
======================================================================
Name: rlT66838 Date: 04/03/2000
java version "1.3.0rc2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc2-Y)
Java HotSpot(TM) Client VM (build 1.3.0rc2-Y, mixed mode)
D:\NYMAPP~1\infohole>java se.kaskware.infohole.gui.InfoHoleFrame
#
# An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code
# outside the VM.
# Program counter=0x5002598a
#
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
Code generating the fault:
=========================================
package se.kaskware.infohole.gui;
import java.awt.*;
import javax.swing.*;
public class InfoHoleFrame extends JFrame
{
ImageIcon newIcon, openIcon, saveIcon, cutIcon, copyIcon, pasteIcon,
aboutIcon;
public InfoHoleFrame()
{
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(400, 200);
}
protected InfoHoleFrame init()
{
initIcons();
setJMenuBar(createMenubar());
getContentPane().setLayout(new BorderLayout());
getContentPane().add(createToolbar(), "North");
getContentPane().add(createTextPane(), "Center");
getContentPane().add(createNotisPane(), "East");
return this;
}
JMenuBar createMenubar()
{
JMenuBar menubar = new JMenuBar();
menubar.add(new JMenu("File"));
menubar.add(new JMenu("Edit"));
menubar.add(new JMenu("View"));
menubar.add(new JMenu("Tools"));
menubar.add(Box.createHorizontalGlue());
menubar.add(new JMenu("Help"));
return menubar;
}
JToolBar createToolbar()
{
JToolBar toolbar = new JToolBar();
toolbar.add(new JButton(newIcon));
toolbar.add(new JButton(openIcon));
toolbar.addSeparator();
toolbar.add(new JButton(saveIcon));
return toolbar;
}
JComponent createTextPane()
{
JPanel pane = new JPanel(), selPane = new JPanel();
JScrollPane scrollPane;
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setBackground(Color.blue);
selPane.setLayout(new BoxLayout(selPane, BoxLayout.X_AXIS));
selPane.setPreferredSize(new Dimension(Integer.MAX_VALUE, 22));
selPane.setMaximumSize(selPane.getPreferredSize());
selPane.setAlignmentX(0);
selPane.add(new JRadioButton("1"));
selPane.add(new JRadioButton("2"));
selPane.add(new JRadioButton("3"));
pane.add(selPane);
scrollPane = new JScrollPane(pane,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.setPreferredSize(new Dimension(400, Integer.MAX_VALUE));
scrollPane.getViewport().setViewSize(scrollPane.getPreferredSize());
return scrollPane;
}
JComponent createNotisPane()
{
JPanel pane = new JPanel(), selPane = new JPanel();
JScrollPane scrollPane;
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setBackground(Color.red);
selPane.setLayout(new BoxLayout(selPane, BoxLayout.X_AXIS));
selPane.setPreferredSize(new Dimension(Integer.MAX_VALUE, 22));
selPane.setMaximumSize(selPane.getPreferredSize());
String tmp[] = {"Fakta", "Bakgrunder", "Personer", "Diverse"};
selPane.add(new JComboBox(tmp));
selPane.add(new JButton("A"));
selPane.add(new JButton("D"));
pane.add(selPane);
scrollPane = new JScrollPane(pane,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setPreferredSize(new Dimension(150, Integer.MAX_VALUE));
scrollPane.setMinimumSize(scrollPane.getPreferredSize());
scrollPane.setMaximumSize(scrollPane.getPreferredSize());
scrollPane.getViewport().setViewSize(scrollPane.getPreferredSize());
return scrollPane;
}
void initIcons()
{
newIcon = new ImageIcon("images/new.gif");
openIcon = new ImageIcon("images/open.gif");
saveIcon = new ImageIcon("images/save.gif");
cutIcon = new ImageIcon("images/cut.gif");
copyIcon = new ImageIcon("images/copy.gif");
pasteIcon = new ImageIcon("images/paste.gif");
aboutIcon = new ImageIcon("images/about.gif");
}
public static void main(String args[])
{
JFrame frame = new InfoHoleFrame().init();
frame.setVisible(true);
}
}
(Review ID: 103202)
======================================================================
Name: skT45625 Date: 05/08/2000
"java version "1.3.0rc3
)Standard Edition (build 1.3.0rc3-Z ,Java(TM) 2 Runtime Environment
)mixed mode ,Java HotSpot(TM) Client VM (build 1.3.0rc3-Z
MY OS: Arabic Enabled win98
# HotSpot Virtual Machine Error,EXCEPTION_ACCESS_VIOLATION
# Error ID: 4F533F57494E13120E43505002D4
sample code:
public class BugTest {
public static void main(String[] args) {
BugTest bt = new BugTest();
bt.test(bt, "hello"); // works fine.
bt.test(bt, null); // HotSpot Exception
} // main()
public void test(Object ob, String methodName) {
try {
java.lang.reflect.Method method;
method = ob.getClass().getMethod(methodName, null);
method.invoke(ob, null);
} catch (Exception e) {
System.out.println("command not available: " + methodName);
System.out.println("Exception: " + e.getMessage());
};
} // test()
public void hello() {
System.out.println("hello");
} // hello()
} // class BugTest
(Review ID: 104576)
======================================================================
Name: skT45625 Date: 05/10/2000
C:\jdk13\bin>java -version
java version "1.3.0rc3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc3-Z)
Java HotSpot(TM) Client VM (build 1.3.0rc3-Z, mixed mode)
I tried to initialize a program twice from a property file and got these
errors. I made no change to the program, just ran 2 times in a row.
C:\jdk13\bin>java Editor01.Tester
#
# An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outsi
de the VM.
# Program counter=0x500236b9
#
C:\jdk13\bin>java Editor01.Tester
#
# An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outsi
de the VM.
# Program counter=0x500236b9
#
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
java.lang.NullPointerException
at sun.awt.windows.WComponentPeer.updateClient(Unknown Source)
at sun.awt.ScreenUpdater.run(Unknown Source)
java.lang.NullPointerException
at sun.awt.windows.WComponentPeer.updateClient(Unknown Source)
at sun.awt.ScreenUpdater.run(Unknown Source)
java.lang.NullPointerException
at sun.awt.windows.WComponentPeer.updateClient(Unknown Source)[
abnormal program termination
at sun.awt.ScreenUpdater.run(Unknown Source)
error occured during error reporting]
(Review ID: 104694)
======================================================================
Name: skT45625 Date: 05/18/2000
/*
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
After I execute the code at the bottom with the command line:
java RCircle 2 3409
I get:
#
# HotSpot Virtual Machine Error, EXCEPTION_STACK_OVERFLOW
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
I had an idea about something along the lines of "recursive, parametric object
definition" so I decided to write the below code for fun. If your not familiar
with parametric math, this class basically creates an n sided object using
cosine and sine. The limit as n --> infinity, the more "circleish" this object
gets. The input is as follows:
java RCircle [radius] [points to generate]
ex:
java RCircle 2 4
*/
// begin
import java.text.NumberFormat;
public class RCircle {
private static RCircle first;
private static double radius;
private static double inc;
private boolean isFirst;
private double x;
private double y;
private RCircle next;
public RCircle (double radius, double inc) {
first = this;
this.radius = radius;
this.inc = inc;
isFirst = true;
x = radius;
y = 0.0;
next = new RCircle (inc);
}
private RCircle (double time) {
x = (double) (radius * Math.cos(time));
y = (double) (radius * Math.sin(time));
if (about(x, radius, .0001) && about(y, 0.0, .0001))
next = first;
else
next = new RCircle (time + inc);
}
public RCircle getNext() {
return next;
}
public double getX() {
return x;
}
public double getY() {
return y;
}
public boolean isFirst() {
return isFirst;
}
public boolean about(double a, double b, double r) {
return (a + r > b && a - r < b);
}
public static void main(String[] args) {
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(3);
RCircle r5 = new RCircle (
Double.parseDouble(args[0]),
2 * Math.PI / Double.parseDouble(args[1])
).getNext();
while (r5.isFirst() != true) {
System.out.println(
"(" + nf.format(r5.getX()) +
", " + nf.format(r5.getY()) + ")"
);
r5 = r5.getNext();
}
}
}
// end
(Review ID: 104969)
======================================================================
Name: rlT66838 Date: 05/30/2000
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
/*
* Swing Version
*/
import java.io.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TextDemo extends JApplet implements ActionListener {
JTextField textField;
JTextArea textArea;
String newline = "\n";
//Hack to avoid annoying error message (1.1).
public TextDemo() {
getRootPane().putClientProperty("defeatSystemEventQueueCheck",
Boolean.TRUE);
}
public void init() {
textField = new JTextField(20);
textField.addActionListener(this);
textArea = new JTextArea(5, 20);
textArea.setEditable(false);
JScrollPane scrollPane = new JScrollPane(textArea,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
//Add Components to the Applet.
GridBagLayout gridBag = new GridBagLayout();
Container contentPane = getContentPane();
contentPane.setLayout(gridBag);
GridBagConstraints c = new GridBagConstraints();
c.gridwidth = GridBagConstraints.REMAINDER;
c.fill = GridBagConstraints.HORIZONTAL;
gridBag.setConstraints(textField, c);
contentPane.add(textField);
c.fill = GridBagConstraints.BOTH;
c.weightx = 1.0;
c.weighty = 1.0;
gridBag.setConstraints(scrollPane, c);
contentPane.add(scrollPane);
}
public void actionPerformed(ActionEvent evt) {
String text = textField.getText();
String stringToReverse2=textField.getText();
String stringToReverse=textField.getText();
String dataSource="http://63.78.197.40/cgi-bin/cgit.exe?test=+text";
try {
URL url = new URL(dataSource);
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
PrintWriter out = new PrintWriter(
connection.getOutputStream());
out.println("string=" + stringToReverse);
out.close();
BufferedReader in = new BufferedReader(
new InputStreamReader(
connection.getInputStream()));
String inputLine;
stringToReverse2 = in.readLine();
in.close();
}
catch (MalformedURLException me) {
System.out.println("MalformedURLException: " + me);
}
catch (IOException ioe) {
System.out.println("IOException: " + ioe);
}
textArea.append(stringToReverse2 + newline);
textField.selectAll();
}
}
(Review ID: 105512)
======================================================================
Name: skT45625 Date: 06/12/2000
"java version "1.3.0
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
C:\My Documents\school\java\myProjects\120600>javac Drow.java
#
HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION #
Please report this error at #
http://java.sun.com/cgi-bin/bugreport.cgi #
#
Error ID: 4F533F57494E13120E43505002D4 #
#
abnormal program termination
>C:\My Documents\school\java\myProjects\120600
look for -?-?-... at bottom, change from "else if(...){..." to "else{..."
caused error message.
/* -----------------------------------------------------------------------------
---------------------------------------
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class Drow extends Applet{
int x1=50;
int y1=50;
int x2=150;
int y2=150;
String stateString;
Color clr;
CheckColor temp;
Panel menu1; Panel menu2; Panel menu3; Panel menu4; Panel menu5;
Button m11; Button m12; Button m13; Button m14; Button m15; Button
m16; Button m17;
Button m21; Button m22; Button m23; Button m24; Button m25; Button
m26; Button m27; Button m28; Button m29;
public void init(){
clr=Color.white;
stateString="Close";
menu1=new Panel();
temp=new CheckColor(this);
menu1.setLayout(new GridLayout(0,1));
m11=new Button("New"); m12=new Button("Rubber"); m13=new Button
("Line"); m14=new Button("Circle"); m15=new Button("Square"); /*--- m16=new
Button("Close"); ---*/ m17=new Button("Color");
menu1.add(m11); menu1.add(m12); menu1.add(m13); menu1.add(m14);
menu1.add(m15); /*--- menu1.add(m16); --*/ menu1.add(m17);
m16=new Button(stateString);
m16.addActionListener(temp);
menu1.add(m16);
menu2=new Panel();
menu2.setLayout(new GridLayout(1,0));
m21=new Button("Red"); m22=new Button("Orange"); m23=new Button
("Yellow"); m24=new Button("White"); m25=new Button("Green"); m26=new Button
("Pink"); m27=new Button("Blue"); m28=new Button("Gray"); m29=new Button
("Black");
m21.setBackground(Color.red); m22.setBackground(Color.orange);
m23.setBackground(Color.yellow); m24.setBackground(Color.white);
m25.setBackground(Color.green); m26.setBackground(Color.pink);
m27.setBackground(Color.blue); m28.setBackground(Color.gray);
m29.setBackground(Color.black);
m23.addActionListener(temp); m24.addActionListener(temp);
m25.addActionListener(temp); m26.addActionListener(temp);
m27.addActionListener(temp); m28.addActionListener(temp);
m29.addActionListener(temp);
menu2.add(m21); menu2.add(m22); menu2.add(m23); menu2.add(m24);
menu2.add(m25); menu2.add(m26); menu2.add(m27); menu2.add(m28); menu2.add
(m29);
setLayout(new BorderLayout());
add(menu1,BorderLayout.WEST);
add(menu2,BorderLayout.SOUTH);
setSize(500,500);
}
public void setCurrentColor(Color tt){
clr=tt;
validate();
repaint();
}
public void setCurrentState(String stt){
stateString=stt;
System.out.println(stateString+"\t"+stt);
}
public void paint(Graphics g){
g.translate(60,5);
g.setColor(Color.red);
g.fillRect(x1 , y1 , x2, y2 );
g.setColor(clr);
g.fillRect((x1+10) , (y1+10) , x2-20, y2-20 );
g.setColor(Color.yellow);
g.fillOval(x1-3 , y1-3 , 6 , 6 );
g.fillOval(x2-3 , y2-3 , 6 , 6 );
g.drawString("("+x1+","+y1+")" , x1 , y1 );
g.drawString("("+x2+","+y2+")" , x2 , y2 );
g.drawLine(x1 , y1 , x2 , y2 );
g.setColor(Color.black);
g.drawRect(0 , 0 , 435 , 470 );
}
}
class CheckColor implements ActionListener{
Drow theGui;
public CheckColor(Drow curGui){
theGui=curGui;
}
public void actionPerformed(ActionEvent ae){
if(ae.getActionCommand().equals("Red")){
theGui.setCurrentColor(Color.red);
}
else if(ae.getActionCommand().equals("Orange")){
theGui.setCurrentColor(Color.orange);
}
else if(ae.getActionCommand().equals("Yellow")){
theGui.setCurrentColor(Color.yellow);
}
else if(ae.getActionCommand().equals("White")){
theGui.setCurrentColor(Color.white);
}
else if(ae.getActionCommand().equals("Green")){
theGui.setCurrentColor(Color.green);
}
else if(ae.getActionCommand().equals("Pink")){
theGui.setCurrentColor(Color.pink);
}
else if(ae.getActionCommand().equals("Blue")){
theGui.setCurrentColor(Color.blue);
}
else if(ae.getActionCommand().equals("Gray")){
theGui.setCurrentColor(Color.gray);
}
else if(ae.getActionCommand().equals("Black")){
theGui.setCurrentColor(Color.black);
System.out.println("got to BLACK");
}
-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?
else{
System.out.println("got to ELSE");
String stttr=ae.getActionCommand();
System.out.println("got to stttr=...");
theGui.setCurrentState(stttr);
System.out.println("got to theGui...");
}
-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?-?
}
}
-------------------------------------------------------------------------------
-------------------------------------*/
(Review ID: 106044)
======================================================================
Name: skT45625 Date: 06/13/2000
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.2.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
I receive the following error shortly after I call a C++
function from a Java class via a 'native' method. I have
a diagnostic 'printf' at the beginning of the C++ function
that successfully runs, but during my
'(*a_pJNIEnv).GetStringUTFChars( )' calls that follow, the
crash occurs.
HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
Error ID: 4F533F57494E13120E43505002D4
(Review ID: 106101)
======================================================================
Name: rlT66838 Date: 04/03/2000
java version "1.3.0rc2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc2-Y)
Java HotSpot(TM) Client VM (build 1.3.0rc2-Y, mixed mode)
D:\NYMAPP~1\infohole>java se.kaskware.infohole.gui.InfoHoleFrame
#
# An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code
# outside the VM.
# Program counter=0x5002598a
#
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
Code generating the fault:
=========================================
package se.kaskware.infohole.gui;
import java.awt.*;
import javax.swing.*;
public class InfoHoleFrame extends JFrame
{
ImageIcon newIcon, openIcon, saveIcon, cutIcon, copyIcon, pasteIcon,
aboutIcon;
public InfoHoleFrame()
{
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(400, 200);
}
protected InfoHoleFrame init()
{
initIcons();
setJMenuBar(createMenubar());
getContentPane().setLayout(new BorderLayout());
getContentPane().add(createToolbar(), "North");
getContentPane().add(createTextPane(), "Center");
getContentPane().add(createNotisPane(), "East");
return this;
}
JMenuBar createMenubar()
{
JMenuBar menubar = new JMenuBar();
menubar.add(new JMenu("File"));
menubar.add(new JMenu("Edit"));
menubar.add(new JMenu("View"));
menubar.add(new JMenu("Tools"));
menubar.add(Box.createHorizontalGlue());
menubar.add(new JMenu("Help"));
return menubar;
}
JToolBar createToolbar()
{
JToolBar toolbar = new JToolBar();
toolbar.add(new JButton(newIcon));
toolbar.add(new JButton(openIcon));
toolbar.addSeparator();
toolbar.add(new JButton(saveIcon));
return toolbar;
}
JComponent createTextPane()
{
JPanel pane = new JPanel(), selPane = new JPanel();
JScrollPane scrollPane;
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setBackground(Color.blue);
selPane.setLayout(new BoxLayout(selPane, BoxLayout.X_AXIS));
selPane.setPreferredSize(new Dimension(Integer.MAX_VALUE, 22));
selPane.setMaximumSize(selPane.getPreferredSize());
selPane.setAlignmentX(0);
selPane.add(new JRadioButton("1"));
selPane.add(new JRadioButton("2"));
selPane.add(new JRadioButton("3"));
pane.add(selPane);
scrollPane = new JScrollPane(pane,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
scrollPane.setPreferredSize(new Dimension(400, Integer.MAX_VALUE));
scrollPane.getViewport().setViewSize(scrollPane.getPreferredSize());
return scrollPane;
}
JComponent createNotisPane()
{
JPanel pane = new JPanel(), selPane = new JPanel();
JScrollPane scrollPane;
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setBackground(Color.red);
selPane.setLayout(new BoxLayout(selPane, BoxLayout.X_AXIS));
selPane.setPreferredSize(new Dimension(Integer.MAX_VALUE, 22));
selPane.setMaximumSize(selPane.getPreferredSize());
String tmp[] = {"Fakta", "Bakgrunder", "Personer", "Diverse"};
selPane.add(new JComboBox(tmp));
selPane.add(new JButton("A"));
selPane.add(new JButton("D"));
pane.add(selPane);
scrollPane = new JScrollPane(pane,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED,
ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setPreferredSize(new Dimension(150, Integer.MAX_VALUE));
scrollPane.setMinimumSize(scrollPane.getPreferredSize());
scrollPane.setMaximumSize(scrollPane.getPreferredSize());
scrollPane.getViewport().setViewSize(scrollPane.getPreferredSize());
return scrollPane;
}
void initIcons()
{
newIcon = new ImageIcon("images/new.gif");
openIcon = new ImageIcon("images/open.gif");
saveIcon = new ImageIcon("images/save.gif");
cutIcon = new ImageIcon("images/cut.gif");
copyIcon = new ImageIcon("images/copy.gif");
pasteIcon = new ImageIcon("images/paste.gif");
aboutIcon = new ImageIcon("images/about.gif");
}
public static void main(String args[])
{
JFrame frame = new InfoHoleFrame().init();
frame.setVisible(true);
}
}
(Review ID: 103202)
======================================================================
Name: skT45625 Date: 05/08/2000
"java version "1.3.0rc3
)Standard Edition (build 1.3.0rc3-Z ,Java(TM) 2 Runtime Environment
)mixed mode ,Java HotSpot(TM) Client VM (build 1.3.0rc3-Z
MY OS: Arabic Enabled win98
# HotSpot Virtual Machine Error,EXCEPTION_ACCESS_VIOLATION
# Error ID: 4F533F57494E13120E43505002D4
sample code:
public class BugTest {
public static void main(String[] args) {
BugTest bt = new BugTest();
bt.test(bt, "hello"); // works fine.
bt.test(bt, null); // HotSpot Exception
} // main()
public void test(Object ob, String methodName) {
try {
java.lang.reflect.Method method;
method = ob.getClass().getMethod(methodName, null);
method.invoke(ob, null);
} catch (Exception e) {
System.out.println("command not available: " + methodName);
System.out.println("Exception: " + e.getMessage());
};
} // test()
public void hello() {
System.out.println("hello");
} // hello()
} // class BugTest
(Review ID: 104576)
======================================================================
Name: skT45625 Date: 05/10/2000
C:\jdk13\bin>java -version
java version "1.3.0rc3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc3-Z)
Java HotSpot(TM) Client VM (build 1.3.0rc3-Z, mixed mode)
I tried to initialize a program twice from a property file and got these
errors. I made no change to the program, just ran 2 times in a row.
C:\jdk13\bin>java Editor01.Tester
#
# An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outsi
de the VM.
# Program counter=0x500236b9
#
C:\jdk13\bin>java Editor01.Tester
#
# An EXCEPTION_ACCESS_VIOLATION exception has been detected in native code outsi
de the VM.
# Program counter=0x500236b9
#
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
java.lang.NullPointerException
at sun.awt.windows.WComponentPeer.updateClient(Unknown Source)
at sun.awt.ScreenUpdater.run(Unknown Source)
java.lang.NullPointerException
at sun.awt.windows.WComponentPeer.updateClient(Unknown Source)
at sun.awt.ScreenUpdater.run(Unknown Source)
java.lang.NullPointerException
at sun.awt.windows.WComponentPeer.updateClient(Unknown Source)[
abnormal program termination
at sun.awt.ScreenUpdater.run(Unknown Source)
error occured during error reporting]
(Review ID: 104694)
======================================================================
Name: skT45625 Date: 05/18/2000
/*
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
After I execute the code at the bottom with the command line:
java RCircle 2 3409
I get:
#
# HotSpot Virtual Machine Error, EXCEPTION_STACK_OVERFLOW
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
I had an idea about something along the lines of "recursive, parametric object
definition" so I decided to write the below code for fun. If your not familiar
with parametric math, this class basically creates an n sided object using
cosine and sine. The limit as n --> infinity, the more "circleish" this object
gets. The input is as follows:
java RCircle [radius] [points to generate]
ex:
java RCircle 2 4
*/
// begin
import java.text.NumberFormat;
public class RCircle {
private static RCircle first;
private static double radius;
private static double inc;
private boolean isFirst;
private double x;
private double y;
private RCircle next;
public RCircle (double radius, double inc) {
first = this;
this.radius = radius;
this.inc = inc;
isFirst = true;
x = radius;
y = 0.0;
next = new RCircle (inc);
}
private RCircle (double time) {
x = (double) (radius * Math.cos(time));
y = (double) (radius * Math.sin(time));
if (about(x, radius, .0001) && about(y, 0.0, .0001))
next = first;
else
next = new RCircle (time + inc);
}
public RCircle getNext() {
return next;
}
public double getX() {
return x;
}
public double getY() {
return y;
}
public boolean isFirst() {
return isFirst;
}
public boolean about(double a, double b, double r) {
return (a + r > b && a - r < b);
}
public static void main(String[] args) {
NumberFormat nf = NumberFormat.getInstance();
nf.setMaximumFractionDigits(3);
RCircle r5 = new RCircle (
Double.parseDouble(args[0]),
2 * Math.PI / Double.parseDouble(args[1])
).getNext();
while (r5.isFirst() != true) {
System.out.println(
"(" + nf.format(r5.getX()) +
", " + nf.format(r5.getY()) + ")"
);
r5 = r5.getNext();
}
}
}
// end
(Review ID: 104969)
======================================================================
Name: rlT66838 Date: 05/30/2000
#
# HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Error ID: 4F533F57494E13120E43505002D4
#
abnormal program termination
/*
* Swing Version
*/
import java.io.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TextDemo extends JApplet implements ActionListener {
JTextField textField;
JTextArea textArea;
String newline = "\n";
//Hack to avoid annoying error message (1.1).
public TextDemo() {
getRootPane().putClientProperty("defeatSystemEventQueueCheck",
Boolean.TRUE);
}
public void init() {
textField = new JTextField(20);
textField.addActionListener(this);
textArea = new JTextArea(5, 20);
textArea.setEditable(false);
JScrollPane scrollPane = new JScrollPane(textArea,
JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
//Add Components to the Applet.
GridBagLayout gridBag = new GridBagLayout();
Container contentPane = getContentPane();
contentPane.setLayout(gridBag);
GridBagConstraints c = new GridBagConstraints();
c.gridwidth = GridBagConstraints.REMAINDER;
c.fill = GridBagConstraints.HORIZONTAL;
gridBag.setConstraints(textField, c);
contentPane.add(textField);
c.fill = GridBagConstraints.BOTH;
c.weightx = 1.0;
c.weighty = 1.0;
gridBag.setConstraints(scrollPane, c);
contentPane.add(scrollPane);
}
public void actionPerformed(ActionEvent evt) {
String text = textField.getText();
String stringToReverse2=textField.getText();
String stringToReverse=textField.getText();
String dataSource="http://63.78.197.40/cgi-bin/cgit.exe?test=+text";
try {
URL url = new URL(dataSource);
URLConnection connection = url.openConnection();
connection.setDoOutput(true);
PrintWriter out = new PrintWriter(
connection.getOutputStream());
out.println("string=" + stringToReverse);
out.close();
BufferedReader in = new BufferedReader(
new InputStreamReader(
connection.getInputStream()));
String inputLine;
stringToReverse2 = in.readLine();
in.close();
}
catch (MalformedURLException me) {
System.out.println("MalformedURLException: " + me);
}
catch (IOException ioe) {
System.out.println("IOException: " + ioe);
}
textArea.append(stringToReverse2 + newline);
textField.selectAll();
}
}
(Review ID: 105512)
======================================================================
Name: skT45625 Date: 06/12/2000
"java version "1.3.0
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
C:\My Documents\school\java\myProjects\120600>javac Drow.java
#
HotSpot Virtual Machine Error, EXCEPTION_ACCESS_VIOLATION #
Please report this error at #
http://java.sun.com/cgi-bin/bugreport.cgi #
#
Error ID: 4F533F57494E13120E43505002D4 #
#
abnormal program termination
>C:\My Documents\school\java\myProjects\120600
look for -?-?-... at bottom, change from "else if(...){..." to "else{..."
caused error message.
/* -----------------------------------------------------------------------------
---------------------------------------
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
public class Drow extends Applet{
int x1=50;
int y1=50;
int x2=150;
int y2=150;
String stateString;
Color clr;
CheckColor temp;
Panel menu1; Panel menu2; Panel menu3; Panel menu4; Panel menu5;
Button m11; Button m12; Button m13; Button m14; Button m15; Button
m16; Button m17;
Button m21; Button m22; Button m23; Button m24; Button m25; Button
m26; Button m27; Button m28; Button m29;
public void init(){
clr=Color.white;
stateString="Close";
menu1=new Panel();
temp=new CheckColor(this);
menu1.setLayout(new GridLayout(0,1));
m11=new Button("New"); m12=new Button("Rubber"); m13=new Button
("Line"); m14=new Button("Circle"); m15=new Button("Square"); /*--- m16=new
Button("Close"); ---*/ m17=new Button("Color");
menu1.add(m11); menu1.add(m12); menu1.add(m13); menu1.add(m14);
menu1.add(m15); /*--- menu1.add(m16); --*/ menu1.add(m17);
m16=new Button(stateString);
m16.addActionListener(temp);
menu1.add(m16);
menu2=new Panel();
menu2.setLayout(new GridLayout(1,0));
m21=new Button("Red"); m22=new Button("Orange"); m23=new Button
("Yellow"); m24=new Button("White"); m25=new Button("Green"); m26=new Button
("Pink"); m27=new Button("Blue"); m28=new Button("Gray"); m29=new Button
("Black");
m21.setBackground(Color.red); m22.setBackground(Color.orange);
m23.setBackground(Color.yellow); m24.setBackground(Color.white);
m25.setBackground(Color.green); m26.setBackground(Color.pink);
m27.setBackground(Color.blue); m28.setBackground(Color.gray);
m29.setBackground(Color.black);
- duplicates
-
JDK-4280606 Massive row or column header in JScrollPane crashes VM
-
- Closed
-