UniRegensburg / unsere-app-fur-die-universitat-regensburg-bib-buddy

Bib Buddy - deine App für eine konzentrierte, offene Literaturarbeit!
0 stars 0 forks source link

Note related bugs #119

Closed xSabrina closed 3 years ago

xSabrina commented 3 years ago

There are some small bugs related to notes.

  1. Blobs have a limited size of 1MB which might cause the app to crash on potentially creating too large voice notes.

  2. Creating a new text note in editor and leaving it (going back to the BookNotesFragment) is causing its itemView to be selected on default - could not find the reason yet.

LuisMossburger commented 3 years ago

Found another one: If you select text from right to left and then format it (e.g. make it bold), app crashes. I guess switching the boundary numbers so that the smaller one is always "left" of the bigger one would solve this?

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: de.bibbuddy, PID: 6733
    java.lang.IndexOutOfBoundsException: setSpan (7 ... 2) has end before start
        at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1318)
        at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:684)
        at android.text.SpannableStringBuilder.setSpan(SpannableStringBuilder.java:676)
        at de.bibbuddy.RichTextEditor.styleValid(RichTextEditor.java:117)
        at de.bibbuddy.RichTextEditor.italic(RichTextEditor.java:110)
        at de.bibbuddy.TextNoteEditorFragment.lambda$setupItalic$7$TextNoteEditorFragment(TextNoteEditorFragment.java:228)
        at de.bibbuddy.-$$Lambda$TextNoteEditorFragment$kMfX8tfiHftgkGWfcQgTGbUaKfo.onClick(Unknown Source:4)
        at android.view.View.performClick(View.java:7448)
        at android.view.View.performClickInternal(View.java:7425)
        at android.view.View.access$3600(View.java:810)
        at android.view.View$PerformClick.run(View.java:28305)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

=> This may only be an emulator problem, as I used the keyboard to select text here. As far as I can tell, this does not happen on real devices :)

xSabrina commented 3 years ago
  1. Blobs have a limited size of 1MB which might cause the app to crash on potentially creating too large voice notes.

This not relevant anymore since we are not using blobs anymore.

LuisMossburger commented 3 years ago
2\. Creating a **new text note** in editor and leaving it (going back to the BookNotesFragment) is causing its itemView to be **selected on default** - could not find the reason yet.

This was solved by #139 .

LuisMossburger commented 3 years ago

Found another one: If you select text from right to left and then format it (e.g. make it bold), app crashes. I guess switching the boundary numbers so that the smaller one is always "left" of the bigger one would solve this?

As discussed in team meeting, this issue can only happen in the emulator if one uses the keyboard to select text from right to left - therefore doesn't need to be solved by @xSabrina .

LuisMossburger commented 3 years ago

All here noted bugs are solved or not relevant, therefore closing this :)