Android 系统 WebView 崩溃 Android 应用程序! "Tombstones are disabled on JB MR2+ user builds"

Android System WebView crashes Android apps! "Tombstones are disabled on JB MR2+ user builds"

编辑:事实证明它不是Chrome而是Android System WebView。 Google Play 商店上的其他几位用户留下了诸如 应用程序崩溃且没有任何错误.

之类的回复

原文post:

今晚我的 Chrome 应用程序 已更新(Android 5.0.2),当我尝试在 DEBUG 中构建我的 Xamarin Android 应用程序时模式我得到错误:

[google-breakpad] ### ### ### ### ### ### ### ### ### ### ### ### ###

[google-breakpad] Chrome build fingerprint:

[google-breakpad] 1.0

[google-breakpad] 1

[google-breakpad] 5c230f07-455f-4c1f-91eb-9c44019cd813

[google-breakpad] ### ### ### ### ### ### ### ### ### ### ### ### ###

[google-breakpad] Tombstones are disabled on JB MR2+ user builds.

[google-breakpad] ### ### ### ### ### ### ### ### ### ### ### ### ###

在控制台中我可以找到错误消息:

E/SysUtils﹕ ApplicationContext is null in ApplicationStatus

这似乎是铬的一部分。

当 webview returns 出现时,控制台和应用程序 returns 返回(但未被销毁)时出现错误。 webview是在另外一个框架下发的

自昨天以来我没有做任何更改,当时一切正常。

构建(并崩溃)后 运行 设备中的应用程序正常运行。

我的目标构建版本是 API 21,API 最低是 14(但它在 19 时也失败)。

事实证明,导致应用程序崩溃的不是 Chrome,而是 Android System WebView。 Google Play 商店上的其他几位用户留下了诸如 应用程序崩溃且没有任何错误.

之类的回复

编辑:

Xamarin Bugzilla 上的 Jonathan Pryor 发布了 this comment

As mentioned in Comment #2 and Comment #3, the problem is that the Google Play Service WebView and related types is clobbering existing SIGSEGV handlers, which screws things up for all native code which relies on signal handlers (e.g. Houdini).

As a workaround, it is possible to remove the need for a SIGSEGV handler for NullReferenceException raising, by setting the MONO_DEBUG variable to contain the value "explicit-null-checks":

http://docs.go-mono.com/?link=man%3amono(1)

This can be done by adding a file to your App project with a Build action of AndroidEnvironment:

http://developer.xamarin.com/guides/android/advanced_topics/environment/

Then adding the following line to the file:

MONO_DEBUG=explicit-null-checks

您可以卸载 WebView 更新,这样您就可以在修复此问题的同时处理您的项目。

我们发现在我们的案例中,它在抛出异常时崩溃了。如果我们使用 Java.Lang.Exception 而不是 C# 异常,它不会崩溃。

我提交了一个 Chromium 错误,似乎是根本原因。 http://code.google.com/p/chromium/issues/detail?id=481420

我找到了 Unity 的修复程序。已经过验证和测试。

1) 在 YOUR_UNITY_PROJECT/Assets/Editor 下安装这个脚本(这个很棒的脚本归功于 Prime31):

https://github.com/prime31/P31UnityAddOns/blob/master/Editor/GlobalDefinesWizard.cs

2) 正如@fhl 提到的,您需要将 MONO_DEBUG=explicit-null-checks 添加到全局定义中,您可以通过单击新添加的全局定义标签来执行此操作,并确保它看起来像这样:

3) 现在创建一个新版本,它应该可以修复您的崩溃问题。