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

Segmentation fault, Gtk-CRITICAL #235

Open
kefir opened this issue Oct 25, 2021 · 2 comments
Open

Segmentation fault, Gtk-CRITICAL #235

kefir opened this issue Oct 25, 2021 · 2 comments

Comments

@kefir
Copy link

kefir commented Oct 25, 2021

Hello everyone.

OS: Manjaro, 5.14.10-arch1
Shell: GNOME Shell 40.5

When trying to open any existing project I'm always getting following error:

(process:124920): Gtk-CRITICAL **: 23:40:09.187: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(process:124920): Gtk-CRITICAL **: 23:40:09.187: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed

(process:124920): Gtk-CRITICAL **: 23:40:09.187: _gtk_style_provider_private_get_settings: assertion 'GTK_IS_STYLE_PROVIDER_PRIVATE (provider)' failed
zsh: segmentation fault (core dumped)  CANdevStudio

App crashes, creating new project and working on it is fine

kefir pushed a commit to kefir/CANdevStudio that referenced this issue Oct 27, 2021
@kefir
Copy link
Author

kefir commented Oct 27, 2021

Additional info:

I have managed to avoid this behavior by commenting out this in ./src/comp[onents/cansignaldata/cansignadata_p.h

    ComponentInterface::ComponentProperties _supportedProps = {
            std::make_tuple(_nameProperty,  QVariant::String, true, cf(nullptr)),
            std::make_tuple(_fileProperty, QVariant::String, true, cf([] { return new PropertyFieldPath; } )),
            // std::make_tuple(_colorProperty, QVariant::String, true, cf([] { return new PropertyFieldColor; } ))
    };

Relevant commit: 8f84350

Not a clean or proper solution, but maybe you can tell me where to dig next.

segmentation fault occures here src/common/propertyfields.h:

struct PropertyFieldColor : public PropertyFieldText {
    PropertyFieldColor()
    {
        _pb = new QPushButton(this);
        _pb->setText("...");
        _pb->setFixedSize(24, 24);
        _pb->setFlat(true);
        _pb->setProperty("type", "PropertyFieldPath");
        layout()->addWidget(_pb);

        _cd = new QColorDialog(this); // THIS LINE !!! SEGFAULTS

        connect(_pb, &QPushButton::pressed, [&] {
            _cd->setCurrentColor(QColor(_le->text()));
            if (_cd->exec() == QDialog::Accepted) {
                _le->setText(_cd->selectedColor().name(QColor::HexRgb).toUpper());
            }
        });
    }

private:
    QPushButton* _pb;
    QColorDialog* _cd;
};

@rkollataj
Copy link
Member

Thanks @kefir, that's very useful. I will have a look.

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

2 participants