From: yjcoshc (
Date: Mon Apr 04 2022 - 10:06:35 CDT

Dear VMD developers,

I am using the "Merge Structures" plugin in VMD 1.9.4a51, and after
setting all the options and clicking the "Merge" button, VMD encounters
a segmentation fault. The VMD binary is download from the official
website. I have also tried to compile VMD from source with debug
options, and the backtrace is attached as following:

Thread 1 "vmd_LINUXAMD64" received signal SIGSEGV, Segmentation fault.
0x00007fc70f04aded in __GI__IO_fflush (fp=0x46ac450) at iofflush.c:39
39            _IO_acquire_lock (fp);
(gdb) bt
#0  0x00007fc70f04aded in __GI__IO_fflush (fp=0x46ac450) at iofflush.c:39
#1  0x00007fc6f4ef6c82 in newhandle_msg_text (psfcontext=0x516c090,
interp=interp_at_entry=0x4158b60, msg=msg_at_entry=0x7ffef16f7590 "reading
topology file
at src/tcl_psfgen.c:71
#2  0x00007fc6f4ef6d35 in newhandle_msg (vdata=vdata_at_entry=0x4be8230,
v=v_at_entry=0x4158b60, msg=msg_at_entry=0x7ffef16f7590 "reading topology file
at src/tcl_psfgen.c:95
#3  0x00007fc6f4ef7183 in tcl_topology (data=0x4be8230,
interp=0x4158b60, argc=<optimized out>, argv=<optimized out>) at
#4  0x00007fc70f8da815 in TclInvokeStringCommand () from /lib64/
#5  0x00007fc70f8dbad2 in TclNRRunCallbacks () from /lib64/
#6  0x00007fc70f8e200a in ?? () from /lib64/
#7  0x00007fc70f8e2833 in Tcl_EvalEx () from /lib64/
#8  0x00007fc70f8e2856 in Tcl_Eval () from /lib64/
#9  0x00007fc6f4ef98fd in tcl_psfcontext (data=0x4be8230,
interp=0x4158b60, argc=<optimized out>, argv=0x415cf90) at
#10 0x00007fc70f8da815 in TclInvokeStringCommand () from /lib64/
#11 0x00007fc70f8dbad2 in TclNRRunCallbacks () from /lib64/
#12 0x00007fc70f9aa1ac in ?? () from /lib64/
#13 0x00007fc70f9a9d97 in TclServiceIdle () from /lib64/
#14 0x00007fc70f98ce9c in Tcl_DoOneEvent () from /lib64/
#15 0x0000000000a30f09 in TclTextInterp::doTkUpdate (this=0x4158ac0) at
#16 0x00000000009aaecb in UIText::check_event (this=0x4156990) at
#17 0x0000000000894ee3 in CommandQueue::check_events (this=0x3a677f0) at
#18 0x00000000009af65a in VMDApp::VMDupdate (this=0x3a3f030,
check_for_events=1) at VMDApp.C:915
#19 0x0000000000a045ef in main (argc=1, argv=0x7ffef16f8468) at vmdmain.C:93

I suspect it may be caused by incorrect file descriptor
psfcontext->PSFGENLOGFILE (or wild pointer) in the new psfgen 2.0. The
crash does not happen in VMD 1.9.3, which uses psfgen 1.6. Any ideas?


Haochuan Chen