Skip to content

NPE in GC: Cannot read field "nativeZoom" because "this.data" is null #2162

@ptziegler

Description

@ptziegler

I haven't found a small reproducer yet, but the problem occurs when opening and closing one of our dialogs via the context menu.

Caused by: java.lang.NullPointerException: Cannot read field "nativeZoom" because "this.data" is null
	at org.eclipse.swt.graphics.GC.getZoom(GC.java:5139)
	at org.eclipse.swt.graphics.GC.drawImage(GC.java:934)
	at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:1656)
	at org.eclipse.swt.widgets.Control.windowProc(Control.java:4835)
	at org.eclipse.swt.widgets.Canvas.windowProc(Canvas.java:336)
	at org.eclipse.swt.widgets.Display.windowProc(Display.java:5106)
	at org.eclipse.swt.internal.win32.OS.RedrawWindow(Native Method)
	at org.eclipse.swt.widgets.Control.update(Control.java:4615)
	at org.eclipse.swt.widgets.Display.update(Display.java:5076)
	at org.eclipse.jface.window.Window.runEventLoop(Window.java:830)
	at org.eclipse.jface.window.Window.open(Window.java:799)

Tested with org.eclipse.swt.win32.win32.x86_64 3.130.0.v20250507-1813

Metadata

Metadata

Assignees

Labels

WindowsHappens on Windows OSregressionSomething that used to work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions