Non-negative number required. when calling OpenMcdf.CompoundFile.Commit();
Structured Storage .net component - pure C#
Brought to you by:
ironfede
On a few occasions, when calling CompoundFile.Commit, I get the error below. I'm not able to reproduce the error on a regular bassis.
ArgumentOutOfRangeException - Non-negative number required.
at System.IO.FileStream.SetLength(Int64 value)
at OpenMcdf.CompoundFile.Commit(Boolean releaseMemory)
Am I doing somthing wrong or is it a real bug? The only SetLength in Commit is at line 643
sourceStream.SetLength((sectors.Count + 1) * sSize);
sSize is negative? How could that be?
Let me know if you need more information.
Best regards,
Stefane
Sorry subject should read:
Non-negative number required. when calling OpenMcdf.CompoundFile.Commit();
I can't change it myself. If an admin can change it I would appriciate it.
Thank you,
Hi Stefane, thank you for your reporting.
Do you have a file that trigger (sometimes) this issue?
It looks like a file corruption in the header section...
Please let me know if you succed in reproduce the issue.
Best Regards,
Federico