Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dtk6declarative] Tooltip可能导致程序退出段错误 #193

Open
rb-union opened this issue Aug 5, 2024 · 0 comments
Open

[dtk6declarative] Tooltip可能导致程序退出段错误 #193

rb-union opened this issue Aug 5, 2024 · 0 comments

Comments

@rb-union
Copy link

rb-union commented Aug 5, 2024

SUMMARY | 问题概要

程序退出时偶现段错误。
查看堆栈,程序无法查找到 DTK 单例, DQuickControlColorSelector::onPaletteDestroyed() 函数被固定触发,通过在此函数中添加 dumpObjectTree 等调试信息,触发者来自 ToolTip 。
和ToolTip触发后退出 Palette 等资源的释放可能相关,通过Demo,可稳定复现此问题。

DTK and OS VERSIONS | DTK&系统版本信息

Distribution: v23 0719
Pacakge: dtk6declarative 6.0.16+u003

本地打包编译 6.0.18 基于 c2d07b2abcda620556da392cddb8ef7754c85b5c 测试同样现象

Minimal Reproducible Case Code | 最小复现案例代码

使用QtCreator模板创建 Dtk6 QtQuickApplication,在 Button 中添加 ToolTip 触发代码

    Component {
        Button {
            // 
            ToolTip.delay: 500
            ToolTip.text: qsTr("Original size")
            ToolTip.timeout: 5000
            ToolTip.visible: hovered
            // end

            anchors.centerIn: parent
            text: qsTr("Button")
        }
    }

代码:
clicktiptest.zip

OBSERVED RESULT | 观察到的结果

多次点击/hover按钮,触发ToolTip显示,程序退出出现段错误(大概40%~60%概率)。

_._20240805110654.mp4
#18 0x00007f3fa8baa70d _Z10doActivateILb0EEvP7QObjectiPPv (libQt6Core.so.6 + 0x1aa70d)
#19 0x00007f3fa710b789 _ZN18QQmlOpenMetaObject15checkedSetValueEiRK8QVariantb (libQt6Qml.so.6 + 0x30b789)
#20 0x00007f3fa9140eeb _ZN3Dtk5Quick26DQuickControlColorSelector22updatePropertyFromNameERK10QByteArrayPKNS0_20DQuickControlPaletteE (libdtk6declarative.so.6 + 0x140eeb)
#21 0x00007f3fa91444a0 _ZN3Dtk5Quick26DQuickControlColorSelector18onPaletteDestroyedEv (libdtk6declarative.so.6 + 0x1444a0)
#22 0x00007f3fa8baa928 _Z10doActivateILb0EEvP7QObjectiPPv (libQt6Core.so.6 + 0x1aa928)
#23 0x00007f3fa8baae93 _ZN7QObject9destroyedEPS_ (libQt6Core.so.6 + 0x1aae93)

相关的程序coredump信息(基于 dtk6declarative 6.0.16+u003)
core.clicktiptest.1000.e54f87e93804424fa10aed0bc2a4a352.58880.17228272.zip

EXPECTED RESULT | 期望的结果

程序正常退出,ToolTip等控件的显示与否不会影响资源释放

ADDITIONAL INFORMATION | 额外补充

No response

FeiWang1119 added a commit to FeiWang1119/dtkdeclarative that referenced this issue Aug 19, 2024
kegechen added a commit to kegechen/dtkdeclarative that referenced this issue Aug 22, 2024
do not set value if control's window is null
Issue: linuxdeepin/dtk#193
kegechen added a commit to kegechen/dtkdeclarative that referenced this issue Aug 26, 2024
do not set value if control's window is null
Issue: linuxdeepin/dtk#193
kegechen added a commit to kegechen/dtkdeclarative that referenced this issue Aug 27, 2024
do not set value if app is about to quit
Issue: linuxdeepin/dtk#193
kegechen added a commit to kegechen/dtkdeclarative that referenced this issue Aug 27, 2024
do not set value if app is about to quit
Issue: linuxdeepin/dtk#193
kegechen added a commit to kegechen/dtkdeclarative that referenced this issue Sep 9, 2024
do not set value if app is about to quit
Issue: linuxdeepin/dtk#193
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant