Bug 528968 - [Wayland] JVM crashes when running JUnit tests on Wayland
Summary: [Wayland] JVM crashes when running JUnit tests on Wayland
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.8 M5   Edit
Assignee: Eric Williams CLA
QA Contact:
URL:
Whiteboard:
Keywords: triaged
Depends on:
Blocks: swtWaylandTracker48
  Show dependency tree
 
Reported: 2017-12-19 11:49 EST by Eric Williams CLA
Modified: 2018-05-29 05:18 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Williams CLA 2017-12-19 11:49:44 EST
Running the SWT JUnit tests on Wayland crashes the JVM, as the library used to take screenshots uses X11 specific calls. The stack trace is below:

j  sun.awt.X11.XRobotPeer.getRGBPixelsImpl(Lsun/awt/X11GraphicsConfig;IIII[I)V+0
j  sun.awt.X11.XRobotPeer.getRGBPixels(Ljava/awt/Rectangle;)[I+33
j  java.awt.Robot.createScreenCapture(Ljava/awt/Rectangle;)Ljava/awt/image/BufferedImage;+50
j  org.eclipse.test.internal.AwtScreenshot.main([Ljava/lang/String;)V+32

IMO we shouldn't have a dependency on outside libraries in the SWT testing project, but if we must then these two calls should be guarded against Wayland somehow.
Comment 1 Leo Ufimtsev CLA 2017-12-19 11:56:54 EST
(In reply to Eric Williams from comment #0)
> Running the SWT JUnit tests on Wayland crashes the JVM, as the library used
> to take screenshots uses X11 specific calls. The stack trace is below:
> 
> j 
> sun.awt.X11.XRobotPeer.getRGBPixelsImpl(Lsun/awt/X11GraphicsConfig;IIII[I)V+0
> j  sun.awt.X11.XRobotPeer.getRGBPixels(Ljava/awt/Rectangle;)[I+33
> j 
> java.awt.Robot.createScreenCapture(Ljava/awt/Rectangle;)Ljava/awt/image/
> BufferedImage;+50
> j  org.eclipse.test.internal.AwtScreenshot.main([Ljava/lang/String;)V+32
> 
> IMO we shouldn't have a dependency on outside libraries in the SWT testing
> project, but if we must then these two calls should be guarded against
> Wayland somehow.

+1. (voting feature not working atm).
Comment 2 Eclipse Genie CLA 2017-12-19 12:54:43 EST
New Gerrit change created: https://git.eclipse.org/r/114440
Comment 4 Eric Williams CLA 2017-12-22 09:03:17 EST
(In reply to Eclipse Genie from comment #3)
> Gerrit change https://git.eclipse.org/r/114440 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=9913c5a1d7242c20e4a6f4f111e4d54e5569991f

Fix is in master now.
Comment 5 Eric Williams CLA 2018-01-23 11:04:58 EST
Verified in I20180122-2000.