Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempting to go to notes from the menu causes the app to crash #697

Closed
bvahedy opened this issue Jun 5, 2020 · 22 comments
Closed

Attempting to go to notes from the menu causes the app to crash #697

bvahedy opened this issue Jun 5, 2020 · 22 comments
Assignees
Milestone

Comments

@bvahedy
Copy link

bvahedy commented Jun 5, 2020

In build 370 and 371 I noticed when attempting to access Notes from the menu the app crashes.
I am able to create a note by highlighting the verse and tapping on the pencil icon on top menu.
I'm also able to see the note by tapping on the pencil in the verse and viewing that note. But I'm unable to get a list of notes by going through the main menu ( tap on top left on menu bar then tap on notes)

If you are unable to duplicate this, is it possible that my notes database has been corrupted? If so why would I be able to still create notes.

@bvahedy bvahedy self-assigned this Jun 5, 2020
@bvahedy bvahedy changed the title Attempting to go to notes from the menu causes an app to crash Attempting to go to notes from the menu causes the app to crash Jun 5, 2020
@bvahedy
Copy link
Author

bvahedy commented Jun 5, 2020

You are right Timmy, I used sqlIte manager and found one entry in the mynotes table with a chapter 0. Once I removed that and reimported the database I was able to go into notes list from the menu. I will close this ticket.

@bvahedy bvahedy closed this as completed Jun 5, 2020
@bvahedy bvahedy removed their assignment Jun 5, 2020
@tuomas2
Copy link
Contributor

tuomas2 commented Jun 5, 2020

Although there is illegal chapter 0 in DB I want to fix this such that there's no crash (but missing entries only).

@tuomas2 tuomas2 reopened this Jun 5, 2020
@tuomas2
Copy link
Contributor

tuomas2 commented Jun 5, 2020

Because #673 might (have) create(d) such illegal entries.

@tuomas2 tuomas2 closed this as completed Jun 5, 2020
@tuomas2 tuomas2 reopened this Jun 5, 2020
@tuomas2 tuomas2 added this to the v3.3 milestone Jun 5, 2020
JJK96 added a commit to JJK96/and-bible that referenced this issue Jun 5, 2020
JJK96 added a commit to JJK96/and-bible that referenced this issue Jun 5, 2020
tuomas2 added a commit that referenced this issue Jun 5, 2020
Prevent crash on note with invalid versification
@tuomas2
Copy link
Contributor

tuomas2 commented Jun 6, 2020

This was fixed in 373 as well.

@tuomas2 tuomas2 closed this as completed Jun 6, 2020
@bvahedy
Copy link
Author

bvahedy commented Jun 6, 2020

Since I removed the chapter 0 entry from my notes database manually I would not be able to test this, but since I can still access my notes through the menu it all seems good and no crash so far. I can try to restore an older database and see if I can test it. Will let you know if I find a problem.

@tuomas2
Copy link
Contributor

tuomas2 commented Jun 6, 2020

You can also edit your database manually to add there chapter 0 entries, to check if this works.

@bvahedy
Copy link
Author

bvahedy commented Jun 6, 2020

Ok, if there are any notes with a chapter 0 the app doesn't crash and it will display the following window every time you try to go to the my note list:
Screenshot_20200606-003541_Bible Study

@tuomas2 tuomas2 reopened this Jun 6, 2020
@tuomas2
Copy link
Contributor

tuomas2 commented Jun 6, 2020

@JJK96 was it like this for you?

@JJK96
Copy link
Contributor

JJK96 commented Jun 6, 2020

Yes, I mentioned this in the pull request, I also mentioned alternatives to this behaviour.

See #699

@timbze
Copy link
Contributor

timbze commented Jun 6, 2020

I think we need to do database migration and remove notes with chapter 0. That would take care of this error. Why leave non-usable data in database?

@tuomas2
Copy link
Contributor

tuomas2 commented Jun 6, 2020 via email

@tuomas2
Copy link
Contributor

tuomas2 commented Jun 6, 2020

Whoever has time can do this :-) I will do this next week if no pull request appears.

@tuomas2
Copy link
Contributor

tuomas2 commented Jun 6, 2020

I now implemented data migration in d585d23. Can someone review the commit?

@tuomas2
Copy link
Contributor

tuomas2 commented Jun 6, 2020

I think I kind of trigger this chapter 0 bug still in one special case:

  1. Create my note for Gen.1.0 by long-clicking on first title ("Chapter 1"), on KJV.
    -> there are icon both on both titles as shown in screenshot
  2. Click icon on upper title
    -> editor opens chapter 0 note

Screenshot_1591456008

@timbze
Copy link
Contributor

timbze commented Jun 6, 2020 via email

@tuomas2
Copy link
Contributor

tuomas2 commented Jun 6, 2020 via email

@bvahedy
Copy link
Author

bvahedy commented Jun 6, 2020 via email

@timbze
Copy link
Contributor

timbze commented Jun 6, 2020 via email

@bvahedy
Copy link
Author

bvahedy commented Jun 6, 2020 via email

@tuomas2
Copy link
Contributor

tuomas2 commented Jun 7, 2020

With the latest fix, I think we can declare this issue fixed. (build 374)

@bvahedy
Copy link
Author

bvahedy commented Jun 7, 2020

It's still showing me to create a note for verse 0.
If you highlight verse 2 then 1 and then the chapter title. You can then create a note for v0-2 and if you try to go into notes the note will come up empty. But at least no crash happens. I did this in build 374.

@tuomas2
Copy link
Contributor

tuomas2 commented Jun 8, 2020

Fixed in build 375 (Thanks @timbze )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants