-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception in OpenMCDF 2.4.0 (Worked in 2.3.0) #256
Comments
While I can verify that this is new to v2.4.0, I'm not sure if I'd be able to fix it... While I made a lot of changes on 2.4, most of them were for code quality improvements and validation rather than functional changes (I put in the check which meant that the seek arguments were validated, so it crashes instead of corrupting the file). So, I suspect that this is probably a regression from fixing a different crash that was happening on v2.3 (#184). However, that issue was the thing that really made me think that a rewrite for v3 was probably a better course of action than trying to continue to improve/fix v2. So, my advice would be to try 3.0.0-preview.4 and see if that resolves the problem for you. If there's any problems with 3.0.0 then I'll gladly fix it, otherwise I think this one would be down to @ironfede since he knows the v2 code better than I do. |
Fixed in 2.4.1 There was a wrong calculation for DFAT sectors numbers -> regression from 2.3 branch. |
Awesome, thanks for handling that one @ironfede! |
Thank you for the quick fix! |
When I run this code with OpenMCDF 2.4.0 it will crash when writing the 9th stream.
I get:
System.IO.IOException: Seek before origin
at OpenMcdf.StreamView.Seek(Int64 offset, SeekOrigin origin)
at OpenMcdf.StreamRW.Seek(Int64 count, SeekOrigin origin)
at OpenMcdf.CompoundFile.AllocateDIFATSectorChain(List
1 FATsectorChain) at OpenMcdf.CompoundFile.AllocateFATSectorChain(List
1 sectorChain)at OpenMcdf.CompoundFile.AllocateSectorChain(List
1 sectorChain) at OpenMcdf.CompoundFile.SetSectorChain(List
1 sectorChain)at OpenMcdf.CompoundFile.SetStreamLength(CFItem cfItem, Int64 length)
at OpenMcdf.CompoundFile.WriteData(CFItem cfItem, Byte[] buffer, Int64 position, Int32 offset, Int32 count)
at OpenMcdf.CompoundFile.WriteData(CFItem cfItem, Int64 position, Byte[] buffer)
at OpenMcdf.CompoundFile.WriteData(CFItem cfItem, Byte[] buffer)
at OpenMcdf.CFStream.SetData(Byte[] data)
at OpenMCDF2._4._0CrashRepro.Program.Main(String[] args) in
The text was updated successfully, but these errors were encountered: