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

Fix crash when no GL context is available #11963

Merged
merged 7 commits into from Sep 12, 2023
Merged

Conversation

daschuer
Copy link
Member

This fixes #11929

A next iteration would be to get rid of the initial GL widget. Maybe we can already use the context without the widget.
I am just afraid that this requires a lot of testing. Nothing suitable just before a release.

@JoergAtGithub
Copy link
Member

I guess this should be targeted to 2.4?

Comment on lines 179 to 180
// note: the format is set in the WGLWidget's OpenGLWindow constructor
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this comment no longer applies since the context has been created earlier in the function

@ronso0 ronso0 changed the title Fix crasch when no GL context is available Fix crash when no GL context is available Sep 11, 2023
initialize();
#endif
QSurfaceFormat format;
format.setVersion(2, 1);
Copy link
Contributor

@m0dB m0dB Sep 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this, we had a single place where QSurfaceFormat was set (in OpenGLWindow constructor). Also, I liked going through an actual QOpenGLWindow creation to do the check. But I am okay with this change, especially because I agree with the eventual removal of the initial widget.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may consider to set the default format in a single place instead. But I was not sure about the implications.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be easy enough to solve by just putting the QSurfaceFormat creation into a function that is called from both places, right?

@daschuer daschuer changed the base branch from main to 2.4 September 11, 2023 21:33
Copy link
Member

@Swiftb0y Swiftb0y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. please fix pre-commit before merge

@daschuer
Copy link
Member Author

Done.

@Swiftb0y Swiftb0y merged commit e8ae69a into mixxxdj:2.4 Sep 12, 2023
11 of 12 checks passed
@daschuer daschuer added this to the 2.4.0 milestone Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mixxx 2.4-beta crash on Windows 10 with No GL
4 participants