Skip to content

Error: Insufficient memory to continue the execution of the program #195

@paretje

Description

@paretje

On some files the ThermoRawFileParser fails on certain files with an error like:

2025-06-13 12:49:01 INFO Started parsing /public/compomics/kevin/HY-LDF-20231121-129.raw
2025-06-13 12:49:44 INFO Processing 146379 MS scans
10% 20% 30% 40% 50% 60% 2025-06-13 12:52:37 ERROR Scan #99622 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99622. Insufficient memory to continue the execution of the program.
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 12:52:37 ERROR Scan #99623 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99623. Non-negative number required.
Parameter name: capacity
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 12:53:50 ERROR Scan #99624 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99624. The position may not be greater or equal to the capacity of the accessor.
Parameter name: position
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 12:53:50 ERROR Scan #99625 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99625. Non-negative number required.
Parameter name: capacity
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 12:53:50 ERROR Scan #99626 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99626. Non-negative number required.
Parameter name: capacity
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 12:53:50 ERROR Scan #99627 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99627. Non-negative number required.
Parameter name: capacity
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 12:55:31 ERROR Scan #99628 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99628. The position may not be greater or equal to the capacity of the accessor.
Parameter name: position
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
jk2025-06-13 12:57:19 ERROR Scan #99629 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99629. The position may not be greater or equal to the capacity of the accessor.
Parameter name: position
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 12:58:59 ERROR Scan #99630 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99630. The position may not be greater or equal to the capacity of the accessor.
Parameter name: position
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 12:58:59 ERROR Scan #99631 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99631. Non-negative number required.
Parameter name: capacity
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 13:00:53 ERROR Scan #99632 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99632. The position may not be greater or equal to the capacity of the accessor.
Parameter name: position
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 13:02:40 ERROR Scan #99633 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99633. The position may not be greater or equal to the capacity of the accessor.
Parameter name: position
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 13:02:40 ERROR Scan #99634 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99634. Non-negative number required.
Parameter name: capacity
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.ConstructMSSpectrum (System.Int32 scanNumber) [0x00003] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.Writer.MzMlSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x00ce3] in <aeff65cf23104be8a828d967f1949ca2>:0
Error: Garbage collector could not allocate 16384u bytes of memory for major heap section.

When converting to MGF instead:

2025-06-13 14:14:06 INFO Started parsing /public/compomics/kevin/HY-LDF-20231121-129.raw
2025-06-13 14:14:26 INFO Processing 146379 scans
10% 20% 30% 40% 50% 60% 2025-06-13 14:15:52 ERROR An unexpected error occured (see below)
2025-06-13 14:15:52 ERROR System.Exception: Error while retrieving centroid peaks for 99622. Insufficient memory to continue the execution of the program. ---> System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
  at (wrapper alloc) System.Object.AllocVector(intptr,intptr)
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.Packets.LTFT.AdvancedPacketBase.ExpandLabelData () [0x00049] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.Packets.LTFT.AdvancedPacketBase..ctor (ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.IMemMapReader viewer, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.IScanIndex scanIndex, System.Int32 fileRevision, System.Boolean includeRefPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures) [0x00084] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.Packets.LTFT.FtProfilePacket..ctor (ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.IMemMapReader viewer, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.IScanIndex index, System.Collections.Generic.IReadOnlyList`1[T] massCalibrators, System.Int32 fileRevision, System.Boolean includeRefPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures) [0x00000] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetMsPacket (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionData, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent) [0x000b9] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00028] in <39f33ecf59fc4dcf865fdf80179d7714>:0
   --- End of inner exception stack trace ---
  at ThermoFisher.CommonCore.RawFileReader.StructWrappers.VirtualDevices.MassSpecDevice.GetLabelPeaks (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks, ThermoFisher.CommonCore.RawFileReader.Facade.Interfaces.PacketFeatures packetScanDataFeatures, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanEvent scanEvent, ThermoFisher.CommonCore.RawFileReader.StructWrappers.Scan.ScanIndex scanIndex) [0x00068] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.RawFileReader.RawFileAccessBase.GetCentroidStream (System.Int32 scanNumber, System.Boolean includeReferenceAndExceptionPeaks) [0x0000b] in <39f33ecf59fc4dcf865fdf80179d7714>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.ReadFromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber, ThermoFisher.CommonCore.Data.Business.ScanStatistics stats) [0x00066] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoFisher.CommonCore.Data.Business.Scan.FromFile (ThermoFisher.CommonCore.Data.Interfaces.IRawData rawFile, System.Int32 scanNumber) [0x00025] in <b499c9d650ef44a1a7046f73253f4086>:0
  at ThermoRawFileParser.Writer.MgfSpectrumWriter.Write (ThermoFisher.CommonCore.Data.Interfaces.IRawDataPlus rawFile, System.Int32 firstScanNumber, System.Int32 lastScanNumber) [0x000ce] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.RawFileParser.ProcessFile (ThermoRawFileParser.ParseInput parseInput) [0x001d2] in <aeff65cf23104be8a828d967f1949ca2>:0
  at ThermoRawFileParser.RawFileParser.TryProcessFile (ThermoRawFileParser.ParseInput parseInput) [0x00002] in <aeff65cf23104be8a828d967f1949ca2>:0
2025-06-13 14:15:52 INFO Processing completed 1 errors, 0 warnings

I assume that ERROR Scan #99622 cannot be processed because of the following exception: Error while retrieving centroid peaks for 99622. Insufficient memory to continue the execution of the program. is the actual issue. However, the system definitely doesn't run out of memory, with only a couple of gigabytes of resident memory for the mono process when that error is returned, and it seems it's actually only after the error that it starts to increase pretty rapidly (at least when converting to mzML, when converting to MGF it stops immediately).

I considered the max-heap-size option to be a possible culprit, but according to the mono docs, the default is unlimited:

Sets the maximum size of the heap. The size is specified in bytes and must be a power of two. The suffixes k', m' and `g' can be used to specify kilo-, mega- and gigabytes, respectively. The limit is the sum of the nursery, major heap and large object heap. Once the limit is reached the application will receive OutOfMemoryExceptions when trying to allocate. Not the full extent of memory set in max-heap-size could be available to satisfy a single allocation due to internal fragmentation. By default heap limits is disabled and the GC will try to use all available memory.

And, I verified, it's neither set in an env variable, nor in the ThermoRawFileParser.sh script. Adding -e MONO_GC_PARAMS=max-heap-size=32g, or even 512g, to my docker run command doesn't change anything.

So, to reproduce:

wget -P /tmp http://ftp.pride.ebi.ac.uk/pride/data/archive/2024/05/PXD051904/HY-LDF-20231121-129.raw
docker run -it -v /tmp:/temp --user $UID quay.io/biocontainers/thermorawfileparser:1.4.5--h05cac1d_1 ThermoRawFileParser.sh -i /temp/HY-LDF-20231121-129.raw -o /temp -f 1 -g -e -m 0

As a side note: is there any expected behaviour for the exit code? It seems when converting to MGF, these issues always returns exit code 1, but it seems more variable with mzMLs. Although, I guess that might be because of the fact that when converting to mzML, it doesn't stop and seems to try to continue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions