Project

General

Profile

Bug #371

genbox segfault if residues with same name have different #atoms

Added by Peter Kasson almost 10 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Erik Lindahl
Category:
analysis tools
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

genbox will error out on a null pointer dereference if the solvent file has residues that have the same name but different #'s of atoms. Renaming residues is a workaround.

Output snippet follows:
Succesfully made neighbourlist
nri = 164234, nrj = 1421156
Checking Protein-Solvent overlap: tested 20468 pairs, removed 2593 atoms.
Checking Solvent-Solvent overlap: tested 19470 pairs, removed 156 atoms.
Added 2749 molecules
Generated solvent containing 144200 atoms in 2749 residues
Writing generated configuration to testmerge.gro

Back Off! I just backed up testmerge.gro to ./#testmerge.gro.1#

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x0008c236 in write_hconf_indexed_p (out=0xa000bda0, title=0x1800400 "Fullha", atoms=0xbffff824, nx=154370, index=0x655000, pr=3, x=0x6723000, v=0x0, box=0xbffff7dc) at /Users/kasson/Desktop/software/gromacs/src/gmxlib/confio.c:1040
1040 strcpy(nm,*atoms->atomname[ai]);
(gdb) bt
#0 0x0008c236 in write_hconf_indexed_p (out=0xa000bda0, title=0x1800400 "Fullha", atoms=0xbffff824, nx=154370, index=0x655000, pr=3, x=0x6723000, v=0x0, box=0xbffff7dc) at /Users/kasson/Desktop/software/gromacs/src/gmxlib/confio.c:1040
#1 0x0008c4c4 in write_hconf_p (out=0xa000bda0, title=0x1800400 "Fullha", atoms=0xbffff824, pr=3, x=0x6723000, v=0x0, box=0xbffff7dc) at /Users/kasson/Desktop/software/gromacs/src/gmxlib/confio.c:1104
#2 0x0008c53c in write_conf_p (outfile=0x1100430 "testmerge.gro", title=0x1800400 "Fullha", atoms=0xbffff824, pr=3, x=0x6723000, v=0x0, box=0xbffff7dc) at /Users/kasson/Desktop/software/gromacs/src/gmxlib/confio.c:1115
#3 0x0008c8e8 in write_sto_conf (outfile=0x1100430 "testmerge.gro", title=0x1800400 "Fullha", atoms=0xbffff824, x=0x6723000, v=0x0, ePBC=0, box=0xbffff7dc) at /Users/kasson/Desktop/software/gromacs/src/gmxlib/confio.c:1123

bug371.tgz (22.3 KB) bug371.tgz Example that works. David van der Spoel, 06/03/2010 12:53 PM

History

#1 Updated by David van der Spoel over 9 years ago

What kind of behavior would you expect? I could throw in a fatal error.

#2 Updated by Peter Kasson over 9 years ago

A fatal error would be reasonable. Another way would be to auto-rename RES to RES1, RES2, etc
.

#3 Updated by David van der Spoel over 9 years ago

Created an attachment (id=457)
Example that works.

I can not reproduce this. Running the attached input files with
genbox -cp speptide -cs tip4p.gro -box 5 5 5
works fine, despite that I mutilated the water box with the first residues being 3 atoms, subsequent 7 and then 4 atoms.

Can you please provide an example that crashes?

#4 Updated by David van der Spoel over 9 years ago

Can not reproduce this.

Also available in: Atom PDF