# HG changeset patch # User Chris Cannam # Date 1488821026 0 # Node ID 1918bf5c9a9ece3ac5bfcae08e7203e40279bbf9 # Parent 77d33ed8e7539c39b44e2f49524b047272bbe5a7 Some bits and bobs to do with handling memory pressure diff -r 77d33ed8e753 -r 1918bf5c9a9e framework/MainWindowBase.cpp --- a/framework/MainWindowBase.cpp Sun Mar 05 17:15:46 2017 +0000 +++ b/framework/MainWindowBase.cpp Mon Mar 06 17:23:46 2017 +0000 @@ -1409,6 +1409,13 @@ (this, tr("Not enough disc space"), tr("Not enough disc space

There doesn't appear to be enough spare disc space to accommodate any necessary temporary files.

Please clear some space and try again.

").arg(e.what())); return FileOpenFailed; + } catch (const std::bad_alloc &e) { // reader may have rethrown this after cleaning up + emit hideSplash(); + m_openingAudioFile = false; + QMessageBox::critical + (this, tr("Not enough memory"), + tr("Not enough memory

There doesn't appear to be enough memory to accommodate any necessary temporary data.

")); + return FileOpenFailed; } }