简体   繁体   English

看到本机崩溃(“内存冲突”,sig = 11),而不是Android堆栈跟踪

[英]Seeing native crash (“memory violation”, sig=11) instead of Android stack trace

I recently started seeing a lot more native crashes in my app, in situations where it seemed like I should be seeing a managed crash and an Android stack trace. 最近,在似乎应该看到托管崩溃和Android堆栈跟踪的情况下,我的应用程序中发现了更多本机崩溃。 With a native crash, the app closes immediately, without the "Unfortunately your_app_name has stopped" box. 如果发生本机崩溃,应用程序将立即关闭,而不会出现“不幸的是your_app_name已停止”框。 And instead of a nice Android stack trace in logcat, I see something like this: 而且,我看到的不是代替logcat中不错的Android堆栈跟踪:

04-01 16:07:53.165 1263-1263/? E/audit: type=1701 msg=audit(1459544873.165:4214): auid=4294967295 uid=10535 gid=10535 ses=4294967295 subj=u:r:untrusted_app:s0 pid=2372 comm="app.debug" reason="memory violation" sig=11

To test this, I intentionally generated a NullPointerException with the following code, within the onClick() method of an OnClickListener: 为了测试这一点,我故意在OnClickListener的onClick()方法内使用以下代码生成了NullPointerException:

Log.v("debugtag", "" + ((String)null).length());

I knew for sure that this should result in an Android stack trace, but instead I saw only the output associated with a native crash. 我确定这会导致Android堆栈跟踪,但我只看到了与本机崩溃相关的输出。 Something is clearly interfering with exception handling. 显然有一些东西在干扰异常处理。

I noticed that this started happening following an upgrade to Flurry 6.3.0. 我注意到,这是在升级到Flurry 6.3.0之后开始发生的。 Has anyone else seen this happening? 有人看到过这种情况吗?

I downgraded to Flurry 6.2.0, and this problem went away. 我降级到Flurry 6.2.0,这个问题消失了。 Instead of native crashes, I now see full Android stack traces, as expected. 与预期的一样,我现在看到的不是完整的崩溃,而是完整的Android堆栈跟踪。

When debugging an app with Flurry 6.3.0, I noticed that I would sometimes end up in Flurry's uncaughtException() method just prior to the native crash. 使用Flurry 6.3.0调试应用程序时,我注意到有时在本机崩溃之前有时会遇到Flurry的uncaughtException()方法。 The decompiled Flurry code is clearly obfuscated. 反编译的Flurry代码显然被混淆了。 Within class "ma" there is a private inner class "a" which implements UncaughtExceptionHandler. 在“ ma”类中,有一个私有内部类“ a”,它实现UncaughtExceptionHandler。 In the uncaughtException() method of inner class "a", this is what I see as the first four lines of code: 在内部类“ a”的uncaughtException()方法中,这是我看到的前四行代码:

ma var3 = ma.this;
Throwable var8 = var2;
Thread var7 = var1;
Set var9 = var3.c();

In executing the last line of code, the debug session ends and the native crash occurs. 在执行最后一行代码时,调试会话结束,并且发生本机崩溃。

I have reported this situation to Flurry. 我已经将这种情况报告给Flurry。 I don't yet know whether this is something that is peculiar to my app, or whether this is an issue with Flurry. 我尚不知道这是我的应用程序所特有的东西,还是Flurry的问题。 I'll update here as additional information becomes available. 我将在此处更新,以获取其他信息。

I did try calling FlurryAgent.setCaptureUncaughtExceptions(false) prior to calling FlurryAgent.init(), but the native crash still occurs. 确实尝试过在调用FlurryAgent.setCaptureUncaughtExceptions(false)之前先调用FlurryAgent.setCaptureUncaughtExceptions(false) ),但是本机崩溃仍然会发生。

UPDATE: Flurry reports the issue fixed in their 6.3.1 release. 更新:Flurry报告了其6.3.1版本中修复的问题。 According to their release notes , the issue introduced in 6.3.0 only affected debug builds -- not release builds. 根据他们的发行说明 ,在6.3.0中引入的问题仅影响调试版本,而不影响发行版本。

Same here. 同样在这里。 Have to downgrade to 6.2.0 to solve this issue. 必须降级到6.2.0才能解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM