Mares Smart: Pointer out of range
Jef Driesen
jef at libdivecomputer.org
Thu Dec 3 09:59:55 PST 2015
On 02-12-15 23:40, Gilbert Forkel wrote:
> downloading the dives of a Mares Smart divecomputer not containing any
> dives (just unpacked new device and connected to computer) i get the
> following errror:
>
> ERROR: Ringbuffer pointer out of range. [in mares_iconhd.c:481
> (mares_iconhd_extract_dives)]
>
> Looks like memory locations 0x2001 and 0x3001 are empty (0xffffffff).
>
> Maybe we can just check for this case and return SUCCESS ?
You are probably the first one to try downloading from an empty iconhd family
dive computer :-)
Although this is a rather unlikely situation, I don't see any problems to treat
0xffffffff special, and return success. Will you submit a patch? Or do I fix
this myself?
If you don't mind, can you also send me a memory dump (and logfile) of your
empty dive computer? It's always good to have some test data of corner cases! To
download a memory dump, you can run the universal test application with these
options:
universal -v -l iconhd.log -m iconhd.bin -b iconhd <serialport>
If you prefer a graphical application, you can use subsurface or Divinglog 6.0.
Both applications have an option to download a memory dump.
Jef
More information about the devel
mailing list