diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-09-11 15:27:29 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-09-11 21:51:39 +0100 |
commit | 958dce33263ecda91fae0f5d25494ec2ca5808ba (patch) | |
tree | e6909dbc8926d66b737a11467b4d18564675c7cb /core/display.h | |
parent | cd194332907652df6892235c21c8ca7ab1f1af7e (diff) | |
download | subsurface-958dce33263ecda91fae0f5d25494ec2ca5808ba.tar.gz |
Keep parsing dives even if one dive parse failed
Eric Charbonnier reported a problem downloading the dives from his
OSTC2, and Jef debugged the libdivecomputer log and says:
"Your ostc has 75 dives, but subsurface downloaded only one, and then
stopped the download. That's because that first dive appears to be
corrupt and fails to parse:
ERROR: Buffer overflow detected! [in /win/subsurface/libdivecomputer/src/hw_ostc_parser.c:981 (hw_ostc_parser_samples_foreach)]
Subsurface (incorrectly) considers that a fatal error and stops the
entire download. From a user point of view, it would be much better to
ignore the problematic dive, and continue downloading the remaining"
Subsurface used to just stop downloading if there were parsing errors,
but Jef further says:
"How parser errors are handled is up to the application. Aborting the
download is probably the worst option here. If a dive fails to parse
(because the dive data is corrupt, the parser contains a bug, etc),
that does not necessary mean the remaining dives can't be downloaded"
so let's change the logic to just continue downloading, and hope other
dives work better.
We might want to do better error reporting, right now the errors tend to
just cause "dev_info()" reports, which just set the progress bar text.
So you'll see it in the progress bar as it happens, but it won't get
really ever noted as an error, and it's easy to miss.
But that error reporting is a separate issue, and this just does the
"continue to the next dive" part.
Reported-by: Eric Charbonnier <eric.charbonnier69@gmail.com>
Suggested-by: Jef Driesen <jef@libdivecomputer.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'core/display.h')
0 files changed, 0 insertions, 0 deletions