crash

APP测试要点

谁都会走 提交于 2020-03-10 18:30:25
app出现ANR,是什么原因导致的? 1.主线程执行了耗时操作,比如数据库操作或网络编程 2.其他进程(就是其他程序)占用CPU导致本进程得不到CPU时间片, 比如其他进程的频繁读写操作可能会导致这个问题。 细分的话,导致ANR的原因有如下几点: 1.耗时的网络访问 2.大量的数据读写 3.数据库操作 4.硬件操作(比如camera) 5.调用thread的join()方法、sleep()方法、wait()方法或者等待线程锁的时候 6.service binder的数量达到上限 7.system server中发生WatchDog ANR 8.service忙导致超时无响应 9.其他线程持有锁,导致主线程等待超时 10.其它线程终止或崩溃导致主线程一直等待。 App出现crash原因有哪些: 1.内存管理错误:可能是可用内存过低,app所需的内存超过设备的限制, app跑不起来导致App crash。 或是内存泄露,程序运行的时间越长,所占用的内存越大,最终用尽全部内存,导致整个系统崩溃。 亦或非授权的内存位置的使用也可能会导致App crash。 2.程序逻辑错误:数组越界、堆栈溢出、并发操作、逻辑错误: e.g. app新添加一个未经测试的新功能,调用了一个已释放的指针,运行的时候就会crash。 3.设备兼容:由于设备多样性,app在不同的设备上可能会有不同的表现。 4

linux的crash之hardlock排查记录

不羁的心 提交于 2020-03-06 08:11:19
3.10.0-327的内核,crash记录如下: KERNEL: vmlinux DUMPFILE: vmcore [PARTIAL DUMP] CPUS: 48 DATE: Wed Oct 18 20:37:18 2017 UPTIME: 1 days, 09:43:06 LOAD AVERAGE: 13.42, 10.66, 9.48 TASKS: 7329 NODENAME: host-10-229-143-10 RELEASE: 3.10.0-327.22.2.el7.x86_64 VERSION: #1 SMP Fri Sep 29 15:13:08 CST 2017 MACHINE: x86_64 (2199 Mhz) MEMORY: 383.6 GB PANIC: "Kernel panic - not syncing: Watchdog detected hard LOCKUP on cpu 10" PID: 24023 COMMAND: "fas_readwriter" TASK: ffff882f460a2e00 [THREAD_INFO: ffff882f10c44000] CPU: 10 STATE: TASK_RUNNING (PANIC)-----------------------------------------R状态死锁,进程长时间处于TASK

Program freezes on bufferedreader close

帅比萌擦擦* 提交于 2020-03-06 04:05:50
问题 Program freezes when closing buffered reader. Using forge modding API for minecraft, however I've had this issue before with standalone server side code. This particular code worked fine and then randomly started giving me this issue, not sure how to go about fixing this.. The close method: public static void closeConnection() { if (keepConnection) { keepConnection = false; try { bufferedReader.close(); printWriter.close(); socket.close(); } catch (IOException e) { e.printStackTrace(); }

Program freezes on bufferedreader close

不打扰是莪最后的温柔 提交于 2020-03-06 04:05:11
问题 Program freezes when closing buffered reader. Using forge modding API for minecraft, however I've had this issue before with standalone server side code. This particular code worked fine and then randomly started giving me this issue, not sure how to go about fixing this.. The close method: public static void closeConnection() { if (keepConnection) { keepConnection = false; try { bufferedReader.close(); printWriter.close(); socket.close(); } catch (IOException e) { e.printStackTrace(); }

[译]了解和分析iOS应用崩溃报告

人盡茶涼 提交于 2020-03-02 06:53:07
当一个应用发生崩溃时会产生一份崩溃报告(Crash Report),该报告可以帮助我们了解崩溃的产生原因。该文档讲述了关于怎么样符号化、理解和分析崩溃报告的相关内容。 介绍 获取崩溃和低内存报告 分析崩溃报告 头部信息 异常代码 应用具体信息 回溯 线程状态 二进制映像 了解低内存报告 相关文档 文档修改记录 介绍 当iOS设备上的应用崩溃时,设备上会为其生成和保存一份崩溃报告。崩溃报告描述了应用程序在什么情况下结束运行的。在大多数情况下报告会为每个执行的线程包含一个完整的回溯(Backtrace),这对于调试应用崩溃问题时非常有用。如果你是iOS开发者,你应该查看这些崩溃报告来了解你的应用存在哪些崩溃,并且应该对这些崩溃进行修复。 崩溃报告中带有的回溯必须要先进行 符号化 (Symbolicated)才可以进行分析。符号化(Symbolication)指的是使用人能够读懂的方法名称和行号来替换回溯里面的内存地址信息。如果你通过Xcode的Devices窗口获得一台设备的崩溃日志,那么它会在几秒钟内自动地将日志进行符号化。否则你需要手动将.crash文件导入到Xcode的Devices窗口中进行符号化。可以参考符号化(Symbolication)章节来了解详细的内容 低内存报告与其它崩溃报告不同的地方在于它没有回溯信息。当一个低内存崩溃发生时,你必须检查你的内存使用图表

My app just crashed, how can I get the crash log?

拈花ヽ惹草 提交于 2020-02-28 15:51:04
问题 I am testing my app on my actual device, and it seems like there is a memory leak. The app has crashed after a couple of hours. How can I pull up the log of the crash? I plugged my phone in via USB and tried: adb logcat -v but I get the following message in my terminal: - waiting for device - error: more than one device and emulator How can I diagnose my crash? 回答1: That's because there's... more than one device and emulator The error is fairly clear. So, what you do in this case is: adb

My app just crashed, how can I get the crash log?

一曲冷凌霜 提交于 2020-02-28 15:50:10
问题 I am testing my app on my actual device, and it seems like there is a memory leak. The app has crashed after a couple of hours. How can I pull up the log of the crash? I plugged my phone in via USB and tried: adb logcat -v but I get the following message in my terminal: - waiting for device - error: more than one device and emulator How can I diagnose my crash? 回答1: That's because there's... more than one device and emulator The error is fairly clear. So, what you do in this case is: adb

My program crashes when GC perform garbage collection

混江龙づ霸主 提交于 2020-02-25 09:54:11
问题 My program has a trouble: When GC perform garbage collection,my program always crashes at a function,which is called by main flow several times before crashing and the first line of this function is GC.Collect().The function main action is sending some bytes to serial port and receiving some bytes from the same serial port( Both sending and received bytes are below 256 bytes) each time.GC.Collect() calling is for locating the crashing point,it'll be removed in release edition. I don't know

洛谷1829:crash的数字表格

我是研究僧i 提交于 2020-02-07 08:07:51
洛谷1829:crash的数字表格 题意: 求 \(\sum_{i=1}^N\sum_{j=1}^Mlcm(i,j)\) 。 数据范围 \(:n,m\leq10^7\) 。 思路: 易得:原式 \[ \sum_{i=1}^N\sum_{j=1}^M\frac{ij}{gcd(i,j)}​ \] 枚举 \(gcd(i,j)=d\) 。 \[ \sum_{d=1}^{min(N,M)}\sum_{i=1}^N\sum_{j=1}^M[gcd(i,j)=d]\frac{ij}{d} \] 把 \(d\) 给提出来,其实就是将枚举项 \(i,j\) 看成是 \(di,dj\) 。 \[ \sum_{d=1}^{min(N,M)}\frac{1}{d}\sum_{i=1}^{\frac{N}{d}}\sum_{j=1}^{\frac{M}{d}}[gcd(i,j)=1]idjd.\\\sum_{d=1}^{min(N,M)}d\sum_{i=1}^{\frac{N}{d}}\sum_{j=1}^{\frac{M}{d}}[gcd(i,j)=1]ij \] 我们知道莫比乌斯函数的一个重要性质。 \[ \sum_{d|n}\mu(d)=[n=1] \] 代入可得: \[ \sum_{d=1}^{min(N,M)}d\sum_{i=1}^{\frac{N}{d}}\sum_{j=1}^{\frac

[国家集训队] Crash的数字表格 - 莫比乌斯反演,整除分块

 ̄綄美尐妖づ 提交于 2020-02-05 15:55:42
考虑到 \(lcm(i,j)=\frac{ij}{gcd(i,j)}\) \(\sum_{i=1}^n\sum_{j=1}^m\frac{ij}{gcd(i,j)}\) \(\sum_{d=1}^{n}\sum_{i=1}^n\sum_{j=1}^m[gcd(i,j)==d]\frac{ij}{d}\) \(\sum_{d=1}^{n}\sum_{i=1}^{n/d}\sum_{j=1}^{m/d}[gcd(i,j)==1]{ijd}\) \(=\sum_{d=1}^{n}d\sum_{i=1}^{n/d}\sum_{j=1}^{m/d}[gcd(i,j)==1]{ij}\) 看后面 \(\sum_{i=1}^{n/d}\sum_{j=1}^{m/d}[gcd(i,j)==1]{ij}\) \(=\sum_{i=1}^{x}\sum_{j=1}^{y}[gcd(i,j)==1]{ij}\) 考虑反演 \(f(d)=\sum_{i=1}^{x}\sum_{j=1}^{y}[gcd(i,j)==d]{ij}\) \(G(d)=\sum_{i=1}^{x}\sum_{j=1}^{y}[d|gcd(i,j)]{ij}\) \(G(d)=d^2\sum_{i=1}^{x/d}\sum_{j=1}^{y/d}[1|gcd(i,j)]{ij}\) \(G(d)=d^2\sum_{i=1}^{x