Index: src/libchcore/TSubTaskArray.cpp =================================================================== diff -u -rbd349309a6dcd25f8d6dc3348a9dc1c95ac4cc6c -rfa1b35a5012ef3fad361edfacd9a627631d55e07 --- src/libchcore/TSubTaskArray.cpp (.../TSubTaskArray.cpp) (revision bd349309a6dcd25f8d6dc3348a9dc1c95ac4cc6c) +++ src/libchcore/TSubTaskArray.cpp (.../TSubTaskArray.cpp) (revision fa1b35a5012ef3fad361edfacd9a627631d55e07) @@ -230,7 +230,7 @@ } // unmark the old "current" subtask - if (m_oidLastStoredIndex != -1) + if (m_oidLastStoredIndex != -1 && m_oidLastStoredIndex != m_vSubTasks.size()) { ISerializerRowData& rRow = spContainer->GetRow(m_oidLastStoredIndex, false); rRow.SetValue(_T("is_current"), false); @@ -302,10 +302,7 @@ } if (m_oidLastStoredIndex == -1) - { m_oidSubOperationIndex.store(boost::numeric_cast(m_vSubTasks.size()), std::memory_order_release); - m_oidLastStoredIndex = boost::numeric_cast(m_vSubTasks.size()); - } } m_setModifications.reset(); Index: src/libchcore/TTask.cpp =================================================================== diff -u -rbd349309a6dcd25f8d6dc3348a9dc1c95ac4cc6c -rfa1b35a5012ef3fad361edfacd9a627631d55e07 --- src/libchcore/TTask.cpp (.../TTask.cpp) (revision bd349309a6dcd25f8d6dc3348a9dc1c95ac4cc6c) +++ src/libchcore/TTask.cpp (.../TTask.cpp) (revision fa1b35a5012ef3fad361edfacd9a627631d55e07) @@ -316,6 +316,8 @@ m_tSubTasksArray.ResetProgressAndStats(); m_tLocalStats.Clear(); + Store(true); + BeginProcessing(); }