itachi1706 / HypixelStatistics

An android application thats built with the public Hypixel API (ABANDONED)
1 stars 0 forks source link

App Crash Report #30

Closed itachi1706 closed 9 years ago

itachi1706 commented 9 years ago

Interesting thing that happens when WiFi is disabled while querying player

App Details App Version: 1.6.0 App Name: com.itachi1706.hypixelstatistics

Device Information Model: HTC One_M8 Manufacturer: HTC OS Build: htc/htc_asia_wwe/htc_m8:5.0.1/LRX22C/457188.2:user/release-keys Android Version: 5.0.1 Android Code: 457188.2 SDK Level: 21

Stacktrace:

java.lang.IllegalArgumentException: View=com.android.internal.policy.impl.PhoneWindow$DecorView{395b416 V.E..... R......D 0,0-1026,483} not attached to window manager
at android.view.WindowManagerGlobal.findViewLocked(WindowManagerGlobal.java:386)
at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:312)
at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:84)
at android.app.Dialog.dismissDialog(Dialog.java:341)
at android.app.Dialog.dismiss(Dialog.java:324)
at com.itachi1706.hypixelstatistics.AsyncAPI.Players.GetPlayerByNameExpanded.onPostExecute(GetPlayerByNameExpanded.java:146)
at com.itachi1706.hypixelstatistics.AsyncAPI.Players.GetPlayerByNameExpanded.onPostExecute(GetPlayerByNameExpanded.java:58)
at android.os.AsyncTask.finish(AsyncTask.java:632)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:155)
at android.app.ActivityThread.main(ActivityThread.java:5696)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1028)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
itachi1706 commented 9 years ago

Fix planned by checking if dialog is still showing, if it is null and if so, dont try and dismiss it

if (progress.isShowing() && progress != null){
    progress.dismiss();
}

Also probably prevent rotation of screen lol

I also need to really implement cancel operations. Procrastination TTM :P