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

Save layer style API is not thread safe #46954

Closed
2 tasks
nyalldawson opened this issue Jan 23, 2022 · 0 comments · Fixed by #46955
Closed
2 tasks

Save layer style API is not thread safe #46954

nyalldawson opened this issue Jan 23, 2022 · 0 comments · Fixed by #46955
Assignees
Labels
API API improvement only, no visible user interface changes Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption

Comments

@nyalldawson
Copy link
Collaborator

What is the bug or the crash?

This API has code in the providers which checks whether a style already exists and shows a messagebox if it does. This results in crashes when the api is used on non-main threads, e.g. #46914

Steps to reproduce the issue

...

Versions

all

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

  • I tried with a new QGIS profile

Additional context

No response

@nyalldawson nyalldawson added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 23, 2022
@nyalldawson nyalldawson self-assigned this Jan 23, 2022
@nyalldawson nyalldawson added API API improvement only, no visible user interface changes Crash/Data Corruption labels Jan 23, 2022
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jan 24, 2022
…ions

This is not safe to do -- it causes a crash if the api is used in
a background thread

Fixes qgis#46954
Fixes qgis#46914
nyalldawson added a commit that referenced this issue Jan 24, 2022
…ions

This is not safe to do -- it causes a crash if the api is used in
a background thread

Fixes #46954
Fixes #46914
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API improvement only, no visible user interface changes Bug Either a bug report, or a bug fix. Let's hope for the latter! Crash/Data Corruption
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant