Commit 63dd24e
committed
fix: prevent crash during static destruction of DPluginLoader
1. Modified DPluginLoader destructor to check Qt application state
before calling destroy()
2. Added condition to only call destroy() when qApp exists and
application is not closing down
3. Added warning message when skipping destruction to avoid crash during
static cleanup
4. This prevents crashes when DPluginLoader is destroyed after Qt global
resources have been cleaned up
Log: Fixed potential crash during application shutdown when using static
plugin loader
Influence:
1. Test application shutdown process with static plugin loader
2. Verify no crashes occur during normal application exit
3. Test edge cases where Qt resources might be cleaned up early
4. Monitor for warning messages about skipped destruction during
abnormal shutdown
5. Verify memory cleanup still occurs properly during normal shutdown
fix: 防止 DPluginLoader 静态析构时崩溃
1. 修改 DPluginLoader 析构函数,在调用 destroy() 前检查 Qt 应用程序状态
2. 添加条件判断,仅当 qApp 存在且应用程序未关闭时才调用 destroy()
3. 添加警告信息,当跳过析构以避免静态清理期间的崩溃时进行提示
4. 防止在 Qt 全局资源已清理后销毁 DPluginLoader 时发生崩溃
Log: 修复使用静态插件加载器时应用程序关闭可能崩溃的问题
Influence:
1. 测试使用静态插件加载器时的应用程序关闭过程
2. 验证正常应用程序退出时不会发生崩溃
3. 测试 Qt 资源可能提前清理的边缘情况
4. 监控异常关闭期间关于跳过析构的警告信息
5. 验证正常关闭期间内存清理仍能正确进行
PMS: BUG-3508871 parent a9a8f03 commit 63dd24e
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
233 | 244 | | |
234 | 245 | | |
235 | 246 | | |
| |||
0 commit comments