diff --git a/src/org/openstreetmap/josm/gui/MapView.java b/src/org/openstreetmap/josm/gui/MapView.java
index da3079e..3f6a362 100644
--- a/src/org/openstreetmap/josm/gui/MapView.java
+++ b/src/org/openstreetmap/josm/gui/MapView.java
@@ -919,11 +919,61 @@ LayerManager.LayerChangeListener, MainLayerManager.ActiveLayerChangeListener {
 
         synchronized (temporaryLayers) {
             for (MapViewPaintable mvp : temporaryLayers) {
-                mvp.paint(tempG, this, box);
+                try {
+                    mvp.paint(tempG, this, box);
+                } catch (RuntimeException e) {
+                    throw BugReport.intercept(e).put("mvp", mvp);
+                }
             }
         }
 
         // draw world borders
+        try {
+            drawWorldBorders(tempG);
+        } catch (RuntimeException e) {
+            throw BugReport.intercept(e).put("bounds", () -> getProjection().getWorldBoundsLatLon());
+        }
+
+        if (Main.isDisplayingMapView() && Main.map.filterDialog != null) {
+            Main.map.filterDialog.drawOSDText(tempG);
+        }
+
+        if (playHeadMarker != null) {
+            playHeadMarker.paint(tempG, this);
+        }
+
+        try {
+            g.drawImage(offscreenBuffer, 0, 0, null);
+        } catch (ClassCastException e) {
+            // See #11002 and duplicate tickets. On Linux with Java >= 8 Many users face this error here:
+            //
+            // java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
+            //   at sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:145)
+            //   at sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:353)
+            //   at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:959)
+            //   at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:577)
+            //   at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:67)
+            //   at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1014)
+            //   at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:186)
+            //   at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3318)
+            //   at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3296)
+            //   at org.openstreetmap.josm.gui.MapView.paint(MapView.java:834)
+            //
+            // It seems to be this JDK bug, but Oracle does not seem to be fixing it:
+            // https://bugs.openjdk.java.net/browse/JDK-7172749
+            //
+            // According to bug reports it can happen for a variety of reasons such as:
+            // - long period of time
+            // - change of screen resolution
+            // - addition/removal of a secondary monitor
+            //
+            // But the application seems to work fine after, so let's just log the error
+            Main.error(e);
+        }
+        super.paint(g);
+    }
+
+    private void drawWorldBorders(Graphics2D tempG) {
         tempG.setColor(Color.WHITE);
         Bounds b = getProjection().getWorldBoundsLatLon();
         double lat = b.getMinLat();
@@ -966,44 +1016,6 @@ LayerManager.LayerChangeListener, MainLayerManager.ActiveLayerChangeListener {
         final Area viewport = new Area(new Rectangle(-1, -1, w + 2, h + 2));
         border.intersect(viewport);
         tempG.draw(border);
-
-        if (Main.isDisplayingMapView() && Main.map.filterDialog != null) {
-            Main.map.filterDialog.drawOSDText(tempG);
-        }
-
-        if (playHeadMarker != null) {
-            playHeadMarker.paint(tempG, this);
-        }
-
-        try {
-            g.drawImage(offscreenBuffer, 0, 0, null);
-        } catch (ClassCastException e) {
-            // See #11002 and duplicate tickets. On Linux with Java >= 8 Many users face this error here:
-            //
-            // java.lang.ClassCastException: sun.awt.image.BufImgSurfaceData cannot be cast to sun.java2d.xr.XRSurfaceData
-            //   at sun.java2d.xr.XRPMBlitLoops.cacheToTmpSurface(XRPMBlitLoops.java:145)
-            //   at sun.java2d.xr.XrSwToPMBlit.Blit(XRPMBlitLoops.java:353)
-            //   at sun.java2d.pipe.DrawImage.blitSurfaceData(DrawImage.java:959)
-            //   at sun.java2d.pipe.DrawImage.renderImageCopy(DrawImage.java:577)
-            //   at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:67)
-            //   at sun.java2d.pipe.DrawImage.copyImage(DrawImage.java:1014)
-            //   at sun.java2d.pipe.ValidatePipe.copyImage(ValidatePipe.java:186)
-            //   at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3318)
-            //   at sun.java2d.SunGraphics2D.drawImage(SunGraphics2D.java:3296)
-            //   at org.openstreetmap.josm.gui.MapView.paint(MapView.java:834)
-            //
-            // It seems to be this JDK bug, but Oracle does not seem to be fixing it:
-            // https://bugs.openjdk.java.net/browse/JDK-7172749
-            //
-            // According to bug reports it can happen for a variety of reasons such as:
-            // - long period of time
-            // - change of screen resolution
-            // - addition/removal of a secondary monitor
-            //
-            // But the application seems to work fine after, so let's just log the error
-            Main.error(e);
-        }
-        super.paint(g);
     }
 
     /**
diff --git a/src/org/openstreetmap/josm/gui/MapViewState.java b/src/org/openstreetmap/josm/gui/MapViewState.java
index 3167680..6202da0 100644
--- a/src/org/openstreetmap/josm/gui/MapViewState.java
+++ b/src/org/openstreetmap/josm/gui/MapViewState.java
@@ -17,6 +17,7 @@ import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.projection.Projection;
 import org.openstreetmap.josm.gui.download.DownloadDialog;
+import org.openstreetmap.josm.tools.bugreport.BugReport;
 
 /**
  * This class represents a state of the {@link MapView}.
@@ -96,7 +97,11 @@ public final class MapViewState {
             topLeftInWindow.y += component.getY();
             component = component.getParent();
         }
-        topLeftOnScreen = position.getLocationOnScreen();
+        try {
+            topLeftOnScreen = position.getLocationOnScreen();
+        } catch (RuntimeException e) {
+            throw BugReport.intercept(e).put("position", position).put("parent", () -> position.getParent());
+        }
     }
 
     private MapViewState(Projection projection, MapViewState mapViewState) {
diff --git a/src/org/openstreetmap/josm/tools/bugreport/BugReport.java b/src/org/openstreetmap/josm/tools/bugreport/BugReport.java
index f74af94..3bc055e 100644
--- a/src/org/openstreetmap/josm/tools/bugreport/BugReport.java
+++ b/src/org/openstreetmap/josm/tools/bugreport/BugReport.java
@@ -13,14 +13,15 @@ package org.openstreetmap.josm.tools.bugreport;
  * <p>
  * You should then add some debug information there. This can be the OSM ids that caused the error, information on the data you were working on
  * or other local variables. Make sure that no excpetions may occur while computing the values. It is best to send plain local variables to
- * put(...). Then simply throw the throwable you got from the bug report. The global exception handler will do the rest.
+ * put(...). If you need to do computations, put them into a lambda expression. Then simply throw the throwable you got from the bug report.
+ * The global exception handler will do the rest.
  * <pre>
  * int id = ...;
  * String tag = "...";
  * try {
  *   ... your code ...
  * } catch (Throwable t) {
- *   throw BugReport.intercept(t).put("id", id).put("tag", tag);
+ *   throw BugReport.intercept(t).put("id", id).put("tag", () -> x.getTag());
  * }
  * </pre>
  *
diff --git a/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java b/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java
index 1fe31ca..c0a79c5 100644
--- a/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java
+++ b/src/org/openstreetmap/josm/tools/bugreport/ReportedException.java
@@ -11,6 +11,7 @@ import java.util.LinkedList;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Set;
+import java.util.function.Supplier;
 
 import org.openstreetmap.josm.Main;
 
@@ -173,7 +174,7 @@ public class ReportedException extends RuntimeException {
     }
 
     /**
-     * Adds some debug values to this exception.
+     * Adds some debug values to this exception. The value is converted to a string. Errors during conversion are handled.
      *
      * @param key
      *            The key to add this for. Does not need to be unique but it would be nice.
@@ -182,8 +183,22 @@ public class ReportedException extends RuntimeException {
      * @return This exception for easy chaining.
      */
     public ReportedException put(String key, Object value) {
+        return put(key, () -> value);
+    }
+
+    /**
+     * Adds some debug values to this exception. This method automatically catches errors that occur during the production of the value.
+     *
+     * @param key
+     *            The key to add this for. Does not need to be unique but it would be nice.
+     * @param valueSupplier
+     *            A supplier that is called once to get the value.
+     * @return This exception for easy chaining.
+     */
+    public ReportedException put(String key, Supplier<Object> valueSupplier) {
         String string;
         try {
+            Object value = valueSupplier.get();
             if (value == null) {
                 string = "null";
             } else if (value instanceof Collection) {
