Commit ace4d9d6 authored by Kåre Särs's avatar Kåre Särs Committed by Christoph Cullmann
Browse files

Prevent crash in git-blame for HUGE git commits

BUG: 437683
parent 40ec8280
......@@ -303,7 +303,15 @@ void KateGitBlamePluginView::blameFinished(int /*exitCode*/, QProcess::ExitStatu
void KateGitBlamePluginView::showFinished(int exitCode, QProcess::ExitStatus exitStatus)
QString stdErr = QString::fromUtf8(m_showProc.readAllStandardError());
const QString stdOut = QString::fromUtf8(m_showProc.readAllStandardOutput());
QString stdOut = QString::fromUtf8(m_showProc.readAllStandardOutput());
// Try to avoid crashes caused by QTextBrowser running out of memory
// Seems to be a limit somewhere as the memory reaches 8G and then crashes
// even if there is more free memory
// Anyways, this popup is not optimal for > 1m characters...
if (stdOut.size() > 1000000) {
stdOut = stdOut.left(1000000) + i18n("\n--- Output truncated ---\n");
if (exitCode != 0 || exitStatus != QProcess::NormalExit) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment