Description
(Initially reported in vi-eclipse/Eclipse-Platform#214)
Describe the bug
(Maybe a bigger issue was uncovered by #1736).
The VM crashes when moving a window between two monitors with different zoom levels and auto-scaling in active.
To Reproduce
- 125% monitor on the left (primary)
- 200% monitor on the right
- Start the
ControlExample
with the following VM parameters:
-Dswt.autoScale=quarter
-Dswt.autoScale.updateOnRuntime=true
- Drag the application window back and forth between monitors as quick as possible.
This crash then occurs:
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffbc5136e4d, pid=48724, tid=40368
#
# JRE version: OpenJDK Runtime Environment (23.0.1+11) (build 23.0.1+11-39)
# Java VM: OpenJDK 64-Bit Server VM (23.0.1+11-39, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, windows-amd64)
# Problematic frame:
# C [swt-win32-4968r4.dll+0x76e4d]
#
# No core dump will be written. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\akoch\eclipse\platform-sdk\git\eclipse.platform.swt\examples\org.eclipse.swt.examples\hs_err_pid48724.log
[21.190s][warning][os] Loading hsdis library failed
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
[0124/102633.433:ERROR:window_impl.cc(121)] Failed to unregister class Chrome_WidgetWin_0. Error = 1412
Expected behavior
The VM shouldn't crash.
Environment:
- Select the platform(s) on which the behavior is seen:
-
- All OS
-
- Windows
-
- Linux
-
- macOS
- Additional OS info (e.g. OS version, Linux Desktop, etc)
Seen on Windows 10 and Windows 11
- JRE/JDK version
openjdk version "17.0.13" 2024-10-15
OpenJDK Runtime Environment Temurin-17.0.13+11 (build 17.0.13+11)
OpenJDK 64-Bit Server VM Temurin-17.0.13+11 (build 17.0.13+11, mixed mode, sharing)
Version since
4.35 (I-BUILD 20250121-1800 according to the tags)
Workaround
None
Additional context
I initially thought that the error was because of the (unintended) switching between auto-scale method NEAREST
to SMOOTH
when dragging the window to the other monitor, but it turns out it crashes even when the auto-scale method is SMOOTH
from the very beginning. this is why I changed the details in To reproduce so that the mode is always SMOOTH