Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I found some crash issues #65

Open
YYYSSSHHH opened this issue Aug 17, 2020 · 1 comment
Open

I found some crash issues #65

YYYSSSHHH opened this issue Aug 17, 2020 · 1 comment

Comments

@YYYSSSHHH
Copy link

Environment Info:
APK version 4.4 (13)
AndroidOS Version = 6.0.1

Description information:
We find that mobile apps are prone to crashes due to a network issue, mainly because successful network API calls return unexpected or no data.
And we found that when this app's network returned data is empty, or some fields are null (JSON format), the app has crashed.

crash information:
Crash One:

crashActivity=org.asdtm.goodweather.MainActivity
:
java.lang.NumberFormatException: Invalid float: "null"
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 org.asdtm.goodweather.e.a(dalvik_source_goodweather_13.apk)
at org.asdtm.goodweather.widget.MoreWidgetService.onHandleIntent(dalvik_source_goodweather_13.apk)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)

Crash Two:
crashActivity=org.asdtm.goodweather.MainActivity
:
java.lang.StringIndexOutOfBoundsException: length=0; regionStart=0; regionLength=1
at java.lang.String.startEndAndLength(String.java:298)
at java.lang.String.substring(String.java:1087)
at org.asdtm.goodweather.model.b$c.a(dalvik_source_goodweather_13.apk)
at org.asdtm.goodweather.e.a(dalvik_source_goodweather_13.apk)
at org.asdtm.goodweather.widget.MoreWidgetService.onHandleIntent(dalvik_source_goodweather_13.apk)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:66)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.os.HandlerThread.run(HandlerThread.java:61)

Finally:
The cause of the program crash may be that the network response data is not handled properly in the code, such as null.
If you have confirmed or fixed this problem, please give me a reply, thank you!

@YYYSSSHHH
Copy link
Author

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 server or 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant