Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Workaround headless test failure on Windows OS
For headless test task, 'prism.order' property is used to choose the graph renderer to use. Currently, we specify this property to be 'sw'. However, this property triggers a bug of openjdk-jfx with headless mode [1]. This property will cause Java Runtime Error for Windows OS including AppVeyor: # A fatal error has been detected by the Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd95b64879, pid=1476, tid=2640 # # JRE version: OpenJDK Runtime Environment (11.0.1+13) (build 11.0.1+13) # Java VM: OpenJDK 64-Bit Server VM (11.0.1+13, mixed mode, tiered, compressed oops, g1 gc, windows-amd64) # Problematic frame: # C [javafx_font.dll+0x4879] This bug has been identified and will be fixed in future release [2]. There is a workaround suggested which adds static initialization blocks to load required library before any FxToolkit code [3]. Java will initialize base classes first before classes of instance members [4] [5]. For all GUI tests, they uses GuiUnitTest or AddressBookSystemTest as their base class. Let's add the static initialization blocks to these two classes to solve the problem. [1] javafxports/openjdk-jfx#66 [2] javafxports/openjdk-jfx#66 (comment) [3] javafxports/openjdk-jfx#66 (comment) [4] https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.4 [5] https://docs.oracle.com/javase/specs/jls/se8/html/jls-12.html#jls-12.5
- Loading branch information