Commit c5abbea
committed
feat: add crash handler with cache cleanup
Added signal handlers for common crash signals (SIGSEGV, SIGILL,
SIGABRT, SIGFPE) to automatically clean up QML cache directory when
crashes occur in release builds. This prevents corrupted cache from
causing repeated startup failures. The handler first removes the
qmlcache directory, then re-raises the signal to generate core dump
for debugging.
Influence:
1. Test application startup after simulating crashes to verify cache
cleanup works
2. Verify normal operation is unaffected in debug builds (QT_DEBUG
defined)
3. Check that core dumps are still generated for crash analysis
4. Test QML loading performance after cache cleanup to ensure proper
regeneration
feat: 添加崩溃处理及缓存清理功能
为常见崩溃信号(SIGSEGV、SIGILL、SIGABRT、SIGFPE)添加信号处理程序,在
发布版本中发生崩溃时自动清理QML缓存目录。这可以防止损坏的缓存导致重复启
动失败。处理程序会先删除qmlcache目录,然后重新触发信号以生成核心转储用于
调试。
Influence:
1. 模拟崩溃后测试应用启动,验证缓存清理功能正常工作
2. 验证调试版本(定义了QT_DEBUG)的正常操作不受影响
3. 检查崩溃分析所需的核心转储是否仍然生成
4. 测试缓存清理后的QML加载性能,确保正确重新生成
PMS: BUG-3132931 parent 2ce629d commit c5abbea
1 file changed
+32
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | | - | |
25 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
26 | 43 | | |
27 | 44 | | |
28 | 45 | | |
| |||
53 | 70 | | |
54 | 71 | | |
55 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
56 | 86 | | |
57 | 87 | | |
58 | 88 | | |
| |||
0 commit comments