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

TabWidget segfaults on the Qt backend with the Breeze visual style (Linux) #7762

Open
griffi-gh opened this issue Feb 27, 2025 · 4 comments
Open
Labels
bug Something isn't working candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran upstream Needs a fix upstream

Comments

@griffi-gh
Copy link

griffi-gh commented Feb 27, 2025

Bug Description

simply adding this:

TabWidget {
            Tab {
                title: "First";
            }

            Tab {
                title: "Second";
            }
        }

Causes a segfault on linux if the Qt6 backend is used:

Thread 1 "kimchi" received signal SIGSEGV, Segmentation fault.

gdb traceback:

(gdb) where
#0  QTabWidget::documentMode (this=0x0) at /build/qtbase-everywhere-src-6.8.2/src/widgets/widgets/qtabwidget.cpp:1364
#1  0x00007fffe8390237 in Breeze::Style::tabWidgetTabBarRect (this=0x5555576bfaa0, option=0x7ffffffccda0, widget=0x0)
    at /build/breeze-6.3.0/kstyle/breezestyle.cpp:2509
#2  Breeze::Style::tabWidgetTabBarRect (this=0x5555576bfaa0, option=0x7ffffffccda0, widget=0x0)
    at /build/breeze-6.3.0/kstyle/breezestyle.cpp:2500
#3  0x0000555556be3955 in __cpp_closure_5367423239582594642_impl (horizontal=@0x7ffffffcd087: false, size=..., tabbar_size=...)
    at qt_widgets/tabwidget.rs:138
#4  0x0000555556be372d in __cpp_closure_5367423239582594642 (horizontal=@0x7ffffffcd087: false, size=..., tabbar_size=..., 
    __result=0x7ffffffcd088) at qt_widgets/tabwidget.rs:148
#5  0x0000555556bd57ea in i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::{closure#0} (
    orientation=i_slint_core::items::Orientation::Vertical) at qt_widgets/tabwidget.rs:126
#6  0x0000555556bd5931 in i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::{closure#2} () at qt_widgets/tabwidget.rs:153
#7  0x0000555556bd3caa in i_slint_core::properties::{impl#5}::evaluate<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics, i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::{closure_env#2}> (self=0x555557710d70, _value=0x555557710ae0)
    at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.9.2/properties.rs:745
#8  0x0000555556b8b0a3 in i_slint_core::properties::{impl#8}::set_binding::{closure#0}<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics, i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::{closure_env#2}> (val=0x555557710ae0)
    at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.9.2/properties.rs:938
#9  0x0000555556b92e8a in i_slint_core::properties::{impl#0}::evaluate<i_slint_core::properties::{impl#8}::set_binding::{closure_env#0}<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics, i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::{closure_env#2}>> (self=..., value=0x555557710ae0)
    at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.9.2/properties.rs:329
#10 0x0000555556b90f28 in i_slint_core::properties::alloc_binding_holder::evaluate::{closure#0}<i_slint_core::properties::{impl#8}::set_binding::{closure_env#0}<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics, i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::{closure_env#2}>> () at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.9.2/properties.rs:432
#11 0x0000555556b8dcad in i_slint_core::properties::CURRENT_BINDING::set<i_slint_core::properties::alloc_binding_holder::evaluate::{closure_env#0}<i_slint_core::properties::{impl#8}::set_binding::{closure_env#0}<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics, i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::{closure_env#2}>>, i_slint_core::properties::BindingResult> (
    self=0x55555749e738 <i_slint_core::properties::CURRENT_BINDING>, t=..., f=...)
    at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/scoped-tls-hkt-0.1.5/src/lib.rs:258
#12 0x0000555556b90a1f in i_slint_core::properties::alloc_binding_holder::evaluate<i_slint_core::properties::{impl#8}::set_binding::{closure_env#0}<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics, i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::{closure_env#2}>> (_self=0x555557710d50, value=0x555557710ae0)
    at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.9.2/properties.rs:431
#13 0x0000555556b8a809 in i_slint_core::properties::{impl#3}::update::{closure#0}<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics> (binding=...) at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.9.2/properties.rs:628
#14 0x0000555556b898a2 in i_slint_core::properties::PropertyHandle::access<bool, i_slint_core::properties::{impl#3}::update::{closure_env#0}<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics>> (self=0x555557710ad8, f=...)
    at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.9.2/properties.rs:533
#15 0x0000555556b8a54e in i_slint_core::properties::PropertyHandle::update<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics> (self=0x555557710ad8, value=0x555557710ae0)
    at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.9.2/properties.rs:623
#16 0x0000555556b8c093 in i_slint_core::properties::Property<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics>::get<i_slint_backend_qt::qt_widgets::tabwidget::{impl#0}::init::TabWidgetMetrics> (self=...)
    at /home/user/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/i-slint-core-1.9.2/properties.rs:829

Reproducible Code (if applicable)

export component AppWindow inherits Window {
    VerticalBox {
        TabWidget {
            Tab {
                title: "First";
            }
            Tab {
                title: "Second";
            }
        }
    }
}

Environment Details

  • Slint Version: 1.8
  • Platform/OS: Linux (NixOS-unstable) KDE 6.3.0
  • Programming Language: Rust
  • Backend/Renderer: Qt

Product Impact

No response

@griffi-gh griffi-gh added bug Something isn't working need triaging Issue that the owner of the area still need to triage labels Feb 27, 2025
@griffi-gh
Copy link
Author

griffi-gh commented Feb 27, 2025

RE:
likely an upstream KDE bug

I'll try upgrading Plasma/related packages to 6.3.1 and see if that fixes it
https://invent.kde.org/plasma/breeze/-/commit/f7a14d6d170c17a2c17c386a4c88bfb020e29ff1

@griffi-gh
Copy link
Author

griffi-gh commented Feb 27, 2025

Nvm, still happens on KDE 6.3.2, so probably not related to that?

It does only happen with the Breeze visual style though, other styles seem to work fine...
(it crashes as soon i switch back to the Breeze style)

@griffi-gh griffi-gh changed the title TabWidget segfaults on the Qt backend (Linux) TabWidget segfaults on the Qt backend with the Breeze visual style (Linux) Feb 27, 2025
@griffi-gh
Copy link
Author

Also tried updating to Slint 1.9 (the default generated by the vscode extension was 1.8)

@ogoffart
Copy link
Member

looks like there are more bug in the KDE's breeze style.
We don't have a QWidget to pass to the style function, and the style function should be able to handle that.

@ogoffart ogoffart added upstream Needs a fix upstream and removed need triaging Issue that the owner of the area still need to triage labels Mar 5, 2025
@ogoffart ogoffart modified the milestone: 1.11 Mar 5, 2025
@ogoffart ogoffart added the candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working candidate-for-bugfix-release Label for PRs that would make sense to cherry-pick into a spontaneously created bug fix release bran upstream Needs a fix upstream
Projects
None yet
Development

No branches or pull requests

2 participants