Problem 48 - crash on HP-aCC when executing command with a bool
Summary: crash on HP-aCC when executing command with a bool
Status: RESOLVED FIXED
Alias: None
Product: Geant4
Classification: Unclassified
Component: intercoms (show other problems)
Version: 1.0
Hardware: PC HP-UX
: P2 normal
Assignee: Makoto.Asai
URL:
Depends on:
Blocks:
 
Reported: 2000-01-27 02:48 CET by Ivana.Hrivnacova
Modified: 2000-02-22 22:59 CET (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this problem.
Description Ivana.Hrivnacova 2000-01-27 02:48:03 CET
On HP-aCC:
Executing command "/command_with_bool true" causes crash of
the program.
On Linux-g++:
Only 1/0 as bool parameters are accepted, other possibilities
are refused (true, yes, etc.)

This modification of G4UIparameter.cc helps:
int G4UIparameter::
TypeCheck(G4String newValue)
{
    char type = toupper( parameterType );
    switch(type) {
        // ...skipped
        case 'B':
             // modified -> causes crash on HP-aCC
             //newValue.toUpper();
             if (  newValue == "Y" || newValue == "N"
                  ||newValue == "YES" || newValue == "NO"
                  ||newValue == "1"   || newValue == "0"
                  ||newValue == "T" || newValue == "F"
                  ||newValue == "TRUE" || newValue == "FALSE"
                  // added
                  || newValue == "y" || newValue == "n"
                  ||newValue == "yes" || newValue == "no"
                  ||newValue == "1"   || newValue == "0"
                  ||newValue == "t" || newValue == "f"
                  ||newValue == "true" || newValue == "false")
                  return 1;
             else {
             // ... skipped
}
Comment 1 Makoto.Asai 2000-02-22 22:59:59 CET
A bug was found in g4std interface and fixed.
Fix will be included in the first patch after Geant4 1.0 release.
No modification is needed in G4UIparameter class implementation.