Description
Angry IP Scanner 3.10.0 fails to start on Windows (both the portable ipscan-3.10.0-win.exe and the official ipscan-3.10.0-setup.exe installer with bundled Java 25). The main window fails to render with an UnsatisfiedLinkError because SWT's swt-gdip-win32-*.dll cannot be found.
Steps to reproduce
- Download
ipscan-3.10.0-win.exe (or install via ipscan-3.10.0-setup.exe) on Windows 10/11 x86_64
- Run it
- Application throws
SWTException / UnsatisfiedLinkError while drawing the main window and crashes
Error
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gdip-win32-4973r12 in java.library.path: ...
no swt-gdip-win32 in java.library.path: ...
no swt-gdip in java.library.path: ...
Can't load library: C:\Users.swt\lib\win32\x86_64\swt-gdip-win32-4973r12.dll
Can't load library: C:\Users.swt\lib\win32\x86_64\swt-gdip-win32.dll
Can't load library: C:\Users.swt\lib\win32\x86_64\swt-gdip.dll
)
at org.eclipse.swt.SWT.error(SWT.java:4934)
at org.eclipse.swt.SWT.error(SWT.java:4849)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4136)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at net.azib.ipscan.gui.GUI.showMainWindow(GUI.java:56)
at net.azib.ipscan.Main.main(Main.java:62)
Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
...
at org.eclipse.swt.internal.gdip.Gdip.(Gdip.java:21)
at org.eclipse.swt.internal.gdip.GdiplusStartupInput.(GdiplusStartupInput.java:25)
at org.eclipse.swt.graphics.Device.checkGDIP(Device.java:226)
at org.eclipse.swt.graphics.Transform.(Transform.java:144)
at org.eclipse.swt.graphics.Transform.(Transform.java:75)
at org.eclipse.swt.graphics.GC.drawImage(GC.java:1045)
at org.eclipse.swt.widgets.Label.wmDrawChildImage(Label.java:571)
...
Root cause
In build.gradle, the packaging step strips several native SWT libraries from the shaded jar as apparently-unused, including swt-gdip-*.dll:
https://github.com/angryip/ipscan/blob/master/build.gradle
'swt-awt-.dll',
'swt-wgl-.dll',
'swt-gdip-.dll',
'swt-webkit-.dll',
However, SWT 3.134.0 (org.eclipse.platform:org.eclipse.swt.win32.win32.x86_64:3.134.0) actually needs swt-gdip-win32-*.dll at runtime — GC.drawImage() internally creates a Transform, which requires GDI+ (Device.checkGDIP → Gdip.<clinit>), and that in turn needs the native swt-gdip-win32 JNI bridge. This is hit unconditionally while drawing a Label image in the main window, so every Windows x86_64 user hits this crash on startup.
Confirmed workaround
Manually extracting swt-gdip-win32-4973r12.dll from the official org.eclipse.swt.win32.win32.x86_64-3.134.0.jar on Maven Central and placing it into %USERPROFILE%\.swt\lib\win32\x86_64\ fixes the crash — the app starts and runs normally. This confirms the DLL is simply missing from the distributed exe/jar, not a system-specific issue.
Suggested fix
Remove swt-gdip-*.dll from the strip/exclude list in build.gradle so it's bundled in the Windows build, since it's actually required by this SWT version.
Environment
- ipscan 3.10.0 (win.exe and setup.exe, both reproduce)
- Windows 10, x86_64
- Reproduces with both system Java 21 (Corretto) and the bundled Java 25 (installer)
Description
Angry IP Scanner 3.10.0 fails to start on Windows (both the portable
ipscan-3.10.0-win.exeand the officialipscan-3.10.0-setup.exeinstaller with bundled Java 25). The main window fails to render with anUnsatisfiedLinkErrorbecause SWT'sswt-gdip-win32-*.dllcannot be found.Steps to reproduce
ipscan-3.10.0-win.exe(or install viaipscan-3.10.0-setup.exe) on Windows 10/11 x86_64SWTException/UnsatisfiedLinkErrorwhile drawing the main window and crashesError
org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gdip-win32-4973r12 in java.library.path: ...
no swt-gdip-win32 in java.library.path: ...
no swt-gdip in java.library.path: ...
Can't load library: C:\Users.swt\lib\win32\x86_64\swt-gdip-win32-4973r12.dll
Can't load library: C:\Users.swt\lib\win32\x86_64\swt-gdip-win32.dll
Can't load library: C:\Users.swt\lib\win32\x86_64\swt-gdip.dll
)
at org.eclipse.swt.SWT.error(SWT.java:4934)
at org.eclipse.swt.SWT.error(SWT.java:4849)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4136)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
at net.azib.ipscan.gui.GUI.showMainWindow(GUI.java:56)
at net.azib.ipscan.Main.main(Main.java:62)
Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
...
at org.eclipse.swt.internal.gdip.Gdip.(Gdip.java:21)
at org.eclipse.swt.internal.gdip.GdiplusStartupInput.(GdiplusStartupInput.java:25)
at org.eclipse.swt.graphics.Device.checkGDIP(Device.java:226)
at org.eclipse.swt.graphics.Transform.(Transform.java:144)
at org.eclipse.swt.graphics.Transform.(Transform.java:75)
at org.eclipse.swt.graphics.GC.drawImage(GC.java:1045)
at org.eclipse.swt.widgets.Label.wmDrawChildImage(Label.java:571)
...
Root cause
In
build.gradle, the packaging step strips several native SWT libraries from the shaded jar as apparently-unused, includingswt-gdip-*.dll:https://github.com/angryip/ipscan/blob/master/build.gradle
'swt-awt-.dll',
'swt-wgl-.dll',
'swt-gdip-.dll',
'swt-webkit-.dll',
However, SWT 3.134.0 (
org.eclipse.platform:org.eclipse.swt.win32.win32.x86_64:3.134.0) actually needsswt-gdip-win32-*.dllat runtime —GC.drawImage()internally creates aTransform, which requires GDI+ (Device.checkGDIP→Gdip.<clinit>), and that in turn needs the nativeswt-gdip-win32JNI bridge. This is hit unconditionally while drawing aLabelimage in the main window, so every Windows x86_64 user hits this crash on startup.Confirmed workaround
Manually extracting
swt-gdip-win32-4973r12.dllfrom the officialorg.eclipse.swt.win32.win32.x86_64-3.134.0.jaron Maven Central and placing it into%USERPROFILE%\.swt\lib\win32\x86_64\fixes the crash — the app starts and runs normally. This confirms the DLL is simply missing from the distributed exe/jar, not a system-specific issue.Suggested fix
Remove
swt-gdip-*.dllfrom the strip/exclude list inbuild.gradleso it's bundled in the Windows build, since it's actually required by this SWT version.Environment