Opened 6 years ago

Closed 6 years ago

#1983 closed defect (fixed)

Structure continuously redrawn because atom hide bits change every frame

Reported by: tic20@… Owned by: Greg Couch
Priority: major Milestone:
Component: Graphics Version:
Keywords: Cc: Conrad Huang, Tom Goddard
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

The following bug report has been submitted:
Platform:        Linux-3.10.0-957.12.2.el7.x86_64-x86_64-with-centos-7.6.1810-Core
ChimeraX Version: 0.91 (2019-05-31)
Description
If I load a model which auto-displays as mixed ribbon and atoms, then some of the graphics change flags aren't being cleared leading to the model being redrawn on every frame. If I add a logging line to AtomicStructure._update_graphics_if_needed():

    def _update_graphics_if_needed(self, *_):
        gc = self._graphics_changed
        print('GC: {}'.format(gc))
        if gc == 0:
            return

... then it spams "GC: 97" to the log until I do either `show` or `hide`. Everything seems to work fine from that point on.

Log:
UCSF ChimeraX version: 0.91 (2019-05-31)  
© 2016-2019 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open 6g2g

Summary of feedback from opening 6g2g fetched from pdb  
---  
warning | Missing or incomplete entity_poly_seq table. Inferred polymer
connectivity.  
  
6g2g title:  
Fe-S assembly Cfd1 [more info...]  
  
Chain information for 6g2g #1  
---  
Chain | Description  
A | Cytosolic Fe-S cluster assembly factor CFD1  
B | Cytosolic Fe-S cluster assembly factor CFD1  
  
Non-standard residues in 6g2g #1  
---  
SF4 — iron/sulfur cluster  
SO4 — sulfate ion  
  
  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  
GC: 97  

> show selAtoms

GC: 97  
GC: 0  




OpenGL version: 3.3.0 NVIDIA 415.27
OpenGL renderer: TITAN Xp/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

Change History (7)

comment:1 by Tristan Croll, 6 years ago

Platform: all
Project: ChimeraX

If I reinstall today's ChimeraX build (wiping the changes I've made in #1965 and #1972), then I additionally see the chain-break pseudobonds flashing on and off. Digging a bit more, it seems there's an infinite loop flipping their HIDE_RIBBON bits back and forth.

comment:2 by pett, 6 years ago

Cc: Greg Couch Conrad Huang added
Component: UnassignedGraphics
Owner: set to Tom Goddard
Priority: normalmajor
Status: newassigned
Summary: ChimeraX bug report submissiongraphics_changed not cleared and/or HIDE_RIBBON bit cycling

comment:3 by Tom Goddard, 6 years ago

Cc: Tom Goddard added; Greg Couch removed
Owner: changed from Tom Goddard to Greg Couch
Summary: graphics_changed not cleared and/or HIDE_RIBBON bit cyclingStructure continuously redrawn because atom hide bits change every frame

Structure is constantly being redrawn because atoms are being hidden and unhidden related to ribbon drawing and tethers. Each time an atom is hidden and unhidden, even if it ends in the same state as the previously drawn frame, it is marked to be redrawn.

This bug is not happening in today's ChimeraX 0.9 release candidate. So I suspect it is related to tether changes where 0.9 differs from the daily build.

comment:4 by Tom Goddard, 6 years ago

Here is a general observation about the ribbon / tether update graphics code. That Structure._update_graphics_if_needed() and Structure._update_graphics() and all the routines those call are intended to make the Drawing objects that render the models. They should be changing any molecule state like hide or display bits. If they change molecule state it is likely to cause the next frame to require a redraw and these infinite redraw loops are likely to happen. I think the atom hide bits are the only case where this rule about what is done during graphics update is being violated. It would be better if setting a residue to ribbon style also changed the atom hide bits at the same time instead of waiting for a graphics update. But that may be impractical.

in reply to:  5 ; comment:5 by tic20@…, 6 years ago

I had a brief look at this today. The atom hide bits aren’t actually changed anywhere in the Python layer as far as I can tell - just in molc.cpp. There’s some code that changes the hide bits of pseudobonded atoms based on the display/hide state of the atoms at each end of the bond. I suspect that may be misfiring under some circumstances.
 

 


comment:6 by Greg Couch, 6 years ago

I've backed out the code that makes backbone atoms visible if there is a pseudobond to them. Not sure why that caused the constant redrawing. will dig into it further.

comment:7 by Greg Couch, 6 years ago

Resolution: fixed
Status: assignedclosed

Change to treat pseudobonds like bonds for deciding if backbone atoms should be drawn or not has been withdrawn for now.

Note: See TracTickets for help on using tickets.