Free Support Forum -

Save two times crash

I try to open, read and then write a mpp file.
First time, the file is well saved.
But if i try to re-open, re-read and re-write the same .mpp, then it crash, and write a 0 byte file, and the application freezes.
The Aspose Tasks component is the for .net 3.5.



Here is my code sample :

string projectPath = “c:\temp\project.mpp”;

Project project = null;
ProjectReader mppReader = new ProjectReader();
using (Stream stream = File.OpenRead(projectPath))
project = mppReader.Read(stream);

ProjectWriter mppWriter = new ProjectWriter();
mppWriter.Write(project, projectPath, TasksDataFormat.MPP);

Project project2 = null;
ProjectReader mppReader2 = new ProjectReader();
using (Stream stream2 = File.OpenRead(projectPath))
project2 = mppReader2.Read(stream2);

ProjectWriter mppWriter2 = new ProjectWriter();
mppWriter2.Write(project2, projectPath, TasksDataFormat.MPP);

Hi Nicolas,

Thank you for using Aspose.Tasks and sorry for the inconvenience you are facing.

Can you please share with us if this happens with a specific MPP file or with any MPP file at your end? I would request you to please share your sample MPP file with us so that we can analyze it and provide further assistance in this regard.


Thank you for your reply. The bug happens with any .mpp file. An empty one (freshly created with Microsoft Project) or a project of mine. Here are the two mpp files i use to test. I tried the method and the writer.write method, same results.
Also, something strange : my Project.mpp is 315 KB before rewrite it, and after the first save, the mpp file is 284 KB… And the bug happens if i try to reopen the 284 KB and re-write into itself.

For your information, i’m using aspose Tasks with the trial licence.

Hi Nicolas,

Thank you for the additional information.

I was able to reproduce this issue at my end using the latest version of Aspose.Tasks for .NET 4.8.0 and have logged it as TASKS-33246 in our issue tracking system. Our development team will investigate it further and we’ll update you here once we have any information in this regard.

Ok, Thank you.

Hi Nicolas,

You are welcome.

If you have any other query/observations/inquiry related to Aspose.Tasks, please feel free to contact us. It will be pleasure assisting you further.

The issues you have found earlier (filed as TASKS-33246) have been fixed in this update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.