Skip to content

Memory leak in DisplayProperties #636

Open

Description

@tkemmer

DisplayProperties::rep_ is used as a temporary for both owning (via [1]) and non-owning (via [2]) raw pointers, leaking memory in the first case.

[1]

rep_ = new Representation();

[2]
rep_ = *gc->getHighlightedRepresentations().begin();

Direct leak of 248 byte(s) in 1 object(s) allocated from:
    #0 0x7f44d3ac7760 in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/libasan.so.3+0xc8760)
    #1 0x7f44d2e889d8 in BALL::VIEW::DisplayProperties::createRepresentation(std::__cxx11::list<BALL::Composite*, std::allocator<BALL::Composite*> > const&, bool) /home/thomas/git/apps/ball/source/VIEW/DIALOGS/displayProperties.C:526
    #2 0x7f44d2e87372 in BALL::VIEW::DisplayProperties::onNotify(BALL::VIEW::Message*) /home/thomas/git/apps/ball/source/VIEW/DIALOGS/displayProperties.C:331
    #3 0x7f44d3107a43 in BALL::VIEW::ConnectionObject::onNotify_(BALL::VIEW::Message*) /home/thomas/git/apps/ball/source/VIEW/KERNEL/connectionObject.C:225
    #4 0x7f44d3107adf in BALL::VIEW::ConnectionObject::onNotify_(BALL::VIEW::Message*) /home/thomas/git/apps/ball/source/VIEW/KERNEL/connectionObject.C:235
    #5 0x7f44d31077b4 in BALL::VIEW::ConnectionObject::notify_(BALL::VIEW::Message*) /home/thomas/git/apps/ball/source/VIEW/KERNEL/connectionObject.C:194
    #6 0x7f44d3123191 in BALL::VIEW::MainControl::insert(BALL::Composite&, BALL::String, bool) /home/thomas/git/apps/ball/source/VIEW/KERNEL/mainControl.C:1583
    #7 0x7f44d333f20f in BALL::VIEW::MolecularStructure::buildPeptide() /home/thomas/git/apps/ball/source/VIEW/WIDGETS/molecularStructure.C:1465
    #8 0x7f44d33ebe46 in BALL::VIEW::MolecularStructure::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) /home/thomas/git/apps/ball/build/VIEW_automoc.dir/moc_molecularStruc_2SOUKAKD3JKZIA.cpp:204
    #9 0x7f44c30675f8 in QMetaObject::activate(QObject*, int, int, void**) (/usr/lib64/libQt5Core.so.5+0x2675f8)
    #10 0x7f44c8d60131 in QAction::triggered(bool) (/usr/lib64/libQt5Widgets.so.5+0x153131)

Activity

  1. okohlbacher commented on May 16, 2026

    @okohlbacher
    Contributor

    Closing as stale (no activity since 2017-09-01, more than 5 years). Untriaged maintainer backlog item with no current milestone; not on the v1.6 / v2.0 critical path. If this is still relevant against current v1.6-modernization (BALLView v1.6.1 shipped 2026-05-16), please reopen with a fresh reproducer or scope note and we will triage promptly.

  2. okohlbacher commented on May 16, 2026

    @okohlbacher
    Contributor

    Reopened on triage review — this has a concrete, actionable bug description (per Phase 999.14 TRIAGE-01 reconciliation against the strict-rule pass). Moving back into the open backlog as a keep item. Still no current milestone; no commitment to a fix timeline. If the bug no longer reproduces against v1.6-modernization (BALLView v1.6.1 shipped 2026-05-16), a quick "no longer reproducible" comment would help us close it confidently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions