From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Jan 25 2012 - 09:59:13 CST

Joshua,
  Quick query regarding your macports source-code build:
What version of Tcl/Tk is the macports build using? Do the macports
guys have a beta build of Tcl/Tk 8.6.0 floating around yet? If so, it
might be worth trying a build against the latest 8.6.0 beta to see if it
has the Cocoa-based GUI code integrated, and whether it gets along with
MacOS X 10.7.x better.

Cheers,
  John

On Thu, Jan 19, 2012 at 01:47:21PM -0500, Joshua A. Anderson wrote:
> How timely. I just updated my system to Lion. I use a 64-bit build of vmd not for memory usage, but to link against a 64-bit python installation connected to a whole bunch of libraries (in macports). I can confirm that I get the same problem on my system with a VMD _1.9_ compile.
>
> When I disable TK, VMD loads without seg faulting. The extensions menu is gone, as you said it would be (which is fine by me).
>
> The problem I am having is that the "pbc" command is also not working.
> vmd > pbc box -color black -center origin
> invalid command name "pbc"
>
> Does the pbc command also use TK? Or is there some other reason it isn't loading?
> --------
> Joshua A. Anderson, Ph.D.
> Chemical Engineering Department, University of Michigan
>
> On Jan 13, 2012, at 3:52 PM, John Stone wrote:
>
> > Hi,
> > I just had one of my colleagues run more tests on MacOS X 10.7 and
> > indeed the crashing appears to be caused by Tk. I have built a
> > 64-bit test version of VMD that will run on MacOS X 10.7 by disabling
> > the use of Tk, but this has the side effect of disabling everything in
> > the VMD "Extensions" menu. This probably means that the 64-bit build
> > of VMD for MacOS X is going to have to wait a bit longer until whatever
> > is crashing Tk has been resolved. It could be a new conflict between
> > Tk and FLTK, or it may just be a bug in the Cocoa-based Tk that only
> > manifests itself on MacOS X 10.7. Given that the Cocoa-based version of Tk
> > still isn't considered a "production" version, it's not entirely surprising
> > that there are issues that are still cropping up. I will go ahead and
> > make a 64-bit build of VMD for MacOS X for the 1.9.1 release, but I will
> > put it on a separate download page and it will be considered an
> > "unofficial" VMD build since we know it is not stable on MacOS X 10.7
> > at present. I can make a version of it that has Tk disabled if that is
> > of interest to VMD users that are running MacOS X 10.7, and they can
> > live without the VMD "Extensions" menu for what they are doing.
> >
> > Cheers,
> > John Stone
> > vmd_at_ks.uiuc.edu
> >
> >
> > On Thu, Jan 12, 2012 at 10:48:06AM -0600, John Stone wrote:
> >> Joshua,
> >> Thanks for the feedback. It would appear that all of the people
> >> I've had check this on MacOS X 10.7.x (Lion) are all experiencing
> >> exactly the same issue. Since the problems only occur when running
> >> VMD with the GUI enabled, this seems to point toward an issue with the
> >> interaction between FLTK and Tk and the 64-bit MacOS X Cocoa APIs they use.
> >>
> >> The 64-bit MacOS X build of VMD is done in a very special way because
> >> Apple doesn't support the older Carbon APIs for 64-bit mode. All of the
> >> GUI toolkits that support MacOS X (FLTK, Tk, Qt, and many others) had to
> >> be rewritten for Cocoa in order to work on 64-bit mode. On complication of
> >> this is that Cocoa is an object-oriented API, and the way Apple designed the
> >> Cocoa API, they want an application to instantiate a subclass of an application
> >> object. The problem is that when a program like VMD incorporates multiple
> >> libraries that create GUI windows (in this case both FLTK and Tk) they
> >> _both_ try to create an application object, and this causes all kinds of
> >> problems. In order to make it possible to build a 64-bit VMD on
> >> MacOS X, I had to work closely with the developers of FLTK and Tk to
> >> get them to change their code so that the application object that gets
> >> created during initialization of both FLTK and TK wouldn't cause crashes.
> >>
> >> My guess is that something about the Cocoa application object initialization
> >> behavior has changed for MacOS X 10.7, and there are new issues that will
> >> have to be solved in order for FLTK and Tk to work together correctly in
> >> 64-bit mode with Cocoa. If it turns out that this is indeed the cause,
> >> then I will not be able to release a "production" 64-bit version of VMD
> >> for MacOS X for a while longer. If this is the case, then I'm going to
> >> have to skip releasing the 64-bit MacOS X builds this time, and save them
> >> for a subsequent release or an interim update.
> >>
> >> I should know in the next day or two if the problems you are having are
> >> indeed the result of a bad interaction between Tk/FLTK and the latest
> >> Cocoa implementation on MacOS X 10.7.x. That's what it's looking like
> >> currently, but I need to check a few more things to be sure.
> >>
> >> Cheers,
> >> John Stone
> >> vmd_at_ks.uiuc.edu
> >>
> >>
> >> On Wed, Jan 11, 2012 at 08:09:50PM -0500, Joshua D. Moore wrote:
> >>> Dear John,
> >>>
> >>> Sorry for my delay in replying. I didn't get a crash running,
> >>> ./vmd_MACOSXX86_64 -dispdev text. However, I still get the seg fault
> >>> running the GUI, even after moving the molfile plugins that you
> >>> mentioned.
> >>>
> >>> /usr/bin/otool -L vmd_MACOSXX86_64 output:
> >>>
> >>>
> >>> vmd_MACOSXX86_64:
> >>> /usr/lib/libmx.A.dylib (compatibility version 1.0.0, current version 315.0.0)
> >>> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL
> >>> (compatibility version 1.0.0, current version 1.0.0)
> >>> /System/Library/Frameworks/AGL.framework/Versions/A/AGL
> >>> (compatibility version 1.0.0, current version 1.0.0)
> >>> @executable_path/libcudart.dylib (compatibility version 1.1.0,
> >>> current version 4.0.0)
> >>> /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL
> >>> (compatibility version 1.0.0, current version 1.0.0)
> >>> /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
> >>> version 125.2.1)
> >>> @executable_path/../Frameworks/Tk.framework/Versions/8.5/Tk
> >>> (compatibility version 8.5.0, current version 8.5.9)
> >>> @executable_path/../Frameworks/Tcl.framework/Versions/8.5/Tcl
> >>> (compatibility version 8.5.0, current version 8.5.9)
> >>> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
> >>> (compatibility version 1.0.0, current version 15.0.0)
> >>> /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
> >>> /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
> >>> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices
> >>> (compatibility version 1.0.0, current version 44.0.0)
> >>> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
> >>> (compatibility version 150.0.0, current version 550.42.0)
> >>> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
> >>> (compatibility version 1.0.0, current version 38.0.0)
> >>> /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
> >>> (compatibility version 300.0.0, current version 751.42.0)
> >>> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
> >>> (compatibility version 45.0.0, current version 1038.35.0)
> >>>
> >>>
> >>>
> >>> On Thu, Jan 5, 2012 at 4:14 PM, John Stone <johns_at_ks.uiuc.edu> wrote:
> >>>> Hi,
> >>>> I believe that this crashing issue is related to differences in the
> >>>> shared libraries on the new MacOS X 10.7 (Lion) vs. the older revs.
> >>>> I'm not sure which shared library might be causing the problem, so we'll try
> >>>> a few simple experiments and narrow it down. It could also be something
> >>>> else entirely, but these tests will help us figure it out.
> >>>>
> >>>> Please try the following test for me on your machine, and let me know what happens:
> >>>>
> >>>> Open a terminal shell and cd to the folder where you VMD 1.9.1 beta 1
> >>>> version is installed. It will be named "VMD 1.9.1.app" (unless you renamed it).
> >>>> From there, cd to the "VMD 1.9.1.app/Contents/vmd" subdirectory.
> >>>>
> >>>> Send me the output of this command (I assume "otool" is on your machine already):
> >>>> /usr/bin/otool -L vmd_MACOSXX86_64
> >>>>
> >>>> Then, from your text command prompt, try running this command:
> >>>> ./vmd_MACOSXX86_64 -dispdev text
> >>>>
> >>>> You should see output like this (this is the CUDA-enabled version):
> >>>>
> >>>> Info) VMD for MACOSXX86_64, version 1.9.1beta1 (December 29, 2011)
> >>>> Info) http://www.ks.uiuc.edu/Research/vmd/
> >>>> Info) Email questions and bug reports to vmd_at_ks.uiuc.edu
> >>>> Info) Please include this reference in published work using VMD:
> >>>> Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
> >>>> Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
> >>>> Info) -------------------------------------------------------------
> >>>> Info) Multithreading available, 16 CPUs detected.
> >>>> Info) Creating CUDA device pool and initializing hardware...
> >>>> Info) Detected 1 available CUDA accelerator:
> >>>> Info) [0] Quadro FX 4800 24 SM_1.3 @ 1.20 GHz, 1535MB RAM, KTO, OIO, ZCP
> >>>> Info) OpenCL Platform[0]: Apple, FULL_PROFILE Devices: 2
> >>>> Info) [0] Quadro FX 4800 24 CU @ 1.18 GHz, 1610MB RAM
> >>>> Info) [1] Intel(R) Xeon(R) CPU E5620 @ 2.40GHz 16 CU @ 2.34 GHz, 19327MB RAM
> >>>> Info) Dynamically loaded 2 plugins in directory:
> >>>> Info) /Projects/vmd/vmd/macimages/x86_64/VMD-1.9.1/VMD 1.9.1.app/Contents/vmd/plugins/MACOSXX86_64/molfile
> >>>> vmd >
> >>>>
> >>>> If you get a crash at the same place as before, that is already very informative.
> >>>>
> >>>> If you get a crash, try doing these steps:
> >>>> cd plugins/MACOSXX86_64/molfile
> >>>> mkdir bak
> >>>> mv hoomdplugin.so bak/
> >>>> mv dmsplugin.so bak/
> >>>>
> >>>> Once those plugins are moved, then do:
> >>>> cd ../../..
> >>>>
> >>>> and try running VMD again:
> >>>> ./vmd_MACOSXX86_64 -dispdev text
> >>>>
> >>>> If VMD runs and does not crash, then try running it the normal way from
> >>>> the GUI, and let me know what happens.
> >>>>
> >>>> Cheers,
> >>>> John Stone
> >>>> vmd_at_ks.uiuc.edu
> >>>>
> >>>>
> >>>> On Fri, Dec 30, 2011 at 08:30:45PM -0500, Joshua D. Moore wrote:
> >>>>> Found this July 11 blog from Adobe and installed the developer drivers
> >>>>>
> >>>>> http://blogs.adobe.com/premiereprotraining/2011/06/quadro-4000-driver-and-cuda-driver-update-for-mac-osx-v10-6-8.html
> >>>>>
> >>>>> So now CUDA is detected on VMD startup, but I still get segmentation
> >>>>> fault with 1.9.1beta. Version 1.9 is now detecting my CUDA though (it
> >>>>> wasn't after my Lion upgrade) :). See below for output from
> >>>>> 1.9.1.beta1.
> >>>>>
> >>>>> Thanks.
> >>>>>
> >>>>> Josh
> >>>>>
> >>>>> /Applications/VMD\ 1.9.1.app/Contents/MacOS/startup.command ; exit;
> >>>>> Info) VMD for MACOSXX86_64, version 1.9.1beta1 (December 29, 2011)
> >>>>> Info) http://www.ks.uiuc.edu/Research/vmd/
> >>>>> Info) Email questions and bug reports to vmd_at_ks.uiuc.edu
> >>>>> Info) Please include this reference in published work using VMD:
> >>>>> Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
> >>>>> Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
> >>>>> Info) -------------------------------------------------------------
> >>>>> Info) Multithreading available, 2 CPUs detected.
> >>>>> Info) Creating CUDA device pool and initializing hardware...
> >>>>> Info) Detected 1 available CUDA accelerator:
> >>>>> Info) [0] GeForce 9400M 2 SM_1.1 @ 1.10 GHz, 253MB RAM, KTO, ZCP
> >>>>> Info) OpenCL Platform[0]: Apple, FULL_PROFILE Devices: 2
> >>>>> Info) [0] Intel(R) Core(TM)2 Duo CPU P7350 @ 2.00GHz 2 CU @ 1.95
> >>>>> GHz, 4294MB RAM
> >>>>> Info) [1] GeForce 9400M 2 CU @ 1.07 GHz, 268MB RAM
> >>>>> Info) OpenGL renderer: NVIDIA GeForce 9400M OpenGL Engine
> >>>>> Info) Features: STENCIL MDE CVA MTX NPOT PP PS GLSL(OVF)
> >>>>> Info) Full GLSL rendering mode is available.
> >>>>> Info) Textures: 2-D (4096x4096), 3-D (256x256x256), Multitexture (8)
> >>>>> Info) Dynamically loaded 2 plugins in directory:
> >>>>> Info) /Applications/VMD 1.9.1.app/Contents/vmd/plugins/MACOSXX86_64/molfile
> >>>>> /Applications/VMD 1.9.1.app/Contents/MacOS/startup.command: line 7:
> >>>>> 9915 Segmentation fault: 11
> >>>>> "$p/../Resources/VMD.app/Contents/MacOS/VMD" $*
> >>>>> logout
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> On Fri, Dec 30, 2011 at 8:07 PM, Joshua D. Moore <joshuadmoore_at_gmail.com> wrote:
> >>>>>> Hi,
> >>>>>>
> >>>>>> As a follow-up to John's release of 1.9.1beta, I was wondering if
> >>>>>> anyone else was having trouble finding the driver for OSX 10.7, Lion?
> >>>>>>
> >>>>>> NVIDIA has the driver for Snow-Leopard but I can't find one for Lion.
> >>>>>>
> >>>>>> Anyone else have this card?
> >>>>>>
> >>>>>> I get a Seg-Fault for both versions. I'm not sure if I need to
> >>>>>> install something special for OpenCL?
> >>>>>>
> >>>>>> See below for output if interested.
> >>>>>>
> >>>>>> Thanks.
> >>>>>>
> >>>>>> Josh
> >>>>>>
> >>>>>> OpenCL + CUDA:
> >>>>>>
> >>>>>> Info) No CUDA accelerator devices available.
> >>>>>> Info) OpenCL Platform[0]: Apple, FULL_PROFILE Devices: 2
> >>>>>> Info) [0] Intel(R) Core(TM)2 Duo CPU P7350 @ 2.00GHz 2 CU @ 1.95
> >>>>>> GHz, 4294MB RAM
> >>>>>> Info) [1] GeForce 9400M 2 CU @ 1.07 GHz, 268MB RAM
> >>>>>> Info) OpenGL renderer: NVIDIA GeForce 9400M OpenGL Engine
> >>>>>> Info) Features: STENCIL MDE CVA MTX NPOT PP PS GLSL(OVF)
> >>>>>> Info) Full GLSL rendering mode is available.
> >>>>>> Info) Textures: 2-D (4096x4096), 3-D (256x256x256), Multitexture (8)
> >>>>>> Info) Dynamically loaded 2 plugins in directory:
> >>>>>> Info) /Volumes/VMD-1.9.1/VMD 1.9.1.app/Contents/vmd/plugins/MACOSXX86_64/molfile
> >>>>>> /Volumes/VMD-1.9.1/VMD 1.9.1.app/Contents/MacOS/startup.command: line
> >>>>>> 7: 7535 Segmentation fault: 11
> >>>>>> "$p/../Resources/VMD.app/Contents/MacOS/VMD" $*
> >>>>>> logout
> >>>>>>
> >>>>>> OpenCL:
> >>>>>>
> >>>>>> Info) OpenCL Platform[0]: Apple, FULL_PROFILE Devices: 2
> >>>>>> Info) [0] Intel(R) Core(TM)2 Duo CPU P7350 @ 2.00GHz 2 CU @ 1.95
> >>>>>> GHz, 4294MB RAM
> >>>>>> Info) [1] GeForce 9400M 2 CU @ 1.07 GHz, 268MB RAM
> >>>>>> Info) OpenGL renderer: NVIDIA GeForce 9400M OpenGL Engine
> >>>>>> Info) Features: STENCIL MDE CVA MTX NPOT PP PS GLSL(OVF)
> >>>>>> Info) Full GLSL rendering mode is available.
> >>>>>> Info) Textures: 2-D (4096x4096), 3-D (256x256x256), Multitexture (8)
> >>>>>> Info) Dynamically loaded 2 plugins in directory:
> >>>>>> Info) /Volumes/VMD-1.9.1 1/VMD
> >>>>>> 1.9.1.app/Contents/vmd/plugins/MACOSXX86_64/molfile
> >>>>>> /Volumes/VMD-1.9.1 1/VMD 1.9.1.app/Contents/MacOS/startup.command:
> >>>>>> line 7: 7915 Segmentation fault: 11
> >>>>>> "$p/../Resources/VMD.app/Contents/MacOS/VMD" $*
> >>>>>> logout
> >>>>
> >>>> --
> >>>> NIH Resource for Macromolecular Modeling and Bioinformatics
> >>>> Beckman Institute for Advanced Science and Technology
> >>>> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >>>> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> >>>> http://www.ks.uiuc.edu/Research/vmd/ Fax: 217-244-6078
> >>
> >> --
> >> NIH Resource for Macromolecular Modeling and Bioinformatics
> >> Beckman Institute for Advanced Science and Technology
> >> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> >> http://www.ks.uiuc.edu/Research/vmd/ Fax: 217-244-6078
> >
> > --
> > NIH Resource for Macromolecular Modeling and Bioinformatics
> > Beckman Institute for Advanced Science and Technology
> > University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> > http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
> > http://www.ks.uiuc.edu/Research/vmd/ Fax: 217-244-6078
> >
> >
>

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/       Fax: 217-244-6078