#921 closed defect (fixed)
Memory leak in core.commands.cofr.PivotIndicator
Reported by: | Tristan Croll | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | major | Milestone: | 0.5 |
Component: | Command Line | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | ChimeraX |
Description
... leading to one of the more initially head-scratching stack traces I've come across. Short story is that PivotIndicator.delete()
doesn't call Drawing.delete()
.
Symptoms:
If, while running an ISOLDE simulation, I do cofr showpivot false
in the command line, I get a stack trace with the following included:
Current thread 0x00007f62ef7fe700 (most recent call first): File "/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/core/graphics/opengl.py", line 1599 in delete_buffer File "/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/core/graphics/drawing.py", line 1475 in delete File "/home/tic20/apps/chimerax/lib/python3.6/site-packages/chimerax/core/graphics/drawing.py", line 1466 in __del__ File "/home/tic20/apps/chimerax/lib/python3.6/site-packages/simtk/openmm/vec3.py", line 42 in __new__ File "/home/tic20/apps/chimerax/lib/python3.6/site-packages/simtk/openmm/openmm.py", line 3919 in _getStateAsLists File "/home/tic20/apps/chimerax/lib/python3.6/site-packages/simtk/openmm/openmm.py", line 3969 in getState File "/home/tic20/.local/share/ChimeraX/0.1/site-packages/chimerax/isolde/openmm/sim_handler.py", line 677 in get_and_check_positions File "/home/tic20/.local/share/ChimeraX/0.1/site-packages/chimerax/isolde/openmm/sim_handler.py", line 669 in equil_step File "/home/tic20/.local/share/ChimeraX/0.1/site-packages/chimerax/isolde/openmm/sim_thread.py", line 322 in main_loop File "/home/tic20/.local/share/ChimeraX/0.1/site-packages/chimerax/isolde/openmm/sim_thread.py", line 101 in _sim_thread File "/home/tic20/apps/chimerax/lib/python3.6/multiprocessing/pool.py", line 119 in worker File "/home/tic20/apps/chimerax/lib/python3.6/threading.py", line 864 in run File "/home/tic20/apps/chimerax/lib/python3.6/threading.py", line 916 in _bootstrap_inner File "/home/tic20/apps/chimerax/lib/python3.6/threading.py", line 884 in _bootstrap
... which was confusing in all sorts of ways (not least of which is that this is the simulation thread, from which I've strictly excluded all ChimeraX objects). Memory leaks are fun. Anyway, amending the delete method to:
def delete(self): self._session.triggers.remove_handler(self._update_handler) super().delete()
Fixes it.
Change History (2)
comment:1 by , 8 years ago
Milestone: | → Beta Release |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fixed.