问题
I have an industrial PC with an Intel Atom D2550 1.86 GHz CPU, its embedded graphics adapter and 4 Gb RAM running Windows 7 (32 bit) and when I run a Java program on this computer I get a Java(TM) Platform SE binary has stopped working (Problem Event Name BEX and Fault Module Name StackHash_2264).
I have tried both Java8 and Java7 with the same results. I have tried with both just JRE installed, and with a full JDK installed on this machine.
The same Java applicaton works well on this PC if I use Ubuntu 14.10 instead.
A small Hello World application works well, and using a lot of trial and error I could determine that the error occurs when I use a JTable with content. Using a JTable without content is ok though.
This application works:
import javax.swing.*;
import java.awt.*;
public class Test {
public static void main(String[] args) {
JFrame f = new JFrame();
f.setLayout(new BorderLayout());
f.add(new JScrollPane(new JTable(), BorderLayout.CENTER);
f.pack();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
}
And this application causes the JVM crash:
import javax.swing.*;
import java.awt.*;
public class Test {
public static void main(String[] args) {
JFrame f = new JFrame();
f.setLayout(new BorderLayout());
f.add(new JScrollPane(new JTable(new String[][] { { "1", "2", "3" }, { "1", "2", "3" } }, new String[] {"A", "B", "C" })), BorderLayout.CENTER);
f.pack();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
}
I have Googled a lot on this issue without any success. The only tip I found was to disable DEP for the application causing the error, but Windows won't let me disable DEP for java.exe.
I have more crash dumps if it would help anyone, just let me know what you need.
来源:https://stackoverflow.com/questions/29844086/jvm-crash-when-using-jtable