Its  null reference error in setGlobalMeasurements(GlobalMeasurements mes) in aECGformat.cs
at  seriesMedian = (series.DerivedSet.Count == 1) ? series.DerivedSet : null;

where series.DerivedSet is null for some reason.
The same XML ecg converts to other formats ( dicom,scp) just fine but throws exception when converting to aECG.