-
Notifications
You must be signed in to change notification settings - Fork 4
Description
When attempting to import data from my ResMed SD card, the application crashes. The error seems to occur during the processing of a specific night's data, not during the initial file discovery
Steps to Reproduce
- Launch the CPAP Exporter application.
- Navigate to the data import screen.
- Select the folder containing the complete data from my ResMed SD card.
- Initiate the import process.
- The application processes for about 30 seconds and then displays the error
I tried deleting certain months from the data one-by-one but it didn't seem to help and the issue doesn't seem to be with the actual importing anyway. Also tried copying the SD Card data to the main SSD drive but that didn't help, same issue.
The full SD card data is here in case that helps: https://mega.nz file/FGZxSCKC#zvyX1UaYKw5ByUKpc3wq6Fbpf-lDd-wNnTu9Q4AjzuY
The application crashes and an IndexOutOfRangeException error is generated. The import process does not complete.
Error Details (Stack Trace)
Here is the error log from the application. The crash appears to happen deep within the cpaplib library when trying to analyze the breathing signal data.
System.IndexOutOfRangeException: Index was outside the bounds of the array.
at cpaplib.BreathDetection.DetectBreaths(Signal flow, Double filterCutoff, Boolean useVariableBaseline)
at cpaplib.DerivedSignals.GenerateMissingRespirationSignals(DailyReport day, Session session)
at cpaplib.ResMedDataLoader.GenerateCalculatedSignals(DailyReport day, Session session)
at cpaplib.ResMedDataLoader.ImportSessionsAndEvents(String rootFolder, DailyReport day)
at cpaplib.ResMedDataLoader.LoadFromFolder(String rootFolder, Nullable`1 minDate, Nullable`1 maxDate, CpapImportSettings importSettings)
at CascadePass.CPAP.Exporter.SelectNightsViewModel.LoadFromFolder(String folder, Boolean replaceExisting) in D:\a\CPAP-Exporter\CPAP-Exporter\CPAP-Exporter.UI\Pages\SelectNights\SelectNightsViewModel.cs:line 164
System Information
CPAP Exporter Version: 1.0.0.0
Operating System: Windows 11 (10.0.26100 Build 26100)
CPAP Machine: Aircurve 10