This project is read-only.

CDReader fails with large file

Jun 26, 2012 at 5:51 PM

I am trying to read an ISO-9660 file, which is about 7 GB, and I get the following error using CDReader()

Failed to read whole directory



at DiscUtils.Iso9660.ReaderDirectory..ctor(IsoContext context, DirectoryRecord dirEntry)   

at DiscUtils.Iso9660.VfsCDReader..ctor(Stream data, Boolean joliet, Boolean hideVersions)   

at DiscUtils.Iso9660.CDReader..ctor(Stream data, Boolean joliet)

I am using this stream:

Stream isoStream = System.IO.File.Open(isoFile, FileMode.Open)

I have been debugging and noticed that ExtentStream.Read method reads 0 bytes, which is the cause of the error. I have seen that the stream is starting at a position larger than the file size.

_isoStream.Position = _position + (_startBlock * (long)IsoUtilities.SectorSize);           

int numRead = _isoStream.Read(buffer, offset, toRead);

# _isoStream values:

Length =      7366377472

Position = 5908262479872


Do you know why is this happening? Is there any way I can make this work?

Jun 27, 2012 at 11:32 PM


This could be a bit tricky to debug.  Do you know which tool was used to create the ISO?

It may be useful if you could make a sample file available.




Jun 29, 2012 at 10:40 AM

Well I don't know which tool was used to create the file. The file wasn't created by me.

Do you think is because of the tool used or the file size could also have something to do?