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

Sometimes my app crashes with the following stacktrace #668

Open
mahaju opened this issue Jun 24, 2020 · 0 comments
Open

Sometimes my app crashes with the following stacktrace #668

mahaju opened this issue Jun 24, 2020 · 0 comments

Comments

@mahaju
Copy link

mahaju commented Jun 24, 2020

I update the graph every 50 milliseconds using a Runnable and Handler

If my app crashes, most of the time it happens few seconds after the graph starts updating

Most of the time, the program runs without any problems

In rare cases, the app crashes after letting it run for a few minutes

This is the stacktrace I get if the app crashes:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.app.myapp, PID: 11831
    java.util.ConcurrentModificationException
        at java.util.ArrayList$Itr.next(ArrayList.java:860)
        at com.jjoe64.graphview.series.LineGraphSeries.draw(LineGraphSeries.java:263)
        at com.jjoe64.graphview.GraphView.drawGraphElements(GraphView.java:309)
        at com.jjoe64.graphview.GraphView.onDraw(GraphView.java:336)
        at android.view.View.draw(View.java:20373)
        at android.view.View.updateDisplayListIfDirty(View.java:19318)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
        at android.view.View.updateDisplayListIfDirty(View.java:19277)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
        at android.view.View.updateDisplayListIfDirty(View.java:19277)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
        at android.view.View.updateDisplayListIfDirty(View.java:19277)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
        at android.view.View.updateDisplayListIfDirty(View.java:19277)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
        at android.view.View.updateDisplayListIfDirty(View.java:19277)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
        at android.view.View.updateDisplayListIfDirty(View.java:19277)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
        at android.view.View.updateDisplayListIfDirty(View.java:19277)
        at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:4405)
        at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:4385)
        at android.view.View.updateDisplayListIfDirty(View.java:19277)
        at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:686)
        at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:692)
        at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:800)
        at android.view.ViewRootImpl.draw(ViewRootImpl.java:3496)
        at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3283)
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2818)
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1780)
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7827)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:911)
        at android.view.Choreographer.doCallbacks(Choreographer.java:723)
        at android.view.Choreographer.doFrame(Choreographer.java:658)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:897)
        at android.os.Handler.handleCallback(Handler.java:789)
        at android.os.Handler.dispatchMessage(Handler.java:98)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6944)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

In most cases, if the app crashes at the beginning of the program (that is, few seconds after the graph start updating), just redownloading from Android Studio and running again usually works

How can I debug the cause of this crash?

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