Index: src/ch/FileInfo.h
===================================================================
diff -u -rc57e6817d7236fcc47538c09cf9cfaac0fbfbfe7 -r34a693d8a44eeb16c2c2d071a29678dcbd2febb1
--- src/ch/FileInfo.h	(.../FileInfo.h)	(revision c57e6817d7236fcc47538c09cf9cfaac0fbfbfe7)
+++ src/ch/FileInfo.h	(.../FileInfo.h)	(revision 34a693d8a44eeb16c2c2d071a29678dcbd2febb1)
@@ -261,6 +261,14 @@
 	{
 		INT_PTR iSize;
 		ar>>iSize;
+
+		// workaround for a problem, where '0' was stored as int instead of INT_PTR;
+		// in this case on x86_64 iSize could have some enormous size (because we read
+		// someone else's data following the int value.
+		// Try to avoid reading later some invalid data (since we have stolen 4 bytes on x86_64).
+		if(iSize > INT_MAX)
+			THROW(_T("[CFileInfoArray::Load()] Corrupted task data (bug [#sf:2905339]"), 0, 0, 0);
+
 		SetSize(iSize, 5000);
 		CFileInfo fi;
 		fi.SetClipboard(&m_rClipboard);
Index: src/ch/MainWnd.cpp
===================================================================
diff -u -r59c39dd19e2c42f33189ee07274f0488d54d7ed0 -r34a693d8a44eeb16c2c2d071a29678dcbd2febb1
--- src/ch/MainWnd.cpp	(.../MainWnd.cpp)	(revision 59c39dd19e2c42f33189ee07274f0488d54d7ed0)
+++ src/ch/MainWnd.cpp	(.../MainWnd.cpp)	(revision 34a693d8a44eeb16c2c2d071a29678dcbd2febb1)
@@ -171,6 +171,7 @@
 	m_tasks.Create(m_pFeedbackFactory);
 
 	// load last state
+	LOG_INFO(_T("Loading existing tasks..."));
 	CString strPath;
 	GetApp().GetProgramDataPath(strPath);
 	strPath += _T("\\Tasks\\");
@@ -179,6 +180,7 @@
 	m_tasks.TasksRetryProcessing();
 
 	// start clipboard monitoring
+	LOG_INFO(_T("Starting clipboard monitor..."));
 	CClipboardMonitor::StartMonitor(&m_tasks);
 	
 	EUpdatesFrequency eFrequency = (EUpdatesFrequency)GetConfig().get_unsigned_num(PP_PCHECK_FOR_UPDATES_FREQUENCY);
@@ -214,6 +216,8 @@
 		// perform checking for updates only when the minimal interval has passed
 		if(ullCurrentStamp - ullTimestamp >= ullMinInterval)
 		{
+			LOG_INFO(_T("Checking for updates..."));
+
 			CUpdaterDlg* pDlg = new CUpdaterDlg(true);
 			pDlg->m_bAutoDelete = true;
 
Index: src/ch/task.cpp
===================================================================
diff -u -r2457755b4084e3d1c80a8e7c77c9f0996312941b -r34a693d8a44eeb16c2c2d071a29678dcbd2febb1
--- src/ch/task.cpp	(.../task.cpp)	(revision 2457755b4084e3d1c80a8e7c77c9f0996312941b)
+++ src/ch/task.cpp	(.../task.cpp)	(revision 34a693d8a44eeb16c2c2d071a29678dcbd2febb1)
@@ -575,7 +575,7 @@
 			if (GetStatus(ST_STEP_MASK) > ST_SEARCHING)
 				m_files.Store(ar, false);
 			else
-				ar<<static_cast<int>(0);
+				ar<<static_cast<INT_PTR>(0);
 
 			m_dpDestPath.Serialize(ar);
 			ar<<m_strUniqueName;
@@ -1346,6 +1346,7 @@
 	m_cs.Lock();
 	CFileFind finder;
 	CTask* pTask;
+	CString strPath;
 
 	BOOL bWorking=finder.FindFile(CString(m_strTasksDir.c_str())+_T("*.atd"));
 	while ( bWorking )
@@ -1357,7 +1358,7 @@
 
 		try
 		{
-			CString strPath=finder.GetFilePath();
+			strPath = finder.GetFilePath();
 
 			// load data file
 			icpf::archive ar;
@@ -1382,6 +1383,9 @@
 		}
 		catch(icpf::exception&)
 		{
+			CString strFmt;
+			strFmt.Format(_T("Cannot load task data: %s"), strPath);
+			LOG_ERROR(strFmt);
 			delete pTask;
 		}
 	}
@@ -2294,10 +2298,6 @@
 		pTask->SetCurrentCopy(j);
 		for (int i=pTask->GetCurrentIndex();i<nSize;i++)
 		{
-			// update m_nCurrentIndex, getting current CFileInfo
-			pTask->SetCurrentIndex(i);
-			CFileInfo& fi=pTask->FilesGetAtCurrentIndex();
-
 			// should we kill ?
 			if (pTask->GetKillFlag())
 			{
@@ -2306,6 +2306,10 @@
 				throw new CProcessingException(E_KILL_REQUEST, pTask);
 			}
 
+			// update m_nCurrentIndex, getting current CFileInfo
+			pTask->SetCurrentIndex(i);
+			CFileInfo& fi=pTask->FilesGetAtCurrentIndex();
+
 			// set dest path with filename
 			ccp.strDstFile=fi.GetDestinationPath(dpDestPath.GetPath(), j, ((int)bForceDirectories) << 1 | (int)bIgnoreFolders);