helloworld1 / AnyMemo

Advanced Spaced Repetition flashcard learning software for Android.
http://www.anymemo.org
GNU General Public License v2.0
151 stars 53 forks source link

I find a Crash !!! #502

Open YYYSSSHHH opened 4 years ago

YYYSSSHHH commented 4 years ago

Reproduce Step:

1597633937200.zip

1. 1

2. 2

Environment Info: APK Version :10.9.993 (223) AndroidOS Version = 6.0.1 Description information: When the XXX. db database content is empty, APP crashes directly.

Crash Info: crashActivity=org.liberty.android.fantastischmemo.ui.CardPlayerActivity

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Integer org.liberty.android.fantastischmemo.entity.Card.getId()' on a null object reference at org.liberty.android.fantastischmemo.ui.CardPlayerActivity.bindCardPlayerService(CardPlayerActivity.java:213) at org.liberty.android.fantastischmemo.ui.CardPlayerActivity.onPostInit(CardPlayerActivity.java:111) at org.liberty.android.fantastischmemo.ui.QACardActivity$2.run(QACardActivity.java:648) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148)

at android.app.ActivityThread.main(ActivityThread.java:5539)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)