3D and Cross-Plot Module Suite Configuration

When you develop with INTViewer, you will experience the following dialog when you open a 3D window or a Cross-Plot window:

The stack trace will look like this:

java.lang.NullPointerException
at sun.java2d.SunGraphics2D.validateColor(SunGraphics2D.java:1697)
at sun.java2d.SunGraphics2D.<init>(SunGraphics2D.java:255)
at sun.java2d.d3d.D3DScreenUpdateManager.validate(D3DScreenUpdateManager.java:491)
at sun.java2d.d3d.D3DScreenUpdateManager.createGraphics(D3DScreenUpdateManager.java:265)
at sun.awt.windows.WComponentPeer.getGraphics(WComponentPeer.java:603)
at java.awt.Component.getGraphics(Component.java:3027)
at sun.awt.RepaintArea.paint(RepaintArea.java:227)
at sun.awt.windows.WComponentPeer.handleEvent(WComponentPeer.java:347)
at java.awt.Component.dispatchEventImpl(Component.java:4948)
at java.awt.Component.dispatchEvent(Component.java:4698)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.awt.EventQueue$4.run(EventQueue.java:720)
at java.awt.EventQueue$4.run(EventQueue.java:718)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:717)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)

This error is due to an incompatibility between the OpenGL rendering and the Java2D rendering. This error only occurs in development as INTViewer is configured in the etc/intviewer.conf file to disable 2D rendering for 3D and Cross-Plot windows.

This etc/intviewer.conf configuration file is not read when developing with INTViewer, only when running the standard INTViewer distribution. When you develop your own plugin, you need to set the properties of your module suite.

Typically, the platform.properties file of your module suite should contain the following run.args.extra line:

run.args.extra=-J-Djogl.disable.opengles=true -J-Dnb.winsys.sliding.effects=true -J-Dsun.java2d.noddraw=true -J-Dnetbeans.indexing.noFileRefresh=true -J-da -J-Djava.util.logging.config.file=${progdir}/../intlogging.properties -J-Xms600M -J-Xmx3G -J-Duser.language=en -J-Duser.country=US

This run.args.extra line can only be configured in module suites, not standalone modules. When you create a "real world" INTViewer project, make sure to create a module suite so that you have control over this property, as well as others such as the memory requirements.