GithubHelp home page GithubHelp logo

Comments (5)

hontogit avatar hontogit commented on July 29, 2024 1

Thanks to you for quick response and app. πŸ˜ƒ

I was able to read the file and both contacts have the value -1 in Relative, and a 3 in CloseContact and EncounterType. I have no idea how the negative value sneaked in there.

from contactdiary.

igor-cali avatar igor-cali commented on July 29, 2024 1

I still experience this issue in v1.1.3 from F-droid.
I cannot read data/data/com.apozas.contactdiary/databases/ContactDiary.db since my device is not rooted.
Anyway, I assume the same root cause of -1 values affects my installation as well.

Proposal: set to default values in case -1 is read. E.g.

  • Relative: No
  • EncounterType: Outdoor
  • CloseContact: Unsure

from contactdiary.

apozas avatar apozas commented on July 29, 2024

Hi,

Thanks for reaching out, and apologies for the inconveniences this is causing.

By any chance, do you happen to have your phone rooted? If so, would you mind accessing the database (in data/data/com.apozas.contactdiary/databases/ContactDiary.db) and let me know which are the values of the fields Relative, CloseContact and EncounterType?

Thank you very much, and sorry for the hassle.

from contactdiary.

apozas avatar apozas commented on July 29, 2024

Well, thank you for taking the time to help debug this. I was finding very difficult to replicate the conditions that were giving rise to this bug. As you may check by the activity in the repo, there has recently been an issue with how the information in the RadioButtons was handled, all because of this commit. My guess is that your failing contacts were created with the answer No in the Relative or close Friend question in v<1.0.5, later opened with v1.0.5 and saved in order to "confirm" that the RadioButtons were not properly saved. Since EditContactActivity.kt does not do an empty-field check for the RadioGroups (there is a reason for this: there is no way to have all the RadioButtons in a RadioGroup unchecked after one has been checked, and EditContactActivity.kt does not expect an empty RadioGroup because of the checks done before saving in NewContactActivity.kt), this was allowing a -1 to be saved.

In short, the issue appears with some (not all) contacts saved in v<1.0.5, opened and re-saved in v1.0.5, while trying to open them in v>1.0.5. This issue should not appear when saving contacts in v1.0.5. Thus, the quickest fix for you will be to read the entries in the database by hand, and insert them again manually in the app.

I will think how to best deal with this issue and release a fix in the next version.

Thanks a lot!

from contactdiary.

apozas avatar apozas commented on July 29, 2024

Commit 41c4788 should finally fix this problem. It implements @igor-cali's proposal, which is the most sensible given that the error appeared when saving in v1.0.5 a contact where the last RadioButton in any of the RadioGroups was chosen.

In the meantime, I discovered the marvels of Android Studio's Database Inspector to change fields of the database on-the-fly. This will prevent having this many partial fixes again. Thank you for your patience. I will keep the issue open a few days to see if anyone encounters a problem in this regard.

from contactdiary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.