Project

General

Profile

Bug #295

editconf -f some.tpr -mead segfaults

Added by Carsten Kutzner almost 11 years ago. Updated almost 11 years ago.

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

Description

When using editconf with the -mead option, it will segfault with any tpr input file.

The reason is that read_stx_conf makes a new atoms pointer and thus loses the atoms.pdbinfo[] pointer: In gmx_mtop_global_atoms the init_t_atoms routine is always called with bool bPdbInfo = FALSE, though it should be TRUE when -mead is set.

A quick fix is to add the line

snew(atoms.pdbinfo, top->atoms.nr);

after line 619 of gmx_editconf.c (if bMead { ...).

History

#1 Updated by Carsten Kutzner almost 11 years ago

Oops, the snew(atoms.pdbinfo, ...) has to go in front of the loop over atoms (line 597) of course.

A quick fix is to add the line

snew(atoms.pdbinfo, top->atoms.nr);

after line 619 of gmx_editconf.c (if bMead { ...).

#2 Updated by Berk Hess almost 11 years ago

The line should not be added in the loop,
but before, around line 592.
I fixed it for 4.0.4.

Berk

Also available in: Atom PDF