Activity Diary v1.2.2 crashes when I imported files with another extension

Project Information
Repository: https://github.com/ramack/ActivityDiary
Project Name: Activity Diary

Expected behavior

Activity diary allows the import and export of a database which is saved in sqlite3 format. I expected that on importing the database and using any available file manager for that function, I'll only see the sqlite3 file in the directory where it was saved and even though other file formats can be seen, only the sqlite3 file can be imported successfully.

Actual behavior

When I select the import function, my file manager pops-up and some files are faded which indicates that the file can't be imported. However files in .pdf, .db, .kdbx etc formats can be imported and when it is imported, Activity diary said the import was successful but on going back to main menu, the app crashed.

How to reproduce

Ensure files of any of the aforementioned formats are available on your device.

  • launch the app
  • swipe from left to right to reveal menu
  • goto settings
  • scroll down to import database (exporting a database ain't really a necessary step to reproduce this)
  • browse directories to where any of the files is and select it
  • There's a toast message that import was successful
  • Go back to menu by pressing back button and the app crashes.

Test Enviroment

  • Software version: v 1.2.2
  • Device: Tecno Camon CM
  • Operating system: Android 7.0

Recording of the bug

Logcat

Process: de.rampro.activitydiary, PID: 19473
android.database.sqlite.SQLiteException: no such table: diary (code 1)
    at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)
    at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:861)
    at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)
    at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
    at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:154)
    at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:143)
    at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:219)
    at android.database.AbstractCursor.moveToFirst(AbstractCursor.java:258)
    at de.rampro.activitydiary.model.conditions.GlobalOccurrenceCondition.doEvaluation(GlobalOccurrenceCondition.java:63)
    at de.rampro.activitydiary.model.conditions.Condition$1.run(Condition.java:68)
    at java.lang.Thread.run(Thread.java:761)

The above logcat was gotten when I imported a .db file.

FATAL EXCEPTION: GlobalOccurrenceCondition-Thread-4
Process: de.rampro.activitydiary, PID: 18957
android.database.sqlite.SQLiteDatabaseCorruptException: file is encrypted or is not a database (code 26)
    at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(Native Method)
    at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:861)
    at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:836)
    at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
    at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:154)
    at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:143)
    at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:219)
    at android.database.AbstractCursor.moveToFirst(AbstractCursor.java:258)
    at de.rampro.activitydiary.model.conditions.GlobalOccurrenceCondition.doEvaluation(GlobalOccurrenceCondition.java:63)
    at de.rampro.activitydiary.model.conditions.Condition$1.run(Condition.java:68)
    at java.lang.Thread.run(Thread.java:761)

This one was gotten when I imported a .kdbx(keepass) file

Both logcats seem slightly different.

This issue was opened on github and was acknowledged by the project owner.

Proof of Work Done

This is the link to my github account

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center