Problem 1615

Summary: "Can't add command ending in "ls""
Product: Geant4 Reporter: John.Allison
Component: intercomsAssignee: Koichi Murakami <Koichi.Murakami>
Status: CLOSED FIXED    
Severity: minor CC: asai, bloer
Priority: P5    
Version: 9.6   
Hardware: All   
OS: All   

Description John.Allison 2014-04-19 10:07:28 CEST
Entered by John Allison on behalf of Ben Loer <bloer@fnal.gov> from hypernews thread http://hypernews.slac.stanford.edu/HyperNews/geant4/get/userinterface/105.html

I just may be going crazy. I have added to G4UIcmdWithAnInteger's, "n_fiber_rows" and "n_fiber_cols". They are essentially identical, but when I try to call n_fiber_cols, it fails:
 Idle> /vetotank/n_fiber_rows 1
 Idle> /vetotank/n_fiber_cols 1
 Directory <totank/n_fiber_cols 1> is not found.
It gets even more fun. If I type random junk into the shell, any command that contains "ls<space>" gets a weird error message:

 Idle> /fake/command 123
 command </fake/command 123> not found
 Idle> /fake/commandls 123
 Directory <ke/commandls 123> is not found.
My guess is that parsing the "ls" special command is going haywire for some reason. Renaming my parameter won't be hard, but it's sure an odd bug.

For the record I saw this on both geant4.9.5.p01 and 4.9.6.p01.

~Ben
Comment 1 Koichi Murakami 2014-05-26 03:36:37 CEST
It is a problem with the implementation of == operator of G4SubString.
Use another implementation for substring comparison in G4UIterminal, then it was fixed.