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

Find some Crashes . #503

Open YYYSSSHHH opened 4 years ago

YYYSSSHHH commented 4 years ago

Environment Info: APK Version :10.9.993 (223) AndroidOS Version = 6.0.1 Description information: These crashes happened by accident when I was testing. I tried to reproduce them and found that they can't be reproduced, but they are real. I hope they can help you to debug.

Crash Info:

Crash one:

crashActivity=org.liberty.android.fantastischmemo.ui.AlgorithmCustomizationScreen : java.lang.NumberFormatException: Invalid float: "android" at java.lang.StringToReal.invalidReal(StringToReal.java:63) at java.lang.StringToReal.initialParse (StringToReal.java:164) at java.lang.StringToReal.parseFloat(StringToReal.java:323) at java.lang.Float.parseFloat(Float.java:306) at java.lang.Float.valueOf(Float.java:343)

at org.liberty.android.fantastischmemo.ui.widgets.FloatEditTextPreference.persistString(FloatEditTextPreference.java:53) at android.preference.EditTextPreference.setText (EditTextPreference.java:92) at android.preference.EditTextPreference.onDialogClosed(EditTextPreference.java:146) at android.preference.DialogPreference.onDismiss (DialogPreference.java:395) at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1338) at android.os.Handler.dispatchMessage(Handler.java:102) 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)

Crash Two:

crashActivity=org.liberty.android.fantastischmemo.ui.SettingsScreen : java.lang.IllegalArgumentException: View=com.android.internal.policy.PhoneWindow$DecorView{458fbd V.E...... R......D 0,0-647,271} not attached to window manager at
android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:424) at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:350) at
android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:116) at android.app.Dialog.dismissDialog(Dialog.java:377) at android.app.Dialog.dismiss(Dialog.java:360)

at org.liberty.android.fantastischmemo.downloader.common.AbstractDownloaderFragment$FetchDatabaseTask.onPostExecute(AbstractDownloaderFragment.java:325) at
org.liberty.android.fantastischmemo.downloader.common.AbstractDownloaderFragment$FetchDatabaseTask.onPostExecute(AbstractDownloaderFragment.java:294) at android.os.AsyncTask.finish (AsyncTask.java:651) at android.os.AsyncTask.-wrap1(AsyncTask.java) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668) at
android.os.Handler.dispatchMessage(Handler.java:102) 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)

Crash Three:

crashActivity=org.liberty.android.fantastischmemo.ui.QuizActivity : java.lang.NullPointerException: Attempt to invoke virtual method 'void org.liberty.android.fantastischmemo.utils.DictionaryUtil.showLookupListDialog(java.lang.String,
java.lang.String[])' on a null object reference at org.liberty.android.fantastischmemo.ui.QuizActivity.onOptionsItemSelected(QuizActivity.java:156) at
android.app.Activity.onMenuItemSelected(Activity.java:2926) at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:408) at
android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:198) at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected (WindowCallbackWrapper.java:113) at android.support.v7.app.AppCompatDelegateImplV9.onMenuItemSelected(AppCompatDelegateImplV9.java:675) at
android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:822) at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:156) at
android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:969) at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:959) at
android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:623) at android.support.v7.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:154) at
android.view.View.performClick(View.java:5204) at android.view.View$PerformClick.run(View.java:21153) 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)

YYYSSSHHH commented 4 years ago

How do we test the APP? We use the fuzzing method to simulate the network response data. For example, when the app receives network API response data from the server or the network, we will replace it with 404, null and random data.

A very simple example:

normal data :Value=”hello” -----fuzzing-----> simulated data :Value=null or network request fails(404、503) or Value=”heee”(random data) or Value=""(empty) , etc.