Closed avirshup closed 7 years ago
I'll look into this. I'm hoping some of these bugs start disappearing as I refactor out the RPC stuff, but we'll see what happens.
These steps seem to reproduce this reliably (it happens a lot more often, but not reproducibly). I can confirm that this bug is definitely related to evaluating a lot of cells very quickly.
Reliably reproducing is a major pain, though - it actually requires a bug that causes small_molecule.draw()
to throw an exception. Here's how I've done it.
We're going to try to draw two things:
To reproduce the bug: run those two cells QUICKLY (hit shift-enter twice very quickly):
To get the expected result, run them SLOWLY (wait for the first cell to render before hitting shift-enter again):
This is using MDT commit 7a989b60488600f2a06808922e3157616fc14802 along with Autodesk/notebook-molecular-visualization@3d7bb35285dfba95ed7d27cb86b6a5307660320b
Note that there's a BUG with these commits that's actually important for reproducing this issue ...
First, we'll create two molecules:
import moldesign as mdt
small_molecule = mdt.from_name('butadiene')
protein = mdt.from_pdb('3aid')
Next, we create two cells, one to draw the protein, the other to draw the small_molecule (that will fail due to a bug).
Cell 1: protein.draw()
Cell 2: small_molecule.draw()
(this will throw an exception due to an unrelated bug)
If you run these two cells very quickly, one after another (hit shift-enter quickly or use Cell:Run cells below); it should produce the black box. Run them slowly and it will render correctly.
@avirshup Any evidence that this is still happening after the recent refactoring?
Yes, unfortunately. Will try to put together some sort of a reproducible test case with the current version
Ok, I'll take a look then. If the above still works to reproduce it more or less then I can use it, don't worry about going through all that again!
Closing this one for now - pending a complete rethink of widgets and the 3D API
I can't consistently reproduce this. It seems to happen when the viewer widget is created but not immediately rendered - often the case with the the viewer that's displayed after we assign a forcefield (below).
This screenshot is from Example 4 in moldesign 0.7.2, using nbmolviz 0.6.6.