我正面临这个问题,我们的应用程序在结帐过程中随机崩溃,此崩溃只发生在棒棒糖上,其他版本运行正常。除致命信号外,日志中没有信息。此问题也无法在模拟器上重现,它只发生在运行棒棒糖的设备上。
我重构了网络调用,现在我得到了OpenGL渲染器:Flushing缓存问题。这是在发出一些截击请求后发生的。
06-22 18:48:29.876 24145-24216/com.pangea.android.debug D/OpenGLRenderer﹕ Flushing caches (mode 0)
06-22 18:48:29.877 24145-24157/com.pangea.android.debug A/libc﹕ Fatal signal 11 (SIGSEGV), code 2, fault addr 0x12c7c000 in tid 24157 (FinalizerDaemon)
对于网络堆栈,我使用的是Volley和OkHttp
排球请求是简单的获取请求。
有关如何获取有关崩溃的更多信息的任何建议吗?
以下是创建连接的示例代码:
protected HttpURLConnection createConnection(URL url) throws IOException {
HttpURLConnection connection = new OkUrlFactory(mClient).open(url);
return connection;
}
private HttpURLConnection openConnection(URL url, Request<?> request) throws IOException {
HttpURLConnection connection = createConnection(url);
int timeoutMs = request.getTimeoutMs();
connection.setConnectTimeout(timeoutMs);
connection.setReadTimeout(timeoutMs);
connection.setUseCaches(false);
connection.setDoInput(true);
// use caller-provided custom SslSocketFactory, if any, for HTTPS
if ("https".equals(url.getProtocol()) && mSslSocketFactory != null) {
((HttpsURLConnection) connection).setSSLSocketFactory(mSslSocketFactory);
}
return connection;
}
这是logcat:
06-18 18:08:39.427 915-915/? D/WIFI_ICON﹕ WifiActivity: 3
06-18 18:08:39.427 915-915/? D/StatusBar.NetworkController﹕ dumpIcon[(gone) stat_sys_5signal_5|null stat_sys_wifi_signal_inandout_4 (gone) F]
06-18 18:08:39.627 1006-1016/com.pangea.android.debug W/art﹕ Suspending all threads took: 33.602ms
06-18 18:08:39.657 1006-1021/com.pangea.android.debug I/art﹕ Background partial concurrent mark sweep GC freed 67796(3MB) AllocSpace objects, 3(150KB) LOS objects, 40% free, 12MB/21MB, paused 5.066ms total 149.122ms
06-18 18:08:39.667 1006-1018/com.pangea.android.debug A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x656d616c in tid 1018 (FinalizerDaemon)
06-18 18:08:39.667 1006-1018/com.pangea.android.debug W/libc﹕ Security Level: (1), Debug inforamtion is controlled by the DUMPABLE flag.
06-18 18:08:39.667 11804-11804/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-18 18:08:39.667 11804-11804/? I/DEBUG﹕ Build fingerprint: 'htc/htc_asia_tw/dlxpul:5.0.2/LRX22G/507296.103:user/release-keys'
06-18 18:08:39.667 11804-11804/? I/DEBUG﹕ Revision: '2'
06-18 18:08:39.667 11804-11804/? I/DEBUG﹕ ABI: 'arm'
06-18 18:08:39.667 11804-11804/? I/DEBUG﹕ pid: 1006, tid: 1018, name: FinalizerDaemon >>> com.pangea.android.debug <<<
06-18 18:08:39.667 11804-11804/? I/DEBUG﹕ signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x656d616c
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ r0 b7982668 r1 00000000 r2 00000000 r3 00000000
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ r4 b7982668 r5 656d616e r6 12c638a0 r7 ffffffff
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ r8 70c07e38 r9 b738d940 sl 12c9a1f0 fp 12c638a0
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ ip b6ea10ec sp b455aa78 lr b6bcf17f pc 656d616c cpsr 60070010
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ backtrace:
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #00 pc 656d616c <unknown>
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #01 pc 0002017d /system/lib/libbinder.so (android::Parcel::freeDataNoInit()+22)
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #02 pc 000201a3 /system/lib/libbinder.so (android::Parcel::~Parcel()+4)
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #03 pc 00080683 /system/lib/libandroid_runtime.so
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #04 pc 000173c9 /data/dalvik-cache/arm/system@framework@boot.oat
06-18 18:08:40.158 915-915/? I/RemoteViews﹕ reapply : com.tmobile.pr.mytmobile 1 15
06-18 18:08:40.428 653-653/? E/WifiTrafficPoller﹕ TRAFFIC_STATS_POLL true Token 244 num clients 13
06-18 18:08:40.428 653-653/? E/WifiTrafficPoller﹕ packet count Tx=111024 Rx=151852
06-18 18:08:40.468 3087-3187/? W/SQLiteCursor﹕ Close cursor android.database.sqlite.SQLiteCursor@19398b3 on null twice or more
06-18 18:08:40.468 3087-3187/? W/SQLiteCursor﹕ Close cursor android.database.sqlite.SQLiteCursor@31d0be70 on null twice or more
06-18 18:08:40.758 271-828/? E/QC-NETMGR-LIB﹕ Received nl msg, recvmsg returned 64
06-18 18:08:40.758 271-828/? E/QC-NETMGR-LIB﹕ Received command: ID=NETMGR_KIF_MSG_CMD, link=8
06-18 18:08:40.758 271-828/? E/QC-NETMGR-LIB﹕ Received nl msg, recvmsg returned 64
06-18 18:08:40.758 271-828/? E/QC-NETMGR-LIB﹕ Received command: ID=NETMGR_KIF_MSG_CMD, link=8
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Process command: ID=NETMGR_KIF_MSG_CMD, link=8, state=1
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Processing RTM_NEWADDR
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Metainfo: Family=10 PrefixLen=64 Scope=0x0 Index=13 Flags=[0x0]
06-18 18:08:40.758 271-679/? I/QC-NETMGR-LIB﹕ Attribute: PrefixIPv6 addr [2601:0240:d100:9900:867a:88ff:fe77:631c]
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Attribute: Address Cache Info - prefered=7200 valid=7200 cstamp=0x3924d8 tstamp=0x50cfc1
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Rcvd Netlink msg type [20]
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ unrecognized ifindex 13
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Process command: ID=NETMGR_KIF_MSG_CMD, link=8, state=1
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Processing RTM_NEWADDR
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Metainfo: Family=10 PrefixLen=64 Scope=0x0 Index=13 Flags=[0x1]TEMPORARY
06-18 18:08:40.758 271-679/? I/QC-NETMGR-LIB﹕ Attribute: PrefixIPv6 addr [2601:0240:d100:9900:fdad:b042:7f6c:e7cc]
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Attribute: Address Cache Info - prefered=7200 valid=7200 cstamp=0x3924d8 tstamp=0x50cfc1
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ Rcvd Netlink msg type [20]
06-18 18:08:40.758 271-679/? E/QC-NETMGR-LIB﹕ unrecognized ifindex 13
06-18 18:08:40.758 653-723/? D/libc﹕ [NET] android_getaddrinfofornet+,hn 38(0x323630313a3234),sn(),hints(known),family 0,flags 4
06-18 18:08:40.758 653-723/? D/libc﹕ [NET] android_getaddrinfofornet-, SUCCESS
06-18 18:08:40.758 653-723/? D/libc﹕ [NET] android_getaddrinfofornet+,hn 38(0x323630313a3234),sn(),hints(known),family 0,flags 4
06-18 18:08:40.758 653-723/? D/libc﹕ [NET] android_getaddrinfofornet-, SUCCESS
06-18 18:08:40.758 653-723/? D/libc﹕ [NET] android_getaddrinfofornet+,hn 16(0x323030313a3535),sn(),hints(known),family 0,flags 4
06-18 18:08:40.758 653-723/? D/libc﹕ [NET] android_getaddrinfofornet-, SUCCESS
06-18 18:08:40.758 653-723/? D/libc﹕ [NET] android_getaddrinfofornet+,hn 16(0x323030313a3535),sn(),hints(known),family 0,flags 4
06-18 18:08:40.758 653-723/? D/libc﹕ [NET] android_getaddrinfofornet-, SUCCESS
06-18 18:08:40.828 653-3231/? E/ActivityManager﹕ App crashed! Process: com.pangea.android.debug
06-18 18:08:40.828 653-722/? I/BootReceiver﹕ Copying /data/tombstones/tombstone_03 to DropBox (SYSTEM_TOMBSTONE)
06-18 18:08:40.828 653-2659/? E/SharedPreferencesImpl﹕ Couldn't create directory for SharedPreferences file shared_prefs/log_files.xml
06-18 18:08:40.828 653-3231/? W/ActivityManager﹕ Force finishing activity com.pangea.android.debug/com.pangea.android.ui.activities.MainActivity
06-18 18:08:40.878 653-3231/? D/PMS﹕ acquireWL(382218fc): PARTIAL_WAKE_LOCK ActivityManager-Launch 0x1 653 1000 null
06-18 18:08:40.898 653-1400/? I/ActivityManager﹕ Recipient 1006
06-18 18:08:40.898 653-1098/? I/WindowState﹕ WIN DEATH: Window{1b796396 u0 com.pangea.android.debug/com.pangea.android.ui.activities.MainActivity}
06-18 18:08:40.908 653-724/? D/StatusBarManagerService﹕ setSystemUiVisibility(0x0)
答案 0 :(得分:0)
似乎系统在来自/在后台或您的案例片段状态中实例化Parcel
引用时失败。
Trace说它在创建新实例之前无法释放内存。
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #00 pc 656d616c <unknown>
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #01 pc 0002017d /system/lib/libbinder.so (android::Parcel::freeDataNoInit()+22)
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #02 pc 000201a3 /system/lib/libbinder.so (android::Parcel::~Parcel()+4)
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #03 pc 00080683 /system/lib/libandroid_runtime.so
06-18 18:08:39.687 11804-11804/? I/DEBUG﹕ #04 pc 000173c9 /data/dalvik-cache/arm/system@framework@boot.oat
检查行293和功能freeDataNoInit()