richsmith / sexytopo

The SexyTopo cave surveying app for Android
GNU General Public License v3.0
29 stars 13 forks source link

Deleting parent of the active station sometimes leaves the deleted station active #171

Open tarquinwj opened 2 years ago

tarquinwj commented 2 years ago

I don't know how to reliably reproduce this, since it sometimes works correctly, and sometimes doesn't. It's random. Whenever I try to make the bug happen, it doesn't. But it happens with my real surveys.

Survey from 1-2-3-4-5-6 with legs and splays. Delete station 3.

It is supposed to make station 2 active. Sometimes it doesn't make any station active. Taking more reading causes them to disappear into a black hole, but it sometimes vibrates to say it made an invisible station. At least it doesn't crash :)

Android 11 SexyTopo 1.6.1

CaverBruce commented 2 years ago

sounds familiar...

tarquinwj commented 2 years ago

Indeed it does. This used to cause a nasty crash, which lost me a day of surveying (which Rich thankfully recovered for me). He fixed the crasher, and in most cases made it set a valid station to active, but it seems there is still some vestigial bug hanging around.

richsmith commented 2 years ago

The underlying data model is a little hacky. I'd like to rewrite it when I have time.