{"action":"created","issue":{"url":"https://api.github.com/repos/colvars/colvars/issues/38","labels_url":"https://api.github.com/repos/colvars/colvars/issues/38/labels{/name}","comments_url":"https://api.github.com/repos/colvars/colvars/issues/38/comments","events_url":"https://api.github.com/repos/colvars/colvars/issues/38/events","html_url":"https://github.com/colvars/colvars/issues/38","id":69233495,"number":38,"title":"VMD seg fault on syntax error in cv definition","user":{"login":"cmayne","id":11999878,"avatar_url":"https://avatars.githubusercontent.com/u/11999878?v=3","gravatar_id":"","url":"https://api.github.com/users/cmayne","html_url":"https://github.com/cmayne","followers_url":"https://api.github.com/users/cmayne/followers","following_url":"https://api.github.com/users/cmayne/following{/other_user}","gists_url":"https://api.github.com/users/cmayne/gists{/gist_id}","starred_url":"https://api.github.com/users/cmayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmayne/subscriptions","organizations_url":"https://api.github.com/users/cmayne/orgs","repos_url":"https://api.github.com/users/cmayne/repos","events_url":"https://api.github.com/users/cmayne/events{/privacy}","received_events_url":"https://api.github.com/users/cmayne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-17T22:49:41Z","updated_at":"2015-04-17T22:53:51Z","closed_at":null,"body":"This bug refers to the implementation of Colvars in VMD.  When configuring the colvar, any error in syntax causes a seg fault that terminates VMD.  As a simple example, the following code results in a seg fault when entered into tkcon console (VMD console dump is given below):\r\n\r\n```\r\nmol new 1GWR\r\nset sel1 [atomselect top \"noh chain A and resid 533 to 536\"]\r\nset sel2 [atomselect top \"noh chain A and resid 339 to 351\"]\r\ncv molid top\r\ncv config \\\r\n\"colvar {\r\n\tname cn\r\n\tcoordNum {\r\n\t\tgroup1 { atomNumbers [$sel1 get serial] }\r\n\t\tgroup2 { atomNumbers [$sel2 get serial] }\r\n\t}}\"\r\n```\r\n\r\nThe error is that the closing braces are on the same line, i.e., the following code is the corrected version:\r\n\r\n```\r\nmol new 1GWR\r\nset sel1 [atomselect top \"noh chain A and resid 533 to 536\"]\r\nset sel2 [atomselect top \"noh chain A and resid 339 to 351\"]\r\ncv molid top\r\ncv config \\\r\n\"colvar {\r\n\tname cn\r\n\tcoordNum {\r\n\t\tgroup1 { atomNumbers [$sel1 get serial] }\r\n\t\tgroup2 { atomNumbers [$sel2 get serial] }\r\n\t}\r\n}\"\r\n```\r\n\r\nIn my experience, this occurs with **any** syntactical error provided either directly within VMD, as shown above, or by providing a config file.  Here is the console data from VMD demonstrating the seg fault, including the Version of VMD (I can reproduce this on Mac OS X version of VMD as well):\r\n\r\n> Info) VMD for LINUXAMD64, version 1.9.2 (December 29, 2014)\r\n> Info) http://www.ks.uiuc.edu/Research/vmd/                         \r\n> Info) Email questions and bug reports to vmd@ks.uiuc.edu           \r\n> Info) Please include this reference in published work using VMD:   \r\n> Info)    Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual   \r\n> Info)    Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.\r\n> Info) -------------------------------------------------------------\r\n> Info) Multithreading available, 8 CPUs detected.\r\n> Info) Free system memory: 23441MB (97%)\r\n> Info) Creating CUDA device pool and initializing hardware...\r\n> Info) Detected 1 available CUDA accelerator:\r\n> Info) [0] GeForce GTX 570    15 SM_2.0 @ 1.46 GHz, 1.2GB RAM, KTO, AE1, ZCP\r\n> Info) Detected 1 available TachyonL/OptiX ray tracing accelerator\r\n> Warning) Detected X11 'Composite' extension: if incorrect display occurs\r\n> Warning) try disabling this X server option.  Most OpenGL drivers\r\n> Warning) disable stereoscopic display when 'Composite' is enabled.\r\n> Info) OpenGL renderer: GeForce GTX 570/PCIe/SSE2\r\n> Info)   Features: STENCIL MSAA(4) MDE CVA MTX NPOT PP PS GLSL(OVFGS) \r\n> Info)   Full GLSL rendering mode is available.\r\n> Info)   Textures: 2-D (16384x16384), 3-D (2048x2048x2048), Multitexture (4)\r\n> Info) Dynamically loaded 2 plugins in directory:\r\n> Info) /Projects/vmd/pub/linux64/lib/vmd192/plugins/LINUXAMD64/molfile\r\n> after#0\r\n> vmd > source setupCV_broken.tcl\r\n>   The PDB is supported by RCSB, the NSF, US PHS, NIH, NCRP, NIGMS, NLM,\r\n> and US DoE, who are not liable for the data.  PDB files shall not be\r\n> sold.  See ftp://ftp.rcsb.org/advisory.doc for full details.\r\n> Info) Using plugin webpdb for structure file 1GWR\r\n> Info) Using plugin webpdb for coordinates from file 1GWR\r\n> Info) Determining bond structure from distance search ...\r\n> Info) Analyzing structure ...\r\n> Info)    Atoms: 3987\r\n> Info)    Bonds: 4016\r\n> Info)    Angles: 0  Dihedrals: 0  Impropers: 0  Cross-terms: 0\r\n> Info)    Bondtypes: 0  Angletypes: 0  Dihedraltypes: 0  Impropertypes: 0\r\n> Info)    Residues: 542\r\n> Info)    Waters: 45\r\n> Info)    Segments: 1\r\n> Info)    Fragments: 55   Protein: 8   Nucleic: 0\r\n> colvars: ----------------------------------------------------------------------\r\n> colvars: Initializing the collective variables module, version 2014-10-13.\r\n> colvars: ----------------------------------------------------------------------\r\n> colvars: Reading new configuration:\r\n> colvars: # indexFile = \"\" [default]\r\n> colvars: # analysis = off [default]\r\n> colvars: # colvarsTrajFrequency = 0 [default]\r\n> colvars: # colvarsRestartFrequency = 0 [default]\r\n> colvars: # colvarsTrajAppend = off [default]\r\n> colvars: ----------------------------------------------------------------------\r\n> colvars:   Initializing a new collective variable.\r\n> colvars:   # name = \"colvar1\" [default]\r\n> colvars: Error: no valid components were provided for this collective variable.\r\n> colvars:   All components initialized.\r\n> Segmentation fault (core dumped)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/colvars/colvars/issues/comments/94091689","html_url":"https://github.com/colvars/colvars/issues/38#issuecomment-94091689","issue_url":"https://api.github.com/repos/colvars/colvars/issues/38","id":94091689,"user":{"login":"giacomofiorin","id":4512089,"avatar_url":"https://avatars.githubusercontent.com/u/4512089?v=3","gravatar_id":"","url":"https://api.github.com/users/giacomofiorin","html_url":"https://github.com/giacomofiorin","followers_url":"https://api.github.com/users/giacomofiorin/followers","following_url":"https://api.github.com/users/giacomofiorin/following{/other_user}","gists_url":"https://api.github.com/users/giacomofiorin/gists{/gist_id}","starred_url":"https://api.github.com/users/giacomofiorin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giacomofiorin/subscriptions","organizations_url":"https://api.github.com/users/giacomofiorin/orgs","repos_url":"https://api.github.com/users/giacomofiorin/repos","events_url":"https://api.github.com/users/giacomofiorin/events{/privacy}","received_events_url":"https://api.github.com/users/giacomofiorin/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T22:53:51Z","updated_at":"2015-04-17T22:53:51Z","body":"Hi Chris, John recently included in the VMD base code numerous fixes for\nthe VMD implementation ot the colvars module.\n\nOn Fri, Apr 17, 2015 at 6:49 PM, cmayne <notifications@github.com> wrote:\n\n> This bug refers to the implementation of Colvars in VMD. When configuring\n> the colvar, any error in syntax causes a seg fault that terminates VMD. As\n> a simple example, the following code results in a seg fault when entered\n> into tkcon console (VMD console dump is given below):\n>\n> mol new 1GWR\n> set sel1 [atomselect top \"noh chain A and resid 533 to 536\"]\n> set sel2 [atomselect top \"noh chain A and resid 339 to 351\"]\n> cv molid top\n> cv config \\\n> \"colvar {\n>     name cn\n>     coordNum {\n>         group1 { atomNumbers [$sel1 get serial] }\n>         group2 { atomNumbers [$sel2 get serial] }\n>     }}\"\n>\n> The error is that the closing braces are on the same line, i.e., the\n> following code is the corrected version:\n>\n> mol new 1GWR\n> set sel1 [atomselect top \"noh chain A and resid 533 to 536\"]\n> set sel2 [atomselect top \"noh chain A and resid 339 to 351\"]\n> cv molid top\n> cv config \\\n> \"colvar {\n>     name cn\n>     coordNum {\n>         group1 { atomNumbers [$sel1 get serial] }\n>         group2 { atomNumbers [$sel2 get serial] }\n>     }\n> }\"\n>\n> In my experience, this occurs with *any* syntactical error provided\n> either directly within VMD, as shown above, or by providing a config file.\n> Here is the console data from VMD demonstrating the seg fault, including\n> the Version of VMD (I can reproduce this on Mac OS X version of VMD as\n> well):\n>\n> Info) VMD for LINUXAMD64, version 1.9.2 (December 29, 2014)\n> Info) http://www.ks.uiuc.edu/Research/vmd/\n>\n> Info) Email questions and bug reports to vmd@ks.uiuc.edu\n>\n> Info) Please include this reference in published work using VMD:\n>\n> Info) Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual\n>\n> Info) Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.\n> Info) -------------------------------------------------------------\n> Info) Multithreading available, 8 CPUs detected.\n> Info) Free system memory: 23441MB (97%)\n> Info) Creating CUDA device pool and initializing hardware...\n> Info) Detected 1 available CUDA accelerator:\n> Info) [0] GeForce GTX 570 15 SM_2.0 @ 1.46 GHz, 1.2GB RAM, KTO, AE1, ZCP\n> Info) Detected 1 available TachyonL/OptiX ray tracing accelerator\n> Warning) Detected X11 'Composite' extension: if incorrect display occurs\n> Warning) try disabling this X server option. Most OpenGL drivers\n> Warning) disable stereoscopic display when 'Composite' is enabled.\n> Info) OpenGL renderer: GeForce GTX 570/PCIe/SSE2\n> Info) Features: STENCIL MSAA(4) MDE CVA MTX NPOT PP PS GLSL(OVFGS)\n> Info) Full GLSL rendering mode is available.\n> Info) Textures: 2-D (16384x16384), 3-D (2048x2048x2048), Multitexture (4)\n> Info) Dynamically loaded 2 plugins in directory:\n> Info) /Projects/vmd/pub/linux64/lib/vmd192/plugins/LINUXAMD64/molfile\n> after#0\n> vmd > source setupCV_broken.tcl\n> The PDB is supported by RCSB, the NSF, US PHS, NIH, NCRP, NIGMS, NLM,\n> and US DoE, who are not liable for the data. PDB files shall not be\n> sold. See ftp://ftp.rcsb.org/advisory.doc for full details.\n> Info) Using plugin webpdb for structure file 1GWR\n> Info) Using plugin webpdb for coordinates from file 1GWR\n> Info) Determining bond structure from distance search ...\n> Info) Analyzing structure ...\n> Info) Atoms: 3987\n> Info) Bonds: 4016\n> Info) Angles: 0 Dihedrals: 0 Impropers: 0 Cross-terms: 0\n> Info) Bondtypes: 0 Angletypes: 0 Dihedraltypes: 0 Impropertypes: 0\n> Info) Residues: 542\n> Info) Waters: 45\n> Info) Segments: 1\n> Info) Fragments: 55 Protein: 8 Nucleic: 0\n> colvars:\n> ----------------------------------------------------------------------\n> colvars: Initializing the collective variables module, version 2014-10-13.\n> colvars:\n> ----------------------------------------------------------------------\n> colvars: Reading new configuration:\n> colvars: # indexFile = \"\" [default]\n> colvars: # analysis = off [default]\n> colvars: # colvarsTrajFrequency = 0 [default]\n> colvars: # colvarsRestartFrequency = 0 [default]\n> colvars: # colvarsTrajAppend = off [default]\n> colvars:\n> ----------------------------------------------------------------------\n> colvars: Initializing a new collective variable.\n> colvars: # name = \"colvar1\" [default]\n> colvars: Error: no valid components were provided for this collective\n> variable.\n> colvars: All components initialized.\n> Segmentation fault (core dumped)\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/colvars/colvars/issues/38>.\n>\n\n\n\n-- \nGiacomo Fiorin\nAssistant Professor of Research\nInstitute for Computational Molecular Science (ICMS)\nCollege of Science and Technology, Temple University\n1925 North 12th Street (035-07), Room 704D\nPhiladelphia, PA 19122-1801\nPhone: +1-215-204-4213\nhttps://icms.cst.temple.edu/members.html\nhttp://giacomofiorin.github.io/\n"}}