Skip to content

VM crash when using the auto-scale method "smooth" #1805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fedejeanne opened this issue Feb 5, 2025 · 1 comment · Fixed by #1790
Closed

VM crash when using the auto-scale method "smooth" #1805

fedejeanne opened this issue Feb 5, 2025 · 1 comment · Fixed by #1790
Assignees
Labels
HiDPI Issues related to High resolution monitors

Comments

@fedejeanne
Copy link
Contributor

fedejeanne commented Feb 5, 2025

(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:

  1. Select the platform(s) on which the behavior is seen:
    • All OS
    • Windows
    • Linux
    • macOS
  1. Additional OS info (e.g. OS version, Linux Desktop, etc)

Seen on Windows 10 and Windows 11

  1. 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)

Image

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

@fedejeanne fedejeanne added HiDPI Issues related to High resolution monitors regression Something that used to work labels Feb 5, 2025
@fedejeanne fedejeanne self-assigned this Feb 5, 2025
@fedejeanne fedejeanne removed the regression Something that used to work label Feb 5, 2025
@fedejeanne
Copy link
Contributor Author

As mentioned in vi-eclipse/Eclipse-Platform#214 (comment), merging #1790 fixes this issue. I just tried it.

fyi @ShahzaibIbrahim , @akoch-yatta

@fedejeanne fedejeanne linked a pull request Feb 5, 2025 that will close this issue
HeikoKlare pushed a commit to vi-eclipse/eclipse.platform.swt that referenced this issue Feb 5, 2025


Image initialized as SWT.ICON in Image(Device, ImageData, ImageData)
loses its "Icon" properties, i.e. type, mask etc., when a handle for a
different zoom level is requested and "SMOOTH" scaling is used. This
change adapts the initialization of the image when the handle is
requested for image type SWT.ICON to preserve the properties.

Fixes eclipse-platform#1805
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HiDPI Issues related to High resolution monitors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant