[Chimera-users] Two transparent models and memory leaks

Thomas Goddard goddard at cgl.ucsf.edu
Thu Mar 22 15:59:27 PDT 2007

Hi Christopher,

   When I save a full screen image in Chimera 1.2352 on the Mac the 
memory use rose from 54 Mbytes to 68 Mbytes.  Then I saved the same 
image 2 more times and memory did not increase at all.  It also never 
went back from 68 Mbytes to 54 Mbytes, but that is probably not a bug. 
Python may be holding that memory and will reuse it in subsequent 
allocations.  In general when you allocate memory and then free it the 
operating system may not report the reduction in memory because it in 
fact has not been given back to the operating system.  Instead the 
memory management for that application is keeping the memory and will 
reuse it in subsequent allocations.

   If your memory use goes up and up each time you save an image then 
that indicates a bug and I will investigate if you tell me which version 
of Chimera and on which operating system (Windows?).

   I'm not sure what to think of the unpredictability of your crashes. 
If you sometimes start Chimera and save an image and it crashes, and 
then do the exact same steps and it doesn't crash it will be hard for us 
to reproduce the problem on our machines -- a necessary step for fixing it.

   You can turn off the 3x3 supersampling when saving images to avoid 
using so much memory during image capture.  In the "Save Image" dialog 
press the "Image Setup" button and then the preferences dialog will 
appear and you change "Supersample 3x3" to "Supersample 1x1".  Lines may 
appear a bit more jagged in the resulting image.  You'll have to look at 
the saved image to decide.

   Ok, I didn't tell you exactly the right rule for when two transparent 
models can be displayed approximately correctly.  It is not always 
whether the one in front has higher or lower model id number.  What 
really matters is the order in which the models were opened.  The last 
opened transparent model will appear in front.  It can have a lower id 
number than an earlier opened transparent model.  I think both the old 
and new volume session saving preserve the order of opening the volume 
data sets.  So I expect that restoring a session should not change the 
appearance of two transparent volume data sets.  But the order of 
opening atomic models (e.g. ribbons) and volumes is not preserved.  In 
restoring, the atomic models are all created before any volumes.  The 
same problem existed with the older volume session code.

   We do not support having two transparent models.  That limitation is 
described in the documentation.


Unfortunately it is a fundamental limitation of the current Chimera 
architecture.  So it will not be fixed anytime soon.  It may be possible 
to have session restore order the models to match the original order but 
it is only a bandaid.  Sometimes model 1 is in front of 2 in one place 
but behind it in another and transparency will not work right no matter 
what the order is in that case.


More information about the Chimera-users mailing list