the-butcher / ARANET4_VIS

Utility Web App for rendering Aranet4, SmartAir and Inkbird measurements.
https://the-butchers.at/aranet4_vis/
MIT License
5 stars 0 forks source link

CSV with high co2 crashes the app #1

Closed oseiler2 closed 7 months ago

oseiler2 commented 7 months ago

I've tried importing a csv which crashed the app to the point that even a forced reload will not make it recover. A look into the data revealed a couple of very high co2 readings, and if I remove these lines the app works fine.

Tested in Chrome 121.0.6167.185

The triggering lines:

19/02/2024 15:16:31;28217;15,8;94,1;
19/02/2024 15:17:01;11800;15,9;94,8;

Offending file attached: 2024-02-19_.log.csv (since I use my own csv files which aren't Aranet sourced, I figured I can make them load by turning them into semicolon separated files as long as I leave the header intact, hence the mixed format of the attached file)

the-butcher commented 7 months ago

Thank's for reporting this issue.

Fixed with https://github.com/the-butcher/ARANET4_VIS/commit/17863f10937a5dfecee2e40b20d6e06f4bdb47f3

There was an attempt to resolve a predefined color instance whilch failed over an out of bounds condition for the high co2 value. Since the error occurred on experimental code i commented the problematic lines and may reintegrate a fixed version later.