-
-
Notifications
You must be signed in to change notification settings - Fork 838
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
23.3: crash upon exit #3427
Comments
Might be related to #3391 but I don't do anything special with any script |
I often notice this message, without any scripts. But doesn't always appear, I can't predict whether it will appear on any launch. Can you reproduce it reliably? |
Yes, so far it happened every time I launched stellarium since upgrade to 23.3 - five times or so, while debugging this crash |
Could you try running it under Valgrind? |
Doesn't show such error under valgrind Downloaded 1 files (0 kbytes) in a session of 673.214 sec (average of 0 kB/s + 0 files from cache (0 kB)). |
While I have not seen this, it may be related to using std::list in StelPainter instead of Qt5's QLinkedList. Did I mess up something last spring? EDIT: No, the report says Qt5... Any idea about the mem leak? |
@gzotti I think that's offtopic for the crash issue, but sure: $ valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes -s stellarium |
Hello @DarthGandalf! OK, developers can reproduce the issue. Thanks for the report! |
Hmm... serious memory leak, this is very bad news :( |
The report lists many errors. Many "conditional jump depends on uninitialized values" (any chance for more hints to find which they are and whether we can do anything about them?), and tons of reports in e.g. libLLVM-16.so or even dbus. Where do we use that? LLVM is used in Mesa on Windows, but this is a Linux run. Also Mesa? How did earlier versions behave here? |
I hope it fixed in commit a2010ee |
The first memory error on exit consistent with this comment looks like this:
|
No success, I'll revert it |
Oh, I got it. The problem is that The design is obviously broken. Textures shouldn't access the texture manager, at least not through a raw pointer. If we must keep it this way, this should at least happen via some weak pointer, e.g. |
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
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
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
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 #3427
Hello @DarthGandalf! Please check the fresh version (development snapshot) of Stellarium: |
Hello @DarthGandalf! Please check the latest stable version of Stellarium: |
Confirmed fixed, thanks |
Expected Behaviour
It should exit cleanly
Actual Behaviour
Downloaded 1 files (0 kbytes) in a session of 41.33 sec (average of 0 kB/s + 0 files from cache (0 kB)).
LandscapeMgr: Clearing cache of 0 landscapes totalling about 0 MB.
malloc(): unsorted double linked list corrupted
[1] 22581 IOT instruction stellarium
Steps to reproduce
System
Logfile
log.txt
Stacktrace: gdb.txt
The text was updated successfully, but these errors were encountered: