Index: /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarker.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarker.java	(revision 18633)
+++ /trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarker.java	(revision 18634)
@@ -5,4 +5,5 @@
 
 import java.awt.event.ActionEvent;
+import java.io.UncheckedIOException;
 import java.net.URI;
 import java.net.URISyntaxException;
@@ -67,5 +68,9 @@
         } catch (URISyntaxException e) {
             Logging.trace(e);
-            new Notification(tr("Malformed URI: ", this.imageUrl.toExternalForm())).setIcon(JOptionPane.WARNING_MESSAGE).show();
+            new Notification(tr("Malformed URI: {0}", this.imageUrl.toExternalForm())).setIcon(JOptionPane.WARNING_MESSAGE).show();
+        } catch (UncheckedIOException e) {
+            Logging.trace(e);
+            new Notification(tr("IO Exception: {0}\n{1}", this.imageUrl.toExternalForm(), e.getCause().getMessage()))
+                    .setIcon(JOptionPane.WARNING_MESSAGE).show();
         }
         return null;
Index: /trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarkerTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarkerTest.java	(revision 18633)
+++ /trunk/test/unit/org/openstreetmap/josm/gui/layer/markerlayer/ImageMarkerTest.java	(revision 18634)
@@ -2,4 +2,5 @@
 package org.openstreetmap.josm.gui.layer.markerlayer;
 
+import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
@@ -40,3 +41,16 @@
         assertEquals(LatLon.ZERO, wpt.getCoor());
     }
+
+    /**
+     * Non-regression test for #22638: NoSuchFileException causes a crash
+     */
+    @Test
+    void testTicket22638() throws MalformedURLException {
+        ImageMarker marker = new ImageMarker(
+                LatLon.ZERO,
+                new File(TestUtils.getRegressionDataFile(12255, "no_such.jpg")).toURI().toURL(),
+                new MarkerLayer(new GpxData(), null, null, null),
+                1d, 2d);
+        assertDoesNotThrow(() -> marker.actionPerformed(null));
+    }
 }
