#64 App crashes due to network issue

Açık
chihuazhang tarafından 4 yıl önce kere açıldı · 0 yorum
chihuazhang 4 yıl önce olarak yorumlandı

Studies have shown that mobile apps are prone to crashes due to a network issue, mainly because successful network calls return unexpected or no data. And we found that when this app (version 2.1.1)'s network returned data is null or some fields are null (JSON format), the app has crashed. the specific crash information is as follows:

1. java.lang.NullPointerException: Attempt to invoke virtual method 'void org.notabug.lifeuser.moviedb.activity.DetailActivity$AlphaForegroundColorSpan.setAlpha(float)' on a null object reference

at org.notabug.lifeuser.moviedb.activity.DetailActivity$2.onScrollChanged(DetailActivity.java:174)
at org.notabug.lifeuser.moviedb.NotifyingScrollView.onScrollChanged(NotifyingScrollView.java:51)
at android.view.View.scrollTo(View.java:12415)
at android.widget.ScrollView.scrollTo(ScrollView.java:1649)
at android.view.View.scrollBy(View.java:12430)
at android.widget.ScrollView.smoothScrollBy(ScrollView.java:1211)
at android.widget.ScrollView.scrollToChildRect(ScrollView.java:1374)
at android.widget.ScrollView.requestChildRectangleOnScreen(ScrollView.java:1500)
at android.view.View.requestRectangleOnScreen(View.java:5539)
at android.view.View.requestRectangleOnScreen(View.java:5505)
at android.widget.TextView.bringPointIntoView(TextView.java:7445)
at android.widget.TextView.onPreDraw(TextView.java:5228)
at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2055)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858)
at android.view.Choreographer.doCallbacks(Choreographer.java:670)
at android.view.Choreographer.doFrame(Choreographer.java:606)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844)
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:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

2. java.lang.NumberFormatException: Invalid int: "null"

at java.lang.Integer.invalidInt(Integer.java:138)
at java.lang.Integer.parse(Integer.java:410)
at java.lang.Integer.parseInt(Integer.java:367)
at java.lang.Integer.parseInt(Integer.java:334)
at org.notabug.lifeuser.moviedb.activity.CastActivity.setActorData(CastActivity.java:280)
at org.notabug.lifeuser.moviedb.activity.CastActivity.access$1500(CastActivity.java:62)
at org.notabug.lifeuser.moviedb.activity.CastActivity$ActorDetails.onPostExecute(CastActivity.java:513)
at org.notabug.lifeuser.moviedb.activity.CastActivity$ActorDetails.onPostExecute(CastActivity.java:450)
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:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Studies have shown that mobile apps are prone to crashes due to a network issue, mainly because successful network calls return unexpected or no data. And we found that when this app (version 2.1.1)'s network returned data is null or some fields are null (JSON format), the app has crashed. the specific crash information is as follows: 1. java.lang.NullPointerException: Attempt to invoke virtual method 'void org.notabug.lifeuser.moviedb.activity.DetailActivity$AlphaForegroundColorSpan.setAlpha(float)' on a null object reference at org.notabug.lifeuser.moviedb.activity.DetailActivity$2.onScrollChanged(DetailActivity.java:174) at org.notabug.lifeuser.moviedb.NotifyingScrollView.onScrollChanged(NotifyingScrollView.java:51) at android.view.View.scrollTo(View.java:12415) at android.widget.ScrollView.scrollTo(ScrollView.java:1649) at android.view.View.scrollBy(View.java:12430) at android.widget.ScrollView.smoothScrollBy(ScrollView.java:1211) at android.widget.ScrollView.scrollToChildRect(ScrollView.java:1374) at android.widget.ScrollView.requestChildRectangleOnScreen(ScrollView.java:1500) at android.view.View.requestRectangleOnScreen(View.java:5539) at android.view.View.requestRectangleOnScreen(View.java:5505) at android.widget.TextView.bringPointIntoView(TextView.java:7445) at android.widget.TextView.onPreDraw(TextView.java:5228) at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:944) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2055) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1107) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6013) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:858) at android.view.Choreographer.doCallbacks(Choreographer.java:670) at android.view.Choreographer.doFrame(Choreographer.java:606) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:844) 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:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 2. java.lang.NumberFormatException: Invalid int: "null" at java.lang.Integer.invalidInt(Integer.java:138) at java.lang.Integer.parse(Integer.java:410) at java.lang.Integer.parseInt(Integer.java:367) at java.lang.Integer.parseInt(Integer.java:334) at org.notabug.lifeuser.moviedb.activity.CastActivity.setActorData(CastActivity.java:280) at org.notabug.lifeuser.moviedb.activity.CastActivity.access$1500(CastActivity.java:62) at org.notabug.lifeuser.moviedb.activity.CastActivity$ActorDetails.onPostExecute(CastActivity.java:513) at org.notabug.lifeuser.moviedb.activity.CastActivity$ActorDetails.onPostExecute(CastActivity.java:450) 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:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Giriş yap bu konuşmaya katılmak için.
Kilometre Taşı Yok
Atanan Kişi Yok
1 Katılımcı
Yükleniyor...
İptal
Kaydet
Henüz bir içerik yok.