From 06b56e7eb879b60ab8e55fcf79dd3fc79c4457dd Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Thu, 21 Apr 2016 21:48:10 +0100 Subject: [PATCH] R avoid hang on console messaging .. RInside is single threaded and hangs the event loop on the main thread (grrrr). --- src/Charts/RTool.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Charts/RTool.h b/src/Charts/RTool.h index 36ae45e90..13d2ce3b1 100644 --- a/src/Charts/RTool.h +++ b/src/Charts/RTool.h @@ -57,8 +57,9 @@ class RCallbacks : public Callbacks { // see inst/includes/Callbacks.h for a list of all overrideable methods virtual void WriteConsole(const std::string& line, int type) { //qDebug()<<"Console>>" <context && !rtool->starting) rtool->context->notifyRMessage(QString::fromStdString(line)); - else strings << QString::fromStdString(line); + //if (rtool && rtool->context && !rtool->starting) rtool->context->notifyRMessage(QString::fromStdString(line)); + //else strings << QString::fromStdString(line); + strings << QString::fromStdString(line); }; //virtual void ShowMessage(const char* message) {