Oracle SQL Developer Randomly Closes

I recently had a situation that running either Oracle SQL Developer or SQL Developer Data Modeler on a Windows 7 VM (more on this later) would randomly close (or crash depending on how you look at it). The log files didn’t produce anything substantial and after a lot of digging around it was due to the JVM and the video driver. Jeff Smith confirmed this over Twitter:

I was using windows on a VM and it had no available video driver updates. After reading this post on StackOverflow I found there is a configuration setting to get around the issue. It wasn’t very clear as to where to make the configuration change so here it is:

  1. Modify datamodeler\ide\bin\jdk.conf
  2. Add AddVMOption -Dsun.awt.nopixfmt=true on a new line after AddVMOption -Dsun.java2d.noddraw=true
  3. Restart the application

A few additional notes:

  1. The versions I downloaded included the JDK. If you’re using your own JDK then the location of jdk.conf will probably be different.
  2. If you’re using the included JDK version then you’ll need to remember to do this step with each update of the applications.