Skip to content

Commit be09941

Browse files
boutinbJorisGoosen
authored andcommitted
Check valid computed column from old JASP file
Fixes jasp-stats/jasp-issues#2428 Apparently in the JASP file of the issue, a computed column was made that made the engine crash. This computed column is still written in the metadata.json, but it is ignored in 0.17.3. When upgrading to 0.18.1, this computed column is added and makes the engine crash. So just ignore this computed column when upgrading.
1 parent 476cf7b commit be09941

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CommonData/dataset.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,13 @@ const Columns & DataSet::computedColumns() const
381381

382382
void DataSet::loadOldComputedColumnsJson(const Json::Value &json)
383383
{
384+
if (!json.isArray()) return;
385+
384386
for(const Json::Value & colJson : json)
385387
{
388+
Log::log() << "Old computed column: " << colJson.toStyledString() << std::endl;
389+
if (!colJson.isObject() || colJson["error"].asString().rfind("The engine crashed", 0) == 0) continue;
390+
386391
const std::string name = colJson["name"].asString();
387392

388393
Column * col = column(name);

0 commit comments

Comments
 (0)