Running Swing application from IDE fails with exit code -1073740791, but starts from JAR artifact
Answered
Hello,
I have a following problem with IDEA.
When I run my Swing application from IDE, there is a message saying "Process finished with exit code -1073740791 (0xC0000409)".
Suprisingly, when I created a jar artifact, rebuilt the project module and then run the jar from outside the IDE, everything worked and application started.
Maybe this could be an issue with IDEA.
Now I use IntelliJ IDEA 2016.3.4 and Oracle JDK 1.8.0 u121.
I have tried IDEA 2016.3.3 and JDK 1.8.0 u111 and u112 and there was the same problem.
Thanks in advance for your help. Greetings.
Please sign in to leave a comment.
In my case application starts and works fine but after I close the application Windows shows me the crash dialog for "Java(TM) Platform SE binary" and error code is shown in IDEA console:
Process finished with exit code -1073741819 (0xC0000005)
idea.log is clean and IDEA itself seems fine.
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
Forgot to mention that my app is Java FX based.
This could be related to NVIDIA driver update: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000060510-Process-finished-with-exit-code-1073740791-0xC0000409-JavaFX-Application.
Very same application launched from command line like "java -jar ..." works fine. I'm not sure that downgrading video driver to make IDE work is a good idea.
Please give it a try.
So I tried to test things connected with graphics drivers. I have Nvidia GTX 960M laptop card.
I removed the newest Nvidia driver, restarted the system and waited for default Microsoft driver to install automatically.
After starting Intellij IDEA version 2016.3.4 I ran my program. IDEA console displayed and GUI showed. After finishing the program application returned exit code 0 and so everything went correctly.
Maybe Nvidia should correct this mistake in further driver releases, because it is always good to have the latest drivers, and sometimes I play games.
Thanks for the information.
I have some additional information, if you want to use a bit newer driver than the default one from Microsoft.
The newest driver from Nvidia is 378.49. With this driver running Swing applications from IDEA will cause the problem.
I went through few drivers and it seems that the last one which works fine is 376.33 (it is a release just before the newest one, so not to old).
So the best solution by now is to install this driver (376.33) and wait for a new correct release. To avoid auto updating, you can install the main driver and physx software only (without experience software).
Downgrading to 376.33 is exactly what is suggested in the thread I've linked above.
OK! I didn't notice, thanks.
Nvidia Geforce 378.57 Hot Fix Drivers:
- Fixed crash in Minecraft and some other Java-based titles
http://www.guru3d.com/files-details/geforce-378-57-hotfix-driver-download.html
Hello,
There is a new version of the Nvidia driver (378.66).
Comparing to the driver form guru3d - you have the driver from original vendor and with newest fixes. :)
I have tested this version on my laptop (with GeForce GTX 960M).
On IntelliJ IDEA 2016.3.4 with a Swing application: it starts, works and finishes with exit code 0 on the environment console.
It seems to be ok now.
Here is what Nvidia changed since the buggy (378.49) version of their driver:
(taken from http://us.download.nvidia.com/Windows/378.66/378.66-win10-win8-win7-notebook-release-notes.pdf, page 15)
[Minecraft]: Java SE Binary crashes pointing to nvinitx.dll. [200274582]