fekracomputers / IslamicLibraryAndroid

Islamic books Library with improved features
GNU General Public License v3.0
56 stars 22 forks source link

Click on "download feature" on some new books added, Application will crash. #77

Open rezamusic881 opened 6 years ago

rezamusic881 commented 6 years ago

Expected behavior

Supposedly, Application does not Crash. When the user adds a few "New Books" (Pencil Icon), Then Click "Download Feature" (Arrow icon Down) on the new book added simultaneously.

Actual behavior

Crashes Occur on the Application. When the user adds a few "New Books" (Pencil Icons), Then Click "Download Features" (Arrow icon Down) in new book added simultaneously.

How to reproduce

  1. Instal App here
  2. Run the app.
  3. Do some book additions by clicking "Add feature book" on the "pencil icon" located on the home menu.
  4. When finished add some books. Click the "Download feature" or the "Arrow Keys" icon on the new book you add, simultaneously and quickly, The application will crash.

Screenshot_2018-05-30-02-55-29-919_com.whatsapp.png

Screenshot_2018-05-30-02-55-35-054_com.whatsapp.png

Screenshot_2018-05-30-02-55-38-846_com.whatsapp.png

You can see my screen recording video below for instructions to make it easier to find bugs in the app!

Environment



Recording Of The Issues

https://youtu.be/1mzK-hSy5ac


Logcat

Proof logcat that the application is experiencing Crash & Error Code
05-30 02:17:20.486  3988  3988 E AndroidRuntime: FATAL EXCEPTION: main
05-30 02:17:20.486  3988  3988 E AndroidRuntime: Process: com.fekracomputers.islamiclibrary, PID: 3988
05-30 02:17:20.486  3988  3988 E AndroidRuntime: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: BooksCollection.CollectionOrder (code 2067)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.database.sqlite.SQLiteConnection.nativeExecuteForChangedRowCount(Native Method)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.database.sqlite.SQLiteConnection.executeForChangedRowCount(SQLiteConnection.java:734)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.database.sqlite.SQLiteSession.executeForChangedRowCount(SQLiteSession.java:754)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:64)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.database.sqlite.SQLiteDatabase.updateWithOnConflict(SQLiteDatabase.java:1579)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.database.sqlite.SQLiteDatabase.update(SQLiteDatabase.java:1525)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at com.fekracomputers.islamiclibrary.databases.UserDataDBHelper$GlobalUserDBHelper.updateCollectionOrder(UserDataDBHelper.java:973)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at com.fekracomputers.islamiclibrary.databases.UserDataDBHelper$GlobalUserDBHelper.moveCollectionDown(UserDataDBHelper.java:997)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at com.fekracomputers.islamiclibrary.homeScreen.controller.BookCollectionsController.collectionActionHandler(BookCollectionsController.java:180)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at com.fekracomputers.islamiclibrary.homeScreen.adapters.CollectionRecyclerViewAdapter$ViewHolder.onClick(CollectionRecyclerViewAdapter.java:132)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at com.fekracomputers.islamiclibrary.homeScreen.adapters.CollectionRecyclerViewAdapter$ViewHolder$$Lambda$4.onClick(Unknown Source)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.view.View.performClick(View.java:5647)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:22462)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:754)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:163)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6361)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
05-30 02:17:20.486  3988  3988 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)