richsmith / sexytopo

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

surveyed a cool alpine cave - Error: Attempt to invoke virtual methode #182

Closed benedikthartmann closed 1 year ago

benedikthartmann commented 1 year ago

Hello Rich,

we surveyed a cool alpine cave. But now we can not open it again in the sexytopo app. See the screenshot and the survey data attached, Screenshot_20220907-143358

Error: Attempt to invoke virtual methode 'vioid org.hwyl.seytopo.model.survey.Station.addOnwardLeg.... griess.zip

Maybe you can help us. We tried a load of things, other android version, ...

olly commented 1 year ago

I took a look at your file, and I think I've managed to find the issue and fix it. Hopefully all of your data is still there. I've uploaded the fixed version.

Griess.zip

It would be helpful to further diagnose the underlying cause of this issue if you could:


The underlying issue was that Station 8, had its name set to 8\n (the legs also reference their destination as 8\n). I was able to replicate this by renaming the station in the data table, and when editing the name, press the "return" button before confirming the input with the "RENAME" button.

I'm not too familiar with Android conventions, but is it possible for the "RETURN" button to function as the "RENAME" confirmation button? That might be a way to solve the issue nicely, and provide for a nicer UX.

Regardless this should probably also be fixed at the data model layer. Perhaps:

benedikthartmann commented 1 year ago

Hey Olivery,

thanks a lot for your fast reply - and the correction of the data. It works now.

It would have took us ages to find this problem.

We are using this android version:

To input the data we are using a DistoX with a modification from Beat Heeb (maybe you know this) It is somehow described here, but in German: https://www.hoehlenverein-blaubeuren.de/index.php/distox2-vermessung

We darkly remember that we renamed the station 8, maybe this caused the issues.

Thanks a lot once again!

Kind Regards

Benedikt

olly commented 1 year ago

Benedikt,

I'm glad that's working for you now. I think I managed to find out how the bug occurred and have a change open for review, which once merged & released should prevent this from happening again.

Happy Exploring!

richsmith commented 1 year ago

Closing this thanks to Olly's PR - will be fixed in the next release.

benedikthartmann commented 1 year ago

Benedikt,

I'm glad that's working for you now. I think I managed to find out how the bug occurred and have a change open for review, which once merged & released should prevent this from happening again.

Happy Exploring!

Great! Thanks a lot.