Bug 28143 - WIN DEATH
Summary: WIN DEATH
Status: RESOLVED ANSWERED
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 5.1
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2015-03-18 04:35 UTC by Alex
Modified: 2015-03-18 11:59 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
logcat output right before device shuts down (128.73 KB, application/octet-stream)
2015-03-18 04:35 UTC, Alex
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED ANSWERED

Description Alex 2015-03-18 04:35:56 UTC
Created attachment 10393 [details]
logcat output right before device shuts down

I don't know if this is a Xamarin.Android or device/Android issue, we let the app regularly run over night and the next day we find that the device has shutdown itself.  

As a possible cause we found : I/WindowManager( 1322): WIN DEATH in the logcat output. I attached such an output to this bug report.



=== Xamarin Studio ===

Version 5.7.2 (build 7)
Installation UUID: 6462d445-676f-48dc-8d02-deb35154603b
Runtime:
	Microsoft .NET 4.0.30319.18444
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 4.20.0 (Business Edition)
Android SDK: C:\Users\aschonefeld\AppData\Local\Android\android-sdk
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: C:\Program Files\Java\jdk1.8.0_31
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

=== Build Information ===

Release ID: 507020007
Git revision: dcf3f486177d3e625349b51a8f3be807e3fa7712
Build date: 2015-02-24 05:29:53-05
Xamarin addins: ea7c65bb7876e4a876ab365208e94acdf8f330ef

=== Operating System ===

Windows 6.1.7601.65536 (64-bit)
Comment 1 Alex 2015-03-18 04:36:27 UTC
Any ideas about how we could trace the issue down?
Comment 2 Jonathan Pryor 2015-03-18 11:59:54 UTC
WIN DEATH isn't a cause; it's a symptom:

> I/WindowManager( 1322): WIN DEATH: Window{4078e258 gkl.android.Scanner/gkl.scanner.android.app.activities.InitializationActivity paused=true}^M

What it means is that the window died, because the process associated with that window exited.

The question, then, is why did the process exit?

Obvious things to look for are SIGSEGV and unhanded exception messages, which brings us to:

> I/Process ( 1322): Sending signal. PID: 11089 SIG: 9

"SIG: 9" is SIGKILL, meaning the process didn't die "by itself", it was killed by an "external party"...e.g. through the Application Not Responding dialog, or closing the app through the multitasking "menu" (?), or `adb shell am force-stop`, or someone with root access just decided to `kill -9 YOUR_PID`.

Whatever. :-)

In this case, it was probably via `adb shell am force-stop` (or equivalent), as the following message is:

> I/ActivityManager( 1322): Force stopping package gkl.android.Scanner uid=10037

Regardless, there's nothing for you to do here. This isn't an app "bug", or an app-based exit. This is an app exit caused by "external forces" -- of which there are many! -- and there's nothing you can do to prevent it.