Problem 907 - missing initialization causes segfault in underground_physics advanced example
Summary: missing initialization causes segfault in underground_physics advanced example
Status: RESOLVED FIXED
Alias: None
Product: Examples/Advanced
Classification: Unclassified
Component: underground_physics (show other problems)
Version: 8.1
Hardware: All All
: P2 normal
Assignee: alexander.howard
URL:
Depends on:
Blocks:
 
Reported: 2006-11-09 14:39 CET by gahs
Modified: 2007-04-08 18:56 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 gahs 2006-11-09 14:39:07 CET
In examples/advanced/underground_physics/src/DMXDetectorConstruction.cc,
 "LXe_log->SetUserLimits(theUserLimitsForXenon);" is called, but the variable
"theUserLimitsForXenon" is never initialized.  This tends to cause segfaults
during tracking.  The easiest fix is to add
    theUserLimitsForXenon    = 0;
to the constructor (line 96 in the file).
Comment 1 alexander.howard 2006-11-10 01:19:59 CET
This has been fixed in the latest reference tag and will be in the next release.
 In the mean-time just change line 974 in DMXDetectorConstruction.cc from:
        LXe_log->SetUserLimits(theUserLimitsForXenon);
to
        LXe_log->SetUserLimits(theUserLimitsForDetector);
Thanks,
Alex