This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
DISPLAY=whatever ant -f ide.ergonomics/build.xml clean netbeans -v produces java.lang.InternalError: Can't connect to X11 window server using 'whatever' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52) at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:131) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68) at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:89) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at java.awt.Toolkit$2.run(Toolkit.java:834) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826) at org.openide.util.ImageUtilities.ensureLoaded(ImageUtilities.java:529) at org.openide.util.ImageUtilities.doMergeImages(ImageUtilities.java:560) at org.openide.util.ImageUtilities.mergeImages(ImageUtilities.java:183) at org.netbeans.modules.ide.ergonomics.ant.IconResource.getInputStream(IconResource.java:77) at org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:372) at org.apache.tools.ant.taskdefs.Copy.doResourceOperations(Copy.java:888) at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:511) at org.netbeans.modules.ide.ergonomics.ant.ExtractLayer.execute(ExtractLayer.java:276) .... (It is OK if $DISPLAY is simply unset.) Probably ImageUtilities methods should be made to avoid loading the default toolkit or graphics environment if at all possible. Especially in this case, the error is silly because the image was simply loaded from disk using ImageIO; there is no reason to depend on the AWT toolkit at all.
I imagine IconResource could just use BufferedImage.get/setRGB methods to directly compute the overlay. (Not sure why the X display on the NB-Core-Build job suddenly became bad to begin with, but it shouldn't cause the regular build to fail. Likely would have broken C/V later.)
Various builds are now (randomly?) failing on deadlock because of this, e.g. http://deadlock.netbeans.org/hudson/job/profiler-main/417/consoleText .... Copying 34 resources to /hudson/workdir/jobs/profiler-main/workspace/ide.ergonomics/build/classes/org/netbeans/modules/ide/ergonomics/apisupport _X11TransSocketOpen: socket() failed for local _X11TransSocketOpenCOTSClient: Unable to open socket for local _X11TransOpen: transport open failed for local/deadlock.nbextras.org:11 Failed to build target: all-ide.ergonomics BUILD FAILED /hudson/workdir/jobs/profiler-main/workspace/nbbuild/build.xml:675: The following error occurred while executing this line: /hudson/workdir/jobs/profiler-main/workspace/nbbuild/build.xml:670: The following error occurred while executing this line: /hudson/workdir/jobs/profiler-main/workspace/nbbuild/build.xml:717: The following error occurred while executing this line: /hudson/workdir/jobs/profiler-main/workspace/ide.ergonomics/build.xml:110: The following error occurred while executing this line: /hudson/workdir/jobs/profiler-main/workspace/ide.ergonomics/build.xml:199: java.lang.InternalError: Can't connect to X11 window server using ':11' as the value of the DISPLAY variable. What the root problem is - why Toolkit.getDefaultToolkit fails in this environment - I have no idea. But it is worth at least checking whether fixing this issue would allow the build to continue and even pass C/V.
Created attachment 78069 [details] An attempt to do the merge manually using getRGB
The only open problem is that to find out that some pixel in BufferedImage is "empty". Open the ide.ergonomics/src/**/badge.png to see what it means "empty".
Fixing ide.ergonomics to do its own blending without IU.mI. Confirming that this makes the module build even with DISPLAY=broken. Leaving open in case we decide that IU.mI itself should be improved. core-main #c4902c16114f
Thanks for "packARGB(overARGB(unpackARGB(b), unpackARGB(m)))". I hope I will never need to touch that code.
Integrated into 'main-golden', will be available in build *200903120302* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/c4902c16114f User: Jesse Glick <jglick@netbeans.org> Log: #160063: implement alpha blending directly, without requiring java.awt.Toolkit.
I hope I won't either! It was a fun afternoon nonetheless.