[code] Load Variable box content before compiling any other python code

to avoid memory exhaustion when displaying variable box
This commit is contained in:
Émilie Feral
2018-10-25 14:44:29 +02:00
parent c7e001a01d
commit a4f7d83805
7 changed files with 56 additions and 37 deletions

View File

@@ -105,6 +105,10 @@ const char * ConsoleController::inputText(const char * prompt) {
void ConsoleController::viewWillAppear() {
loadPythonEnvironment();
/* We load functions and variables names in the variable box before running
* any other python code to avoid failling to load functions and variables
* due to memory exhaustion. */
static_cast<App *>(app())->variableBoxController()->loadFunctionsAndVariables();
m_sandboxIsDisplayed = false;
if (m_importScriptsWhenViewAppears) {
m_importScriptsWhenViewAppears = false;