Problem 295 - G4MaterialPropertiesTable::DumpTable() prints incorrect information, can cause coredump
Summary: G4MaterialPropertiesTable::DumpTable() prints incorrect information, can caus...
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: materials (show other problems)
Version: 3.2
Hardware: PC Linux
: P2 normal
Assignee: gum
URL: http://citnp.caltech.edu/kamland/mont...
Depends on:
Blocks:
 
Reported: 2001-08-27 15:02 CEST by gas
Modified: 2001-08-31 11:23 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description gas 2001-08-27 15:02:05 CEST
Only the first character of each property name is printed by
G4MaterialPropertiesTable::DumpTable(), due to an extra * in the source code.
This is an easy fix.

Additionally, a check for NULL property vector should be added because NULL
entries are created by GetProperty(), at least when using the g++ implementation
of STL maps.  For example, entries with key "RINDEX" and NULL pointers will
exist in any opaque material touched by optical photons in a simulation using
G4OpBoundary process, because the process looks to see if the material has an
RINDEX by calling GetProperty().  This is perfectly reasonable, but the segment
violation from DumpTable is a problem.

While you're at it, might as well fix the warning message in RemoveEntry() to
say "RemoveEntry" instead of "AddEntry".