We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

File not working.. Arithmetic operation resulted in an overflow - error with library v22.6

Dear Aspose Support
I have purchased the most recent version of your library (.net v22.6) in order to resolve an issue that we are seeing in a project file. However this has not resolved the error. The errors message i am getting is below. Can you please confirm if this is a bug in the aspose.tasks library and if so can you please issue a fix?

I attach the mpp file which gives the error.Sent to Aspose v1.zip (89.4 KB)

Unhandled Exception: System.OverflowException: Arithmetic operation resulted in an overflow. at (wrapper alloc) System.Object:AllocVector (intptr,intptr) at #=ziE9gSJF1ycfl09li0nkxkLctw$Qf9oIi9Q==.#=z2ufg278= (System.IO.Stream #=zPYpGCsI=, System.Int32 #=z4mZTWmA=) [0x00000] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zbWVs6igUsdYSaEwVMz9DiQbug11DD2y0$0vqhuE=.#=zToqXDvSmejk3 () [0x002ef] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zbWVs6igUsdYSaEwVMz9DiQbug11DD2y0$0vqhuE=.#=zjtWf5utCOJJP () [0x0001b] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zblYtqikErM$GBmRzNMLPsHrNpoTDxkIgYw==.#=zJ_H6JmSgo$Ai () [0x00000] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zi$ESOZKgjolT8BXdEZIZewNQtcPZM9HYcol8vs0=.#=z8IMU2Ik= (System.Collections.Generic.IDictionary2[TKey,TValue] #=z_fbijP_C78cosLbB4A==) [0x00016] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=z9BRSfiRdThxlHQbzoQcHdg$LQJm0IbugBA==.#=zYOkz43o= () [0x001d0] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=z9BRSfiRdThxlHQbzoQcHdg$LQJm0IbugBA==.#=zYOkz43o= (Aspose.Tasks.Project #=zFuKecNk=, System.IO.Stream #=zX1NU5TY=, Aspose.Tasks.LoadOptions #=zrXDDBpIkYYSa, #=zdSNbJ8HlkpxjNk9o57P1u3k= #=zZMjaVDc=) [0x00035] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zAK10VhVtCs79aSa5pGCXOFE=.#=zYOkz43o= (System.IO.Stream #=zX1NU5TY=, Aspose.Tasks.Project #=zFuKecNk=) [0x000aa] in <5a89b892f0094985f9b7f1739e2371e1>:0 at Aspose.Tasks.Project.#=zPHKsJwoSdzyJ (System.IO.Stream #=zX1NU5TY=, Aspose.Tasks.LoadOptions #=zrXDDBpIkYYSa) [0x00073] in <5a89b892f0094985f9b7f1739e2371e1>:0 at Aspose.Tasks.Project..ctor (System.String projectTemplate, Aspose.Tasks.ParseErrorCallback parseErrorHandler) [0x0002a] in <5a89b892f0094985f9b7f1739e2371e1>:0 at Aspose.Tasks.Project..ctor (System.String projectTemplate) [0x00000] in <5a89b892f0094985f9b7f1739e2371e1>:0 at Aspose.Tasks.Traqplan.CSharp.ConvertingProjectData.SaveProjectAsXLSX.Run (System.String mppFile, System.String xmlFile) [0x00000] in <8c088543b4464c30a792b496fd3c8a4a>:0 at Aspose.Tasks.Traqplan.CSharp.ConvertingProjectData.SaveProjectAsXLSX.Main (System.String[] args) [0x0001a] in <8c088543b4464c30a792b496fd3c8a4a>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.OverflowException: Arithmetic operation resulted in an overflow. at (wrapper alloc) System.Object:AllocVector (intptr,intptr) at #=ziE9gSJF1ycfl09li0nkxkLctw$Qf9oIi9Q==.#=z2ufg278= (System.IO.Stream #=zPYpGCsI=, System.Int32 #=z4mZTWmA=) [0x00000] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zbWVs6igUsdYSaEwVMz9DiQbug11DD2y0$0vqhuE=.#=zToqXDvSmejk3 () [0x002ef] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zbWVs6igUsdYSaEwVMz9DiQbug11DD2y0$0vqhuE=.#=zjtWf5utCOJJP () [0x0001b] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zblYtqikErM$GBmRzNMLPsHrNpoTDxkIgYw==.#=zJ_H6JmSgo$Ai () [0x00000] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zi$ESOZKgjolT8BXdEZIZewNQtcPZM9HYcol8vs0=.#=z8IMU2Ik= (System.Collections.Generic.IDictionary2[TKey,TValue] #=z_fbijP_C78cosLbB4A==) [0x00016] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=z9BRSfiRdThxlHQbzoQcHdg$LQJm0IbugBA==.#=zYOkz43o= () [0x001d0] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=z9BRSfiRdThxlHQbzoQcHdg$LQJm0IbugBA==.#=zYOkz43o= (Aspose.Tasks.Project #=zFuKecNk=, System.IO.Stream #=zX1NU5TY=, Aspose.Tasks.LoadOptions #=zrXDDBpIkYYSa, #=zdSNbJ8HlkpxjNk9o57P1u3k= #=zZMjaVDc=) [0x00035] in <5a89b892f0094985f9b7f1739e2371e1>:0 at #=zAK10VhVtCs79aSa5pGCXOFE=.#=zYOkz43o= (System.IO.Stream #=zX1NU5TY=, Aspose.Tasks.Project #=zFuKecNk=) [0x000aa] in <5a89b892f0094985f9b7f1739e2371e1>:0 at Aspose.Tasks.Project.#=zPHKsJwoSdzyJ (System.IO.Stream #=zX1NU5TY=, Aspose.Tasks.LoadOptions #=zrXDDBpIkYYSa) [0x00073] in <5a89b892f0094985f9b7f1739e2371e1>:0 at Aspose.Tasks.Project…ctor (System.String projectTemplate, Aspose.Tasks.ParseErrorCallback parseErrorHandler) [0x0002a] in <5a89b892f0094985f9b7f1739e2371e1>:0 at Aspose.Tasks.Project…ctor (System.String projectTemplate) [0x00000] in <5a89b892f0094985f9b7f1739e2371e1>:0 at Aspose.Tasks.Traqplan.CSharp.ConvertingProjectData.SaveProjectAsXLSX.Run (System.String mppFile, System.String xmlFile) [0x00000] in <8c088543b4464c30a792b496fd3c8a4a>:0 at Aspose.Tasks.Traqplan.CSharp.ConvertingProjectData.SaveProjectAsXLSX.Main (System.String[] args) [0x0001a] in <8c088543b4464c30a792b496fd3c8a4a>:0

I should have added, this is using aspose.tasks v22.6 .NET (the most recent).
I am simply importing task names, task ID, start, finish and % complete, not using very many of the aspose calls.

@ColinTraqplan,
looks like the issue is reproducible for MPP files generated by MS Project with the latest update installed (version 16.0.15330.20230) due to changes in MPP structure.
We will fix the issue in v. 22.7. (E.T.A - this week).

Thank you Vasiliy.

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

Hi Vasiliy

when i replace our dll with the one you just sent i get this error below at compile time.

Is this an error in the new dll?

MppToXml.cs(31,50): error CS0117: Aspose.Tasks.Saving.SaveFileFormat' does not contain a definition for XML’
/traqplan/Aspose.Tasks.dll (Location of the symbol related to previous error)

many thanks
Colin

@ColinTraqplan,

In general to update your third-party references it’s better to update reference in your project, recompile it and fix compilation errors (if any).

In this particular case SaveFileFormat.XML was marked as obsolete in version 22.1 and removed in 22.7 as per our deprecation policy.
You should replace usages of SaveFileFormat.XML with SaveFileFormat.Xml in your apllication’s source code.