From 6481f921e3de8c5bc2e7d3578bd8370b8e48906a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Jyl=C3=A4nki?= Date: Mon, 1 Oct 2018 19:10:59 +0300 Subject: [PATCH] Highlight vc_dispmanx_snapshot() failure and link to bug trackers to how to recover. https://github.com/raspberrypi/userland/issues/461 https://github.com/juj/fbcp-ili9341/issues/28 --- gpu.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gpu.cpp b/gpu.cpp index 68a6586..dc62bfe 100644 --- a/gpu.cpp +++ b/gpu.cpp @@ -123,7 +123,8 @@ bool SnapshotFramebuffer(uint16_t *destination) int failed = vc_dispmanx_snapshot(display, screen_resource, (DISPMANX_TRANSFORM_T)0); if (failed) { - printf("vc_dispmanx_snapshot() failed with return code %d!\n", failed); + // We cannot do much better here (or do not know what to do), it looks like if vc_dispmanx_snapshot() fails once, it will crash if attempted to be called again, and it will not recover. We can only terminate here. Sad :/ + printf("vc_dispmanx_snapshot() failed with return code %d! If this appears related to a change in HDMI/display resolution, see https://github.com/juj/fbcp-ili9341/issues/28 and https://github.com/raspberrypi/userland/issues/461 (try setting fbcp-ili9341 up as an infinitely restarting system service to recover)\n", failed); MarkProgramQuitting(); return false; }