应用程序因致命信号11(SIGSEGV)代码1崩溃(有时) [英] App crashes (sometimes) with Fatal signal 11 (SIGSEGV), code 1

查看:3808
本文介绍了应用程序因致命信号11(SIGSEGV)代码1崩溃(有时)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用HERE SDK开发一个应用程序,到目前为止一切正常.我收到这样的错误:
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x750057 in tid 10206 (FinalizerDaemon)
或这个:
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x94789680 in tid 24605 (FinalizerDaemon)

I am developing an app with the HERE SDK, and everything worked fine until now. I get errors like this one:
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x750057 in tid 10206 (FinalizerDaemon)
or this one:
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x94789680 in tid 24605 (FinalizerDaemon)

它们使我的应用崩溃.

错误并不总是相同的,但是在我的Logcat中它们总是孤单出现,没有其他信息.

It's not always the same errors, but they always come all alone in my Logcat,with no other information.

在我所有的应用程序中,我都在这里使用对象和服务,甚至通过打印stacktrace我也没有获得有关错误的更多信息.
我只是注意到这些错误几乎是随机出现的,但是只有在使用这些对象/服务时才会出现.

In all my app I am using HERE objects and services, and even by printing the stacktrace I don't get more information about the errors.
I just noticed that these errors appear pretty much randomly, but only when I am using these objects/services.

我使用真实的设备来测试我的应用程序,即Sony Xperia Z3紧凑型计算机,因此我认为它不是来自这里.

I use a real device to test my app, a Sony Xperia Z3 compact, so I don't think it comes from here.

我真的迷路了,所以如果有人甚至对如何获得有关错误的更多信息有任何想法,请帮助

I am really lost, so if someone has any idea even on how to get more infos about the errors, please help

 05-09 23:04:10.148 6770-6782/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 6782 (FinalizerDaemon)
05-09 23:04:10.266 30179-30179/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
05-09 23:04:10.266 30179-30179/? I/DEBUG: UUID: 5569a1b9-c913-4101-99fa-5099e2cadd48
05-09 23:04:10.266 30179-30179/? I/DEBUG: Build fingerprint: 'Sony/D5803/D5803:5.1.1/23.4.A.1.264/2418263178:user/release-keys'
05-09 23:04:10.266 30179-30179/? I/DEBUG: Revision: '0'
05-09 23:04:10.266 30179-30179/? I/DEBUG: ABI: 'arm'
05-09 23:04:10.266 30179-30179/? I/DEBUG: pid: 6770, tid: 6782, name: FinalizerDaemon  >>> com.david.metroz <<<
05-09 23:04:10.266 30179-30179/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
05-09 23:04:10.294 30179-30179/? I/DEBUG:     r0 98327400  r1 00000000  r2 00000002  r3 00000000
05-09 23:04:10.294 30179-30179/? I/DEBUG:     r4 aec264c0  r5 b3df7acc  r6 98327400  r7 73652348
05-09 23:04:10.294 30179-30179/? I/DEBUG:     r8 6f9983a8  r9 b482a800  sl 12f1d820  fp b3df7abc
05-09 23:04:10.294 30179-30179/? I/DEBUG:     ip b5303950  sp b3df7ab0  lr b510717f  pc a0b7205c  cpsr a00e0010
05-09 23:04:10.294 30179-30179/? I/DEBUG:     #00 pc 000f405c  /data/app/com.david.metroz-1/lib/arm/libMAPSJNI.so (Java_com_nokia_maps_GeoBoundingBoxImpl_destroyNative+76)
05-09 23:04:10.294 30179-30179/? I/DEBUG:     #01 pc 001d7d4f  /data/dalvik-cache/arm/data@app@com.david.metroz-1@base.apk@classes.dex
05-09 23:04:12.302 862-1274/? E/NativeCrashListener: Exception dealing with report
                                                     android.system.ErrnoException: read failed: EAGAIN (Try again)
                                                         at libcore.io.Posix.readBytes(Native Method)
                                                         at libcore.io.Posix.read(Posix.java:165)
                                                         at libcore.io.BlockGuardOs.read(BlockGuardOs.java:230)
                                                         at android.system.Os.read(Os.java:350)
                                                         at com.android.server.am.NativeCrashListener.consumeNativeCrashData(NativeCrashListener.java:240)
                                                         at com.android.server.am.NativeCrashListener.run(NativeCrashListener.java:138)

现在,我非常确定当我使用gson从数据库中检索HERE对象时,会发生崩溃.

EDIT 2: I am now pretty sure that the crash happens when I am retrieving HERE objects from database using gson.

在相同的应用程序运行时中完成所有操作后,以下代码有效,但是当我在数据库中保存字符串时,关闭应用程序,然后重新打开它,在转换json string的同时得到Fatal signal到对象.

The following code works when everything is done in the same app runtime, but when I save a string in the database, close the app and then re-open it, I get the Fatal signal while converting the json string back to the object.

// to insert I create a json string and then insert it in the database
String mGbSortie = gson.toJson(geoboundinBox);

//and then to retrieve the data :
Type gbType = new TypeToken<GeoBoundingBox>(){}.getType();
geoBoudingBox = gson.fromJson(stringFromDb, listType)

我真的不知道为什么它不起作用.

I really don't know why it doesn't work.

推荐答案

1)首先确定它是否是android,第三方库或您的设备中的错误,以便您知道进行哪种方式.

1) Firstly determine whether it's a bug within the android, the third party libraries or your device, so you can know which way to proceed.

此答案给出了如何执行此操作的解决方案:

This answer gives a solution of how to do this:

如果您编写(或正在使用)通过NDK依次使用本机C/C ++代码的插件,则可能表明该本机代码中存在错误.

If you have written (or are using) a plugin that in turn uses native C/C++ code through the NDK, this may indicate a bug in that native code.

否则,这是您要测试的设备或仿真器的固件中的错误.

Otherwise, this is a bug in the firmware of the device or emulator you are testing upon.

如果您可以在仿真器中,在具有原始ROM的Nexus设备上或在不同制造商的各种设备上重现此错误,则可能是Android本身的错误.在这种情况下,请创建一个可以重现该错误的示例项目,并将其与整个堆栈跟踪一起发布到 http://b.android.com ,Android操作系统问题跟踪器.

If you can reproduce this in an emulator, on a Nexus device with the original ROM, or on a variety of devices from different manufacturers, it is probably a bug in Android itself. In that case, please create a sample project that can reproduce the error, and post it along with the entire stack trace to http://b.android.com, the Android OS issue tracker.

如果您仅在一台设备或一个第三方ROM上遇到此错误,则可能是一个更具体的错误-最好的选择是与您的症状联系设备制造商或ROM发布者.

If you are only encountering this on one device or one third-party ROM, it is probably a more specific bug -- your best bet is to contact the device manufacturer or ROM publisher with your symptoms.

以下两个问题详细讨论了您收到的错误:

There are these two questions which discuss the error you are receiving in detail:

Android致命信号11(SIGSEGV)位于0x636f7d89(代码= 1).如何找到它?

致命信号11(SIGSEGV)位于0x00000000(code = 1)-PhoneGap

2)关于解析geobounds值(看起来可能是问题所在),请确保您使用正确的geobound值正确处理了Gson和Json之间的解析.似乎您存储值的方式与获取它们的方式不一致.

2) In terms of parsing your geobounds values (as it would seem is where the problem may lie), ensure you are handling your parsing between Gson and Json correctly, with the correct geobound values. It appears how you are storing the values is not in accord with how you are retreiving them.

来自湄公河:

toJson()–将Java对象转换为JSON

Gson gson = new Gson();
Staff obj = new Staff();

// 1. Java object to JSON, and save into a file
gson.toJson(obj, new FileWriter("D:\\file.json"));

// 2. Java object to JSON, and assign to a String
String jsonInString = gson.toJson(obj);

fromJson()–将JSON转换为Java对象

Gson gson = new Gson();

// 1. JSON to Java object, read it from a file.
Staff staff = gson.fromJson(new FileReader("D:\\file.json"), Staff.class);

// 2. JSON to Java object, read it from a Json String.
String jsonInString = "{'name' : 'mkyong'}";
Staff staff = gson.fromJson(jsonInString, Staff.class);

// JSON to JsonElement, convert to String later.
JsonElement json = gson.fromJson(new FileReader("D:\\file.json"), JsonElement.class);
String result = gson.toJson(json);

来自此答案:

public class YourObject {
   private String appname;
   private String Version;
   private String UUID;
   private String WWXY;
   private String ABCD;
   private String YUDE;
   //getters/setters


YourObject parsed = new Gson().fromJson(jsons, YourObject.class);  

String jsons = "{'appname':'application', 'Version':'0.1.0', 'UUID':'300V', 'WWXY':'310W', 'ABCD':'270B', 'YUDE':'280T'}";
YourObject parsed = new Gson().fromJson(jsons, YourObject.class);  

JsonObject object = new JsonParser().parse(jsons).getAsJsonObject();
object.get("appname"); // application 
object.get("Version"); // 0.1.0

这些SO问题提供了更多详细信息:
如何使用android中的GSON解析json解析
使用gson和GsonBuilder()解析JSON

These SO questions give more details:
How to parse json parsing Using GSON in android
parse JSON with gson and GsonBuilder()

3)确保为地理绑定坐标传递正确的值. 此问题值不在预期范围内GeoboundingBox WinRT (尽管C#给出了一个很好的示例,说明了如何分解您试图存储和检索的信息的组成部分.

3) Ensure you are passing the correct values for your geobound co-ords. This question Value does not fall within the expected range GeoboundingBox WinRT (although it is C# gives a good example of how to break down the components of information you are trying to store and retrieve.

答案很简单.

var nw = new BasicGeoposition();
nw.Latitude = Max(pos.Coordinate.Latitude, pos2.lat);
nw.Longitude = Min(pos.Coordinate.Longitude, pos2.lng);
var se = new BasicGeoposition();
se.Latitude = Min(pos.Coordinate.Latitude, pos2.lat);
se.Longitude = Max(pos.Coordinate.Longitude, pos2.lng);

并了解如何使用gson解析json:

And learn how to parse your json with gson:

使用Gson在Android应用中使用JSON

还有

There is also this gihub repo for you to browse for more ideas.

这篇关于应用程序因致命信号11(SIGSEGV)代码1崩溃(有时)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆