Issue with parsing Mares Quad Air dump file

Rick Balsano rick.balsano at gmail.com
Mon Jun 11 06:56:22 CEST 2018


Hello -

I'm having an issue downloading dives from my Mares Quad Air in Subsurface,
so I tried to see what I could find out more directly with libdivecomputer.
The only issue I've found with libdivecomputer is the inability to parse a
dump file for the Quad Air. I don't think this is related to my Subsurface
issue, but figured I'd flag it anyway.

I have downloaded and built livdivecomputer on OS X (10.13.4).

I generated the attached dump file with:

./dctool -f iconhd -m 35 dump -o mares_quad_air.dump
/dev/tty.SLAB_USBtoUART > dctool.log 2>&1

Parsing of the dump file fails:

./dctool -f iconhd -m 35 parse -o mares_quad_air_parsed.xml
mares_quad_air.dump
Creating the parser.
Registering the data.
Parsing the dive data.
Parsing the datetime.
ERROR: Buffer overflow detected! [in mares_iconhd_parser.c:149
(mares_iconhd_parser_cache)]
ERROR: Error parsing the datetime. [in output_xml.c:229
(dctool_xml_output_write)]
ERROR: Error parsing the dive data. [in dctool_parse.c:73 (parse)]
ERROR: Data format error

However, direct download of dives works (dive download attached):

$ ./dctool -f iconhd -m 35 download -o mares_quad_air_dives.xml
/dev/tty.SLAB_USBtoUART

I see that dctool_parse calls dc_parser_new2 while dctool_download calls
dc_parser_new.

Am I wrong in thinking that dctool should be able to parse the dump file
and produce the same results as a direct download?

Regards,
Rick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libdivecomputer.org/pipermail/devel/attachments/20180611/2bf0d068/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mares_quad_air.dump
Type: application/octet-stream
Size: 1048576 bytes
Desc: not available
URL: <http://libdivecomputer.org/pipermail/devel/attachments/20180611/2bf0d068/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mares_quad_air_dives.xml
Type: text/xml
Size: 793739 bytes
Desc: not available
URL: <http://libdivecomputer.org/pipermail/devel/attachments/20180611/2bf0d068/attachment-0001.xml>


More information about the devel mailing list