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 SplitterStyle destruction causing memory leak #743

Merged
merged 1 commit into from
Feb 9, 2025

Conversation

zjeffer
Copy link
Collaborator

@zjeffer zjeffer commented Feb 8, 2025

This is the only non-upstream memory leak left that was detected by address sanitizer, when simply opening and closing notes:

Indirect leak of 16 byte(s) in 1 object(s) allocated from:
    #0 0x7a3eea8fe392 in operator new(unsigned long) /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x7a3ee7e9d036 in QtSharedPointer::ExternalRefCountData::getAndRef(QObject const*) (/usr/lib/libQt6Core.so.6+0x29d036) (BuildId: d9624381d3e569b524ff85c4304a2ea24f573fd0)
    #2 0x7a3ee979901d in QProxyStyle::setBaseStyle(QStyle*) (/usr/lib/libQt6Widgets.so.6+0x19901d) (BuildId: 59ba6aa258636163a9e568cd20adc15c2deccce9)
    #3 0x7a3ee19fc995  (/usr/lib/qt6/plugins/styles/libqt6ct-style.so+0x3995) (BuildId: 53836c055c7ed35973419c2b26c4bd306ed9fbf8)
    #4 0x7a3ee19fcc7f  (/usr/lib/qt6/plugins/styles/libqt6ct-style.so+0x3c7f) (BuildId: 53836c055c7ed35973419c2b26c4bd306ed9fbf8)
    #5 0x7a3ee19fcd0a  (/usr/lib/qt6/plugins/styles/libqt6ct-style.so+0x3d0a) (BuildId: 53836c055c7ed35973419c2b26c4bd306ed9fbf8)
    #6 0x7a3ee979f243 in QStyleFactory::create(QString const&) (/usr/lib/libQt6Widgets.so.6+0x19f243) (BuildId: 59ba6aa258636163a9e568cd20adc15c2deccce9)
    #7 0x7a3ee979f48d  (/usr/lib/libQt6Widgets.so.6+0x19f48d) (BuildId: 59ba6aa258636163a9e568cd20adc15c2deccce9)
    #8 0x7a3ee979ff69 in QProxyStyle::polish(QWidget*) (/usr/lib/libQt6Widgets.so.6+0x19ff69) (BuildId: 59ba6aa258636163a9e568cd20adc15c2deccce9)
    #9 0x7a3ee97b364e  (/usr/lib/libQt6Widgets.so.6+0x1b364e) (BuildId: 59ba6aa258636163a9e568cd20adc15c2deccce9)
    #10 0x7a3ee973bc02 in QWidgetPrivate::setStyle_helper(QStyle*, bool) (/usr/lib/libQt6Widgets.so.6+0x13bc02) (BuildId: 59ba6aa258636163a9e568cd20adc15c2deccce9)
    #11 0x7a3ee973bd97 in QWidgetPrivate::setStyle_helper(QStyle*, bool) (/usr/lib/libQt6Widgets.so.6+0x13bd97) (BuildId: 59ba6aa258636163a9e568cd20adc15c2deccce9)
    #12 0x582dfc7b37e6 in MainWindow::setupMainWindow() /home/zjeffer/git/notes/src/mainwindow.cpp:495
    #13 0x582dfc7ad0b0 in MainWindow::MainWindow(QWidget*) /home/zjeffer/git/notes/src/mainwindow.cpp:145
    #14 0x582dfc7a98e9 in main /home/zjeffer/git/notes/src/main.cpp:96
    #15 0x7a3ee8235487  (/usr/lib/libc.so.6+0x27487) (BuildId: 695cfc6aac7d0f77bb7caba0ef01b2e868762b02)
    #16 0x7a3ee823554b in __libc_start_main (/usr/lib/libc.so.6+0x2754b) (BuildId: 695cfc6aac7d0f77bb7caba0ef01b2e868762b02)
    #17 0x582dfc62c194 in _start (/home/zjeffer/git/notes/build/notes+0x13a194) (BuildId: 80553ab0cf2410da235b1083d47a87d948d83e1f)

@zjeffer zjeffer self-assigned this Feb 8, 2025
@zjeffer zjeffer requested review from guihkx and nuttyartist February 8, 2025 15:14
@zjeffer zjeffer added the Bug label Feb 8, 2025
@zjeffer zjeffer merged commit f7c03bd into master Feb 9, 2025
12 checks passed
@zjeffer zjeffer deleted the fix/zjeffer/fixes branch February 9, 2025 10:41
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.

2 participants