DiscUtils Error With CDReader()...

Mar 4, 2012 at 1:41 AM

Here is a call stack from an the exception thrown when I tried to read a file with CDReader():

Unable to open image file in viewer.\nMsg: String was not recognized as a valid DateTime.

   at System.DateTimeParse.ParseExact(String s, String format, DateTimeFormatInfo dtfi, DateTimeStyles style)
   at System.DateTime.ParseExact(String s, String format, IFormatProvider provider)
   at DiscUtils.Iso9660.IsoUtilities.ToDateTimeFromVolumeDescriptorTime(Byte[] data, Int32 offset)
   at DiscUtils.Iso9660.CommonVolumeDescriptor..ctor(Byte[] src, Int32 offset, Encoding enc)
   at DiscUtils.Iso9660.SupplementaryVolumeDescriptor..ctor(Byte[] src, Int32 offset)
   at DiscUtils.Iso9660.CDReader..ctor(Stream data, Boolean joliet)

What is causing this error to occur?




Mar 4, 2012 at 8:28 AM

Hi Rick,

I think you're using an old version of DiscUtils - the latest code no longer uses DateTime.ParseExact (see changeset e54151893da2), and has more robust handling for parsing time information from ISOs.



Mar 4, 2012 at 2:30 PM


Thanks, I will try the latest version.

By the way, not sure if this matters, but the .ISO contains a file that is over 2.5GB - did that have any influence on the problem?



Mar 4, 2012 at 4:56 PM
Edited Mar 4, 2012 at 5:53 PM

I'm getting this error now:

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)

Mar 4, 2012 at 9:08 PM

Hi Rick,

This could be due to the size of the ISO file.  It might be a bug in DiscUtils, or in the stream passed into the CDReader constructur.  Can you confirm what the type is of the stream passed into the CDReader constructor?




Mar 4, 2012 at 9:12 PM

The ISO was created with another library.

However, when I created the ISO with DiscUtils, the output ISO was opened with no problems with CDReader().


Mar 4, 2012 at 9:51 PM

One more question: 

Do you have any async methods available for building ISO's?

Mar 9, 2012 at 9:10 PM

Guess I should have read the note posted Feb 14 asking the same question...