Skip to content

I found some crash issues #65

@YYYSSSHHH

Description

@YYYSSSHHH

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions