为什么堆栈跟踪行号信号源不匹配code行号? [英] How come stack trace line numbers don't match source code line numbers?

查看:794
本文介绍了为什么堆栈跟踪行号信号源不匹配code行号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序崩溃与我的设备上的NPE。在与ACRA收到的堆栈跟踪,行号是指两个源$ C ​​$ C类, SQLiteStatement SQLiteDatabase 。对于 SQLiteDatabase ,没有行号的任何源$ C ​​$ C版本匹配的行号。我的设备没有定制ROM。这是一个银河S2运行Android 4.03。

My app crashed with an NPE on my device. In the Stack trace received with ACRA, the line numbers refer to two source code classes, SQLiteStatement and SQLiteDatabase. For SQLiteDatabase, none of the line numbers match the lines numbers in any of the source code versions. My device doesn't have a custom ROM. It's a Galaxy S2 running Android 4.03.

下面的堆栈跟踪:

java.lang.NullPointerException
at android.database.sqlite.SQLiteStatement.releaseAndUnlock(SQLiteStatement.java:290)
at android.database.sqlite.SQLiteStatement.executeUpdateDelete(SQLiteStatement.java:96)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:2025)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1965)
at android.database.sqlite.SQLiteDatabase.beginTransaction(SQLiteDatabase.java:690)
at android.database.sqlite.SQLiteDatabase.beginTransactionNonExclusive(SQLiteDatabase.java:605)
at android.database.sqlite.SQLiteStatement.acquireAndLock(SQLiteStatement.java:247)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:112)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1844)
at com.mydomain.myapp.albums.AlbumsData.insertOrIgnore(AlbumsData.java:89)

如果你看一下的 SQLiteDataBase ://grep$c$c.com/search查询= sqlitedatabase&安培; N = 相对=nofollow>及其不同版本您可以检查为自己的号不匹配。

If you look at the source for SQLiteDataBase in its different versions you can check for yourselves the numbers don't match.

例如,在Android的4.03的<一个href=\"http://grep$c$c.com/file/repository.grep$c$c.com/java/ext/com.google.android/android/4.0.3_r1/android/database/sqlite/SQLiteDatabase.java#SQLiteDatabase\"相对=nofollow> SQLiteDataBase 源,的ExecuteSQL(...)在线1892年被发现而我的堆栈跟踪说它位于行2025

For example, in Android 4.03's SQLiteDataBase source, executesql(...) is found on line 1892 whereas my stack trace says it is located on line 2025.

这怎么可能呢?

<子>(请注意,我不是询问有关NPE的来源)

(Please note I'm not asking about the source of the NPE)

推荐答案

我也不能确定官方Android源Android版手机上的匹配。我认为,三星可能改变机器人为它自己的目的:三星家伙了Android的源4.0.3,修正他们,增加了一些东西,不同的类别( SQLiteDatabase 似乎是其中之一),然后建立它,并得到了他们自己的Andr​​oid版本。他们没有修改常量,显示Android的版本,所以你可以看到,它的'还是'4.0.3。

I wouldn't be sure official android sources matches android version on your phone. I think samsung may changed android for it's own purposes: samsung guys took android 4.0.3 sources, modified them, added some stuff to different classes (SQLiteDatabase seems to be one of them), then build it and got their own version of android. They didn't modify constants that shows version of android so you can see that it's 'still' 4.0.3.

这篇关于为什么堆栈跟踪行号信号源不匹配code行号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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