-
-
Notifications
You must be signed in to change notification settings - Fork 849
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 in StelTexture destructor on exit #3541
Fix crash in StelTexture destructor on exit #3541
Conversation
Great PR! Please pay attention to the following items before merging: Files matching
This is an automatically generated QA checklist based on modified files. |
On deletion of StelApp StelTextureMgr is deleted, after which some instances of StelTexture are deleted. But StelTexture destructor logs VRAM usage via StelTextureMgr, accessing a no longer existing object. This commit turns the nonstatic raw pointer to texture manager into a static weak pointer (QPointer), so that it was possible to check whether texture manager still exists before trying to access it. Making it static is supposed to prevent useless copying of this smart pointer while the texture manager is effectively a singleton. Fixes Stellarium#3427
65fecfe
to
78c0146
Compare
The new version should fix this too. |
Did you update? It shouldn't even reach this line any more. |
It was for previous code, let me check it again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything OK now, thanks!
Confirmed also in W11. I wonder why it takes minutes to shutdown the application when running a debug session. But finally it came to an end without error. |
Hello @10110111! Please check the fresh version (development snapshot) of Stellarium: |
Hello @10110111! Please check the latest stable version of Stellarium: |
On deletion of
StelApp
StelTextureMgr
is deleted, after which some instances ofStelTexture
are deleted. ButStelTexture
destructor logs VRAM usage viaStelTextureMgr
, accessing a no longer existing object.This commit turns the nonstatic raw pointer to texture manager into a static weak pointer (
QPointer
), so that it was possible to check whether texture manager still exists before trying to access it. Making it static is supposed to prevent useless copying of this smart pointer while the texture manager is effectively a singleton.Fixes #3427