Fixed dconfig exit crash caused by static variable destruction order 1. Added null pointer check before accessing m_config in updateValue method to prevent accessing destroyed objects 2. Added m_config.storeRelaxed(nullptr) in destructor to clear the atomic pointer 3. Added early return checks in connect and updateValue methods when config is null 4. Updated default value for p_rules to use proper unicode string literal The issue occurred because static dconfig objects were being destroyed after the QCoreApplication instance, leading to attempts to access already destroyed DConfig objects during cleanup. The fix ensures proper null checking and pointer cleanup to prevent crashes during application exit. Log: Fixed application exit crash related to dconfig static variables Influence: 1. Test application normal startup and shutdown 2. Verify dconfig functionality still works correctly 3. Test with multiple dconfig instances 4. Verify no crashes occur during application termination 5. Test configuration value changes and updates fix: 修复dconfig静态变量释放导致的退出异常 修复了由静态变量销毁顺序引起的dconfig退出崩溃问题 1. 在updateValue方法中添加空指针检查,防止访问已销毁的对象 2. 在析构函数中添加m_config.storeRelaxed(nullptr)来清理原子指针 3. 在connect和updateValue方法中添加config为null时的提前返回检查 4. 更新p_rules的默认值为正确的unicode字符串字面量 问题出现在静态dconfig对象在QCoreApplication实例之后被销毁时,导致在清 理过程中尝试访问已销毁的DConfig对象。修复确保进行适当的空值检查和指针清 理,以防止应用程序退出时的崩溃。 Log: 修复了与dconfig静态变量相关的应用程序退出崩溃问题 Influence: 1. 测试应用程序正常启动和关闭 2. 验证dconfig功能仍然正常工作 3. 测试多个dconfig实例的情况 4. 验证应用程序终止时不会发生崩溃 5. 测试配置值更改和更新功能 PMS: BUG-324689 |
||
|---|---|---|
| .. | ||
| ch2py | ||
| dci | ||
| dconfig2cpp | ||
| deepin-os-release | ||
| qdbusxml2cpp | ||
| settings | ||
| CMakeLists.txt | ||