summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/debugger/logwindow.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/debugger/logwindow.cpp b/src/plugins/debugger/logwindow.cpp
index e671709161..1c5d9fd487 100644
--- a/src/plugins/debugger/logwindow.cpp
+++ b/src/plugins/debugger/logwindow.cpp
@@ -552,8 +552,14 @@ void LogWindow::showOutput(int channel, const QString &output)
out.append(nchar);
m_queuedOutput.append(out);
- m_outputTimer.setSingleShot(true);
- m_outputTimer.start(80);
+ // flush the output if it exceeds 16k to prevent out of memory exceptions on regular output
+ if (m_queuedOutput.size() > 16 * 1024) {
+ m_outputTimer.stop();
+ doOutput();
+ } else {
+ m_outputTimer.setSingleShot(true);
+ m_outputTimer.start(80);
+ }
}
void LogWindow::doOutput()