Hi stackoverflow community,
I just started learning how to implement a gui in Java and run into an extremly weird problem on my Windows 10 Desktop. When I tried running my code, it compilied without errors, did nothing for about 5 seconds and then returned the following message:
Process finished with exit code -1073740791 (0xC0000409)
At first I thougt there is a problem with my code, but I couldn't find out what. While trying to find the error, I noticed that not even something as simple as
String test = JOptionPane.showInputDialog("test");
works anymore, although it worked just fine recently. Normal console output works fine, too, as older projects proved, it will just exit as soon as any kind of gui appears. I tried running the same code on my linux based laptop and it runs without a problem.
I decided to check the java tools, like java configurator and java info, but they don't start at all. The cursor changed into the loading symbol for 2 seconds, then nothing. Java mission control starts, but crashes as soon as I try to open a JMX console.
I deleted and reinstalled Java JDK and JRE (9.0.4) several times, tried using a different version, reinstalled IntelliJ, even reset Windows to an earlier system image, nothing changed.
The only real answers 3 hours of google searches yielded were something about a broken NVidia Driver (I use AMD, but still upgraded the driver, didn't help) and that this error code is a Windows error code for stack overflow. I tried increasing the memory heap and controlled memory usage by enabling the info bar, but that didn't help either.
After hours of trying to solve this problem, I would be really thankful for any help.
Thanks.
Edit: Per demand, an example (my original code):
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class PraedikatFrameH extends JFrame implements ActionListener{
private JTextField output;
private JButton palindrom_button;
public PraedikatFrameH(){
this.setTitle("Palindrom-Check");
this.setSize(200,300);
this.output= new JTextField(10);
this.palindrom_button=new JButton("Ist Array ein Palindrom?");
JPanel pButtonPanel = new JPanel();
pButtonPanel.add(this.palindrom_button);
JPanel outputPanel = new JPanel();
outputPanel.add(this.output);
Container palindromPane =this.getContentPane();
palindromPane.setLayout(new GridLayout(2,1));
palindromPane.add(pButtonPanel);
palindromPane.add(output);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void actionPerformed(ActionEvent e){
}
public void testJava(){
String test = JOptionPane.showInputDialog("test");
System.out.println(test);
}
}
And the console output:
"C:\Program Files\Java\jdk-9.0.4\bin\java" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.3\lib\idea_rt.jar=50931:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.3\bin" -Dfile.encoding=UTF-8 -classpath C:\Users\handm\IdeaProjects\inf_einf_uebung10\out\production\inf_einf_uebung10 PraedikatFrameHMain
Process finished with exit code -1073740791 (0xC0000409)
User contributions licensed under CC BY-SA 3.0