From d2806c0da04e09ac8c5cde656f454a961336c7f1 Mon Sep 17 00:00:00 2001 From: Alexander Biggs Date: Mon, 22 Aug 2022 16:11:29 +0000 Subject: [PATCH] [fuchsia] Document `found != flatland_views.end()`. This crash has come up a number of times and we tend to burn time looking in the wrong places for the fix. Documenting some stuff about how we've fixed it previously in the error message. --- .../fuchsia/flutter/flatland_external_view_embedder.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc b/shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc index 54d91c1fe8a8e..41049c39fa839 100644 --- a/shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc +++ b/shell/platform/fuchsia/flutter/flatland_external_view_embedder.cc @@ -184,7 +184,14 @@ void FlatlandExternalViewEmbedder::SubmitFrame( // Get the FlatlandView structure corresponding to the platform view. auto found = flatland_views_.find(layer_id.value()); - FML_CHECK(found != flatland_views_.end()); + FML_CHECK(found != flatland_views_.end()) + << "No FlatlandView for layer_id = " << layer_id.value() + << ". This typically indicates that the Dart code in " + "Fuchsia's fuchsia_scenic_flutter library failed to create " + "the platform view, leading to a crash later down the road in " + "the Flutter Engine code that tries to find that platform view. " + "Check the Flutter Framework for changes to PlatformView that " + "might have caused a regression."; auto& viewport = found->second; // Compute mutators, and size for the platform view.