From 19598fa6d3aee7682d2752ef8f81b25a37bb6668 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Mon, 20 Nov 2017 17:41:45 +1100 Subject: [PATCH] monitor: Fix Windows 10 crash since Fall Creators Update Closes https://github.com/espressif/esp-idf/issues/1136 --- tools/idf_monitor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/idf_monitor.py b/tools/idf_monitor.py index e4a5ec4bd..49e2b74b8 100755 --- a/tools/idf_monitor.py +++ b/tools/idf_monitor.py @@ -559,7 +559,12 @@ if os.name == 'nt': self.output.write(self.matched) # not an ANSI color code, display verbatim self.matched = b'' else: - self.output.write(b) + try: + self.output.write(b) + except IOError: + # Windows 10 bug since the Fall Creators Update, sometimes writing to console randomly fails + # (but always succeeds the second time, it seems.) Ref https://github.com/espressif/esp-idf/issues/1136 + self.output.write(b) self.matched = b'' def flush(self):