-
Bug
-
Resolution: Fixed
-
P3
-
10, 11, 12
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8232699 | 11.0.6-oracle | Sergey Bylokhov | P3 | Resolved | Fixed | b02 |
JDK-8234282 | 11.0.6 | Sergey Bylokhov | P3 | Resolved | Fixed | b04 |
ADDITIONAL SYSTEM INFORMATION :
Max OS X/Java 11.0.1
A DESCRIPTION OF THE PROBLEM :
The "siblingsComparator" in sun.lwawt.macosx.CPlatformWindow violates the contract if one of the windows is not visible and therefore has no peer:
private final Comparator<Window> siblingsComparator = (w1, w2) -> {
if (w1 == w2) {
return 0;
}
ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
Object p1 = componentAccessor.getPeer(w1);
Object p2 = componentAccessor.getPeer(w2);
if (p1 instanceof LWWindowPeer && p2 instanceof LWWindowPeer) {
return Long.compare(
((CPlatformWindow) (((LWWindowPeer) p1).getPlatformWindow())).lastBecomeMainTime,
((CPlatformWindow) (((LWWindowPeer) p2).getPlatformWindow())).lastBecomeMainTime);
}
return 0;
};
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.base/java.util.TimSort.mergeHi(TimSort.java:903)
at java.base/java.util.TimSort.mergeAt(TimSort.java:520)
at java.base/java.util.TimSort.mergeForceCollapse(TimSort.java:461)
at java.base/java.util.TimSort.sort(TimSort.java:254)
at java.base/java.util.Arrays.sort(Arrays.java:1441)
at java.desktop/sun.lwawt.macosx.CPlatformWindow.orderAboveSiblingsImpl(CPlatformWindow.java:1227)
at java.desktop/sun.lwawt.macosx.CPlatformWindow.orderAboveSiblings(CPlatformWindow.java:1218)
at java.desktop/sun.lwawt.macosx.CPlatformWindow.checkBlockingAndOrder(CPlatformWindow.java:1168)
at java.desktop/sun.lwawt.macosx.CPlatformWindow.setModalBlocked(CPlatformWindow.java:973)
at java.desktop/sun.lwawt.LWWindowPeer.setModalBlocked(LWWindowPeer.java:461)
at java.desktop/sun.lwawt.LWWindowPeer.blockWindows(LWWindowPeer.java:652)
FREQUENCY : occasionally
Max OS X/Java 11.0.1
A DESCRIPTION OF THE PROBLEM :
The "siblingsComparator" in sun.lwawt.macosx.CPlatformWindow violates the contract if one of the windows is not visible and therefore has no peer:
private final Comparator<Window> siblingsComparator = (w1, w2) -> {
if (w1 == w2) {
return 0;
}
ComponentAccessor componentAccessor = AWTAccessor.getComponentAccessor();
Object p1 = componentAccessor.getPeer(w1);
Object p2 = componentAccessor.getPeer(w2);
if (p1 instanceof LWWindowPeer && p2 instanceof LWWindowPeer) {
return Long.compare(
((CPlatformWindow) (((LWWindowPeer) p1).getPlatformWindow())).lastBecomeMainTime,
((CPlatformWindow) (((LWWindowPeer) p2).getPlatformWindow())).lastBecomeMainTime);
}
return 0;
};
java.lang.IllegalArgumentException: Comparison method violates its general contract!
at java.base/java.util.TimSort.mergeHi(TimSort.java:903)
at java.base/java.util.TimSort.mergeAt(TimSort.java:520)
at java.base/java.util.TimSort.mergeForceCollapse(TimSort.java:461)
at java.base/java.util.TimSort.sort(TimSort.java:254)
at java.base/java.util.Arrays.sort(Arrays.java:1441)
at java.desktop/sun.lwawt.macosx.CPlatformWindow.orderAboveSiblingsImpl(CPlatformWindow.java:1227)
at java.desktop/sun.lwawt.macosx.CPlatformWindow.orderAboveSiblings(CPlatformWindow.java:1218)
at java.desktop/sun.lwawt.macosx.CPlatformWindow.checkBlockingAndOrder(CPlatformWindow.java:1168)
at java.desktop/sun.lwawt.macosx.CPlatformWindow.setModalBlocked(CPlatformWindow.java:973)
at java.desktop/sun.lwawt.LWWindowPeer.setModalBlocked(LWWindowPeer.java:461)
at java.desktop/sun.lwawt.LWWindowPeer.blockWindows(LWWindowPeer.java:652)
FREQUENCY : occasionally
- backported by
-
JDK-8232699 IllegalArgumentException in sun.lwawt.macosx.CPlatformWindow
-
- Resolved
-
-
JDK-8234282 IllegalArgumentException in sun.lwawt.macosx.CPlatformWindow
-
- Resolved
-
- relates to
-
JDK-8190230 [macosx] Order of overlapping of modal dialogs is wrong
-
- Resolved
-
- links to