Skip to content

Commit 2d8a27f

Browse files
committed
8323545: java/awt/GraphicsDevice/CheckDisplayModes.java fails with "exit code: 133"
This test fails intermittently and i am adding debug output to understand at least what graphics device is connected and which graphics mode gives us problem.
1 parent 1bd5c5d commit 2d8a27f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

test/jdk/java/awt/GraphicsDevice/CheckDisplayModes.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -35,18 +35,28 @@ public class CheckDisplayModes {
3535

3636
public static void main(String[] args) {
3737
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
38+
for (GraphicsDevice gd : ge.getScreenDevices()) {
39+
System.out.println("Available screen device: " + gd.getIDstring());
40+
}
41+
3842
for (GraphicsDevice graphicDevice : ge.getScreenDevices()) {
43+
System.out.println("On screen device " + graphicDevice.getIDstring());
3944
if (!graphicDevice.isDisplayChangeSupported()) {
4045
System.err.println("Display mode change is not supported on this host. Test is considered passed.");
4146
continue;
4247
}
4348
DisplayMode defaultDisplayMode = graphicDevice.getDisplayMode();
49+
System.out.println("Default display mode: " + defaultDisplayMode);
4450
checkDisplayMode(defaultDisplayMode);
4551
graphicDevice.setDisplayMode(defaultDisplayMode);
4652

4753
DisplayMode[] displayModes = graphicDevice.getDisplayModes();
54+
for (int i = 0; i < displayModes.length; i++) {
55+
System.out.println("displayModes[" + i + "] = " + displayModes[i]);
56+
}
4857
boolean isDefaultDisplayModeIncluded = false;
4958
for (DisplayMode displayMode : displayModes) {
59+
System.out.println("Attempting display mode " + displayMode);
5060
checkDisplayMode(displayMode);
5161
graphicDevice.setDisplayMode(displayMode);
5262
if (defaultDisplayMode.equals(displayMode)) {

0 commit comments

Comments
 (0)