From: John Stone (
Date: Thu Feb 04 2010 - 10:06:33 CST


On Thu, Feb 04, 2010 at 08:26:10AM -0500, Joshua Anderson wrote:
[vmdmac.r ...]
> It of course solves the file not found error, but doesn't do anything
> to help the GUI to respond to mouse events. Tcl (and python) commands
> work from the terminal where I launched vmd from. I can resize the
> display with "display resize", molecules load and display, etc... It
> even runs my .vmdrc file. But the mouse just displays a spinning
> colorwheel when I move it over any vmd gui element and there is no
> response to clicks. Popping up a Tk window from python with root =
> Tk() even works, but like the other VMD gui windows, it does not
> respond to any input events.

I've seen this before, and came to the conclusion that there is a
bug in the event handling mechanism of either FLTK or Tk. My theory
on this is that since the spinning colorwheel never recovers, it
must be caused by FLTK or Tk not responding to an event initiated
by the windowing system, and once the event is "dropped" they do
not recover, or at least MacOS X doesn't think they have. It seems
that in the past people that encountered this problem got it to
"wake up" by moving the window around or using Expose or something
similar, but my recollection is hazy (no caffeine yet this morning).

> Any hints on how to narrow down root cause that I can debug locally?
> Even a simple explanation of why the 1.8.7 bundle gives the same
> behavior when launched as above would help me narrow it down.

I personally believe it is caused by some kind of event handling
race condition or dropped event, based on the fact that it also
sometimes occurs even when one starts VMD by clicking on the
VMD bundle icon in the normal way.

That said, it could certainly also be caused by other means.
If you look at the source file vmd/src/macosxvmdstart.C you'll
see the MacOS X-specific code that VMD executes shortly after
main() is called at launch time. You can trace startup execution
by looking at vmdmain.C, vmd.C, and macosxvmdstart.C

The main event loop is contained in vmdmain.C, it calls
VMDApp::VMDupdate() over and over and over.

  John Stone

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email:                 Phone: 217-244-3349
  WWW:      Fax: 217-244-6078