JDK-8157213 : HiDPI support for Linux creates unnecessary dependency
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux
  • Submitted: 2016-05-18
  • Updated: 2016-05-19
  • Resolved: 2016-05-19
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 9
9Fixed
Related Reports
Relates :  
Description
The HiDPI support for Linux added calls to g_settings for the org.gnome.desktop.interface schema which may not exist on all desktops.  If the schema doesn't exist the gsettings module responds by aborting the process.

We should be scanning for the presence of this schema before attempting to query it to avoid the extreme exception handling of the gsettings API.
Comments
http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/9730dea92550
19-05-2016

The .01 version looks good. +1
19-05-2016

Updated webrev with a fixed default value: http://cr.openjdk.java.net/~flar/JDK-8157213/webrev-01/ I figured out how to remove a schema and was able to test it with the missing schema to see that Ensemble8 and a few DPI test programs launched OK. (Tested with the DEBUG code enabled to be sure it was not seeing the schema.)
18-05-2016

Sounds good. I can review / test it after you update (probably tomorrow).
18-05-2016

The developer who reported this on the javafx-dev list reports that this fails when the schema isn't defined (probably due to the fact that I used "-1" as the default value for a method that returns an unsigned value). I've asked the developer to confirm that changing the default to "0" will have the intended effect and I will update the webrev later this afternoon with that suggestion...
18-05-2016

+1
18-05-2016

This patch protects against missing data and modules in the following ways: - schema is queried by name first before it is used - even if the schema and key exist, if it returns a bad value (0 can be returned if no value was set for the key), a reasonable default is substituted instead - switch to using gdk_monitor_mm dimensions instead of the font-based gdk_screen_get_resolution - fall back to gdk_screen_mm dimensions in single monitor cases when the monitor mm are not available (the screen_mm calls are older than the monitor_mm calls and the former provided good data while the latter did not when I tested under the Gentoo LiveCD environment). - fall back to reasonable numbers if no "get_mm" calls are available http://cr.openjdk.java.net/~flar/JDK-8157213/webrev-00/
18-05-2016

Additional dependencies were discovered against the call to gdk_screen_get_resolution which may return bad data on some primitive desktops (0) and only provides one global value per system regardless of the number of monitors.
18-05-2016