JDK-8196509 : Linux UI applications broken by the build change for JDK-8196218
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 11
  • Priority: P1
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-01-31
  • Updated: 2018-03-14
  • Resolved: 2018-01-31
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b01Fixed
Related Reports
Relates :  
Relates :  
Description
With JDK-8196218, all UI applications on Linux (Ubuntu 16.04 LTS ) fail with the images build:

eg swingset2 :
build/linux-x86_64-normal-server-release/images/jdk/bin/java -jar ~/SwingSet2.jar 
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: native ops missing
	at java.desktop/sun.java2d.xr.XRSurfaceData.freeXSDOPicture(Native Method)
	at java.desktop/sun.java2d.xr.XRSurfaceData$XRWindowSurfaceData.invalidate(XRSurfaceData.java:583)
	at java.desktop/sun.awt.X11.XWindow.doValidateSurface(XWindow.java:1400)
	at java.desktop/sun.awt.X11.XWindow.validateSurface(XWindow.java:1389)
	at java.desktop/sun.awt.X11.XWindow.reshape(XWindow.java:1335)
	at java.desktop/sun.awt.X11.XContentWindow.reshape(XContentWindow.java:45)
	at java.desktop/sun.awt.X11.XWindow.reshape(XWindow.java:1316)

Comments
OK, thanks. The code path with the exception message comes from SurfaceData.c function GetSDOps: static SurfaceDataOps * GetSDOps(JNIEnv *env, jobject sData, jboolean callSetup) { SurfaceDataOps *ops; if (JNU_IsNull(env, sData)) { JNU_ThrowNullPointerException(env, "surfaceData"); return NULL; } ops = (SurfaceDataOps *)JNU_GetLongFieldAsPtr(env, sData, pDataID); if (ops == NULL) { if (!(*env)->ExceptionOccurred(env) && !(*env)->IsInstanceOf(env, sData, pNullSurfaceDataClass)) { if (!(*env)->GetBooleanField(env, sData, validID)) { SurfaceData_ThrowInvalidPipeException(env, "invalid data"); } else { JNU_ThrowNullPointerException(env, "native ops missing"); } } } else if (callSetup) { SurfaceData_InvokeSetup(env, ops); } return ops; } I need to get such a system to be able to reproduce this first. It's not readily available to me. Unfortunately, I'll be away for a while. I'll look at this again when I'm back.
31-01-2018

Ubuntu 16.04 LTS
31-01-2018

I cannot reproduce this so far on Fedora 27. SwingSet2.jar works fine for me. Same for FileChooserDemo.jar. What linux system is this?
31-01-2018

Actually I see it with an exploded build too .. Also since the exception is in finding xrender ops I tried -Dsun.java2d.xrender=false but that doesn't help. There's no exception printed (I guess it is caught somewhere) But the window is completely blank.
31-01-2018