question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Presentation surface of presentation service is destroyed when terminating the parent application

See original GitHub issue

This problem occurs when an app contains both an activity and a presentation service. When terminating the activity(app) then the presentation service’s surface is destroyed.

I’ve observed this problem in my own application but it also occurs with the demoService application. Android OS version: 7.0

Bringing the app to the background works correctly, only destroying the app triggers this behavior. The presentation service is automatically restarted after 1 sec, after which it works correctly.

Error captured with adb logcat 12-20 15:31:20.326 3713 7220 I WindowManager_SurfaceController: Destroying surface Surface(name=com.android.systemui/com.android.systemui.recents.RecentsActivity) called by com.android.server.wm.WindowStateAnimator.destroySurface:2840 com.android.server.wm.WindowStateAnimator.destroySurfaceLocked:1070 com.android.server.wm.WindowState.destroyOrSaveSurface:2561 com.android.server.wm.AppWindowToken.destroySurfaces:412 com.android.server.wm.AppWindowToken.destroySurfaces:376 com.android.server.wm.AppWindowToken.notifyAppStopped:456 com.android.server.wm.WindowManagerService.notifyAppStopped:5199

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
commonsguycommented, Dec 20, 2017

OK, I will take a look at this in a couple of days. In the meantime, you could try making your service be a foreground service, if it is not one already, and see if that helps. You will need this for Android 8.0+ anyway, and my guess is that this is not a problem with the library but rather a problem of the service being destroyed. But, I’ll look into it more in the coming days.

Thanks for the info!

0reactions
Artaliziancommented, Dec 22, 2017

Thanks for quickly looking into this and providing a fix for the problem!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Service | Android Developers
(It is still theoretically possible for the service to be killed under extreme memory pressure from the current foreground application, but in practice...
Read more >
Chapter 32 - Interim Relief Actions, Corrections, Cancellations ...
a. A correction changes information shown on an earlier action on which an error occurred or adds information that was omitted from an...
Read more >
Incarceration as a ground for termination of parental rights
An incarcerated parent may be required to attend counseling, parenting classes, or vocational training programs as part of the reunification service plan if ......
Read more >
CAPR 10-2 - Civil Air Patrol
Electronic records are data in a form that can be created, read, stored, ... catastrophic event is not likely to damage/destroy both the ......
Read more >
STEPS FOR FILLING OUT THE WORK RELEASE PAPERWORK
I will be terminated from the program and face criminal charges. I understand that if I tamper with or obtain prisoner's personal property...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found