Index: /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java
===================================================================
--- /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 32162)
+++ /applications/editors/josm/plugins/cadastre-fr/src/cadastre_fr/CacheControl.java	(revision 32163)
@@ -20,4 +20,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.gui.util.GuiHelper;
 
 /**
@@ -156,5 +157,11 @@
         } catch (Exception ex) {
             Main.error(ex);
-            JOptionPane.showMessageDialog(Main.parent, tr("Error loading file.\nProbably an old version of the cache file."), tr("Error"), JOptionPane.ERROR_MESSAGE);
+            GuiHelper.runInEDTAndWait(new Runnable() {
+                @Override
+                public void run() {
+                    JOptionPane.showMessageDialog(Main.parent, tr("Error loading file.\nProbably an old version of the cache file."), 
+                            tr("Error"), JOptionPane.ERROR_MESSAGE);
+                }
+            });
             return false;
         }
