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

ACRA may fail if last Activity touches views on Activity#finish() #464

Closed
william-ferguson-au opened this issue May 28, 2016 · 2 comments
Closed

Comments

@william-ferguson-au
Copy link
Member

ReportExecutor#endApplication#290 in 4.8.5 maps to line#265 in master.

May need to call lastActivity from handler thread. Which has issues wrt killing off the application.

NB this was with ACRA-4.8.5

android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:7099)
at android.view.ViewRootImpl.clearChildFocus(ViewRootImpl.java:3316)
at android.view.ViewGroup.clearChildFocus(ViewGroup.java:800)
at android.view.ViewGroup.clearChildFocus(ViewGroup.java:800)
at android.view.ViewGroup.clearChildFocus(ViewGroup.java:800)
at android.view.ViewGroup.clearChildFocus(ViewGroup.java:800)
at android.view.ViewGroup.clearChildFocus(ViewGroup.java:800)
at android.view.View.clearFocusInternal(View.java:4955)
at android.view.View.clearFocus(View.java:4938)
at android.view.ViewGroup.clearFocus(ViewGroup.java:813)
at com.millennialmedia.android.AdViewOverlayView.h(SourceFile:710)
at com.millennialmedia.android.AdViewOverlayActivity.finish(SourceFile:174)
at com.millennialmedia.android.MMActivity.finish(SourceFile:272)
at org.acra.builder.ReportExecutor.endApplication(SourceFile:290)
at org.acra.builder.ReportExecutor.access$600(SourceFile:40)
at org.acra.builder.ReportExecutor$3.run(SourceFile:257)
@F43nd1r
Copy link
Member

F43nd1r commented May 28, 2016

An activity should not do any work in finish. This should instead be done in onPause, onStop or onDestroy, depending on the usecase.

However, it should be no problem to call finish on the UI thread.

@william-ferguson-au
Copy link
Member Author

Agree 100% that an Activity should not be touching its UI in #finish(). However we don't always write/control all the Activities in our apps.

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

2 participants