road to 4.9

Linus Torvalds torvalds at linux-foundation.org
Sun Jul 14 16:51:09 PDT 2019


On Sun, Jul 14, 2019 at 3:57 PM Steve <stevewilliams at internode.on.net> wrote:
>
> Yes I am in Adelaide Australia, I haven't  played with the local on
> purpose but if anything if there is no en_au then I would have choose
> en_gb.

I tried to look through our history.

I don't think we've ever localized the cylinder usage strings. Yes,
there are translation markers for them, but that's purely because we
do translate them in the UI - but not in the save format.

So Berthold is correct in wondering where the original odd string in
your cloud storage might have come from. Sadly we don't warn about the
unrecognized value, we just set the cylinder use index to -1, so it's
impossible to see what the corruption is.

What *did* happen at one point is that we extended the enumeration
from 0-2 (OC, diluent, oxygen) to 0-3 when we added the "not used"
case.

So it's possible that if you've switched versions back and forth
(perhaps not intentionally, but simply by virtue of using subsurface
on different devices). And one device would add the "not used" case,
and then another device would read that, not understand "not used",
set it to -1, and then when saving use "cylinderuse_text[-1]" and if
that happened to be a valid pointer, save garbage instead of SIGSEGV.

I guess we could add a warning about "unrecognized cylinder use", and
just set the cylinder to the default 0 (OC_GAS) simply because that's
the default, and the one we never save anyway

So if you could try the attached patch, and see what the warnings are
when you load your cloud storage, that migh thelp us guess what the
corruption is..

                       Linus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20190714/395c0219/attachment.bin>


More information about the subsurface mailing list