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

swipe must not be null #11

Closed
farkasmate opened this issue May 17, 2020 · 1 comment
Closed

swipe must not be null #11

farkasmate opened this issue May 17, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@farkasmate
Copy link
Owner

Wear app crashed with:

--------- beginning of crash
05-17 19:50:20.064  7913  7913 E AndroidRuntime: FATAL EXCEPTION: main
05-17 19:50:20.064  7913  7913 E AndroidRuntime: Process: y2k.dash, PID: 7913
05-17 19:50:20.064  7913  7913 E AndroidRuntime: java.lang.IllegalStateException: swipe must not be null
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at y2k.dash.ui.main.MainFragment$onActivityCreated$3.invoke(MainFragment.kt:39)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at y2k.dash.ui.main.MainFragment$onActivityCreated$3.invoke(MainFragment.kt:16)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at y2k.dash.shared.DashletViewModel$setOnRefreshFinishedListener$1.invoke(DashletViewModel.kt:45)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at y2k.dash.shared.DashletViewModel$setOnRefreshFinishedListener$1.invoke(DashletViewModel.kt:11)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at y2k.dash.shared.utils.RequestQueueSingleton$1.onRequestFinished(RequestQueueSingleton.kt:28)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at com.android.volley.RequestQueue.finish(RequestQueue.java:238)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at com.android.volley.Request.finish(Request.java:230)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at com.android.volley.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:112)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:739)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:95)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5422)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
05-17 19:50:20.064  7913  7913 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
05-17 19:50:20.069  1808  2091 W ActivityManager:   Force finishing activity y2k.dash/.MainActivity
@farkasmate farkasmate added the bug Something isn't working label May 17, 2020
@farkasmate
Copy link
Owner Author

Cancel requests when the app exits:
https://developer.android.com/training/volley/simple#cancel

In your activity's onStop() method, cancel all requests that have this tag.

protected fun onStop() {
    super.onStop()
    requestQueue?.cancelAll(TAG)
}

farkasmate pushed a commit that referenced this issue May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant