diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java
index 2562d2a0cb7881d5082219922dec5532d14746f9..f4f61fb5edcf57d2c3ffa6a1f4b517f9fd675de2 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/Utils.java
@@ -550,48 +550,58 @@ public final class Utils {
     }
 
     private static void dumpFrame(StringBuilder str, CallTarget callTarget, Frame frame, boolean printFrameSlots, boolean isVirtual) {
-        if (str.length() > 0) {
-            str.append("\n");
-        }
-        Frame unwrapped = RArguments.unwrap(frame);
-        if (!RArguments.isRFrame(unwrapped)) {
-            if (unwrapped.getArguments().length == 0) {
-                str.append("<empty frame>");
-            } else {
-                str.append("<unknown frame>");
-            }
-        } else {
-            if (callTarget.toString().equals("<promise>")) {
-                /* these have the same depth as the next frame, and add no useful info. */
-                return;
-            }
-            RCaller call = RArguments.getCall(unwrapped);
-            if (call != null) {
-                String callSrc = call.isValidCaller() ? RContext.getRRuntimeASTAccess().getCallerSource(call) : "<invalid call>";
-                int depth = RArguments.getDepth(unwrapped);
-                str.append("Frame(d=").append(depth).append("): ").append(callTarget).append(isVirtual ? " (virtual)" : "");
-                str.append(" (called as: ").append(callSrc).append(')');
+        try {
+            CompilerAsserts.neverPartOfCompilation();
+            if (str.length() > 0) {
+                str.append("\n");
             }
-            if (printFrameSlots) {
-                FrameDescriptor frameDescriptor = unwrapped.getFrameDescriptor();
-                for (FrameSlot s : frameDescriptor.getSlots()) {
-                    str.append("\n      ").append(s.getIdentifier()).append(" = ");
-                    Object value = unwrapped.getValue(s);
-                    try {
-                        if (value instanceof RAbstractContainer && ((RAbstractContainer) value).getLength() > 32) {
-                            str.append('<').append(value.getClass().getSimpleName()).append(" with ").append(((RAbstractContainer) value).getLength()).append(" elements>");
-                        } else {
-                            String text = String.valueOf(value);
-                            str.append(text.length() < 256 ? text : text.substring(0, 256) + "...");
+            Frame unwrapped = RArguments.unwrap(frame);
+            if (!RArguments.isRFrame(unwrapped)) {
+                if (unwrapped.getArguments().length == 0) {
+                    str.append("<empty frame>");
+                } else {
+                    str.append("<unknown frame>");
+                }
+            } else {
+                if (callTarget.toString().equals("<promise>")) {
+                    /* these have the same depth as the next frame, and add no useful info. */
+                    return;
+                }
+                RCaller call = RArguments.getCall(unwrapped);
+                if (call != null) {
+                    String callSrc = call.isValidCaller() ? RContext.getRRuntimeASTAccess().getCallerSource(call) : "<invalid call>";
+                    int depth = RArguments.getDepth(unwrapped);
+                    str.append("Frame(d=").append(depth).append("): ").append(callTarget).append(isVirtual ? " (virtual)" : "");
+                    str.append(" (called as: ").append(callSrc).append(')');
+                }
+                if (printFrameSlots) {
+                    FrameDescriptor frameDescriptor = unwrapped.getFrameDescriptor();
+                    for (FrameSlot s : frameDescriptor.getSlots()) {
+                        str.append("\n      ").append(s.getIdentifier()).append(" = ");
+                        Object value;
+                        try {
+                            value = unwrapped.getValue(s);
+                        } catch (Throwable t) {
+                            str.append("<exception ").append(t.getClass().getSimpleName()).append(" while acquiring slot ").append(s.getIdentifier()).append(">");
+                            continue;
+                        }
+                        try {
+                            if (value instanceof RAbstractContainer && ((RAbstractContainer) value).getLength() > 32) {
+                                str.append('<').append(value.getClass().getSimpleName()).append(" with ").append(((RAbstractContainer) value).getLength()).append(" elements>");
+                            } else {
+                                String text = String.valueOf(value);
+                                str.append(text.length() < 256 ? text : text.substring(0, 256) + "...");
+                            }
+                        } catch (Throwable t) {
+                            // RLanguage values may not react kindly to getLength() calls
+                            str.append("<exception ").append(t.getClass().getSimpleName()).append(" while printing value of type ").append(
+                                            value == null ? "null" : value.getClass().getSimpleName()).append('>');
                         }
-                    } catch (Throwable t) {
-                        // RLanguage values may not react kindly to getLength() calls
-                        str.append("<exception ").append(t.getClass().getSimpleName()).append(" while printing value of type ").append(
-                                        value == null ? "null" : value.getClass().getSimpleName()).append(
-                                                        '>');
                     }
                 }
             }
+        } catch (Throwable t) {
+            str.append("<exception ").append(t.getMessage()).append(" ").append(t.getClass().getSimpleName()).append("<");
         }
     }