User 80c35730b2
08-12-2011 11:38:01
The following two line RD file is legal - it just doesn't have any records (i.e. it is a reasonable end condition)
$RDFILE 1
$DATM 12/08/2011 11:10:40
Testing with MarvinView works - it does not error and it displays no content as expected
However JChem for Excel crashes with the following message (it would be better just to report that the file has no records and disable the import button)
Exception: System.ArgumentNullException
Message: Buffer cannot be null.
Parameter name: buffer
StackTrace: at System.IO.MemoryStream..ctor(Byte[] buffer, Boolean writable)
at System.IO.MemoryStream..ctor(Byte[] buffer)
at ChemAxon.JChemExcel.IKVM.IO.MolImporterStructureRecordEnumerator.CreateMolImporter()
at ChemAxon.JChemExcel.IKVM.IO.MolImporterStructureRecordEnumerator.<GetMoleculeStructureRecords>d__c.
(Object )
at ChemAxon.JChemExcel.IKVM.IO.MolImporterStructureRecordEnumerator.<GetMoleculeStructureRecords>d__c.MoveNext()
at ChemAxon.JChemExcel.IKVM.IO.MolImporterStructureRecordEnumerator.<GetRecords>d__0.
(Object )
at ChemAxon.JChemExcel.IKVM.IO.MolImporterStructureRecordEnumerator.<GetRecords>d__0.MoveNext()
at ChemAxon.NET.Base.ExtensionMethods.IEnumerableExtensions.<GroupEveryShrinkLast>d__2c`1.MoveNext()
at ChemAxon.JChemExcel.Base.ExcelMapper.AbstractExcelEnumerableBatchMapper.
(Object )
at ChemAxon.JChemExcel.Base.ExcelMapper.AbstractExcelEnumerableBatchMapper.MapRecordBatches()
at ChemAxon.JChemExcel.Base.ExcelMapper.DrawingExcelMapper.
(Object )
at ChemAxon.JChemExcel.Base.ExcelMapper.DrawingExcelMapper.Execute()
at ChemAxon.JChemExcel.IKVM.IO.MolImporterResultMapper.
(Object )
at ChemAxon.JChemExcel.IKVM.IO.MolImporterResultMapper.Execute()
at ChemAxon.JChemExcel.Base.Controls.BackgroundWorkerPresenter.
(Object )
at ChemAxon.JChemExcel.Base.Controls.BackgroundWorkerPresenter.backgroundWorker_DoWork(Object sender, DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)