Problem 2006 - std::out_of_range exception is raised when typing 'ls' in UI terminal
Summary: std::out_of_range exception is raised when typing 'ls' in UI terminal
Status: CLOSED DUPLICATE of problem 1989
Alias: None
Product: Geant4
Classification: Unclassified
Component: interfaces/common (show other problems)
Version: 10.3
Hardware: All All
: P2 critical
Assignee: Koichi Murakami
URL:
Depends on:
Blocks:
 
Reported: 2017-09-14 07:10 CEST by Koichi Murakami
Modified: 2017-09-17 08:28 CEST (History)
0 users

See Also:


Attachments
Fixed version of G4VBasicShell.cc (13.17 KB, text/plain)
2017-09-14 07:15 CEST, Koichi Murakami
Details

Note You need to log in before you can comment on or make changes to this problem.
Description Koichi Murakami 2017-09-14 07:10:38 CEST
In UI terminal, when typing 'ls' command, then
std::out_of_range exception is raised, showing the following message:


PreInit> ls
terminate called after throwing an instance of 'std::out_of_range'
  what():  basic_string::substr
Aborted

Traceback indicates some problem within the Geant4 terminal code:

#7  0x00007ffff68bed18 in G4VBasicShell::ModifyPath(G4String const&)
const ()    at
/...../gcc/gcc-4.8.5/include/c++/4.8.5/bits/basic_string.h:324
#8  0x00007ffff68bf0a2 in G4VBasicShell::FindDirectory(char const*) const () at
/..../geant4/geant4.10.03.p02/source/interfaces/common/src/G4VBasicShell.cc:92
#9  0x00007ffff68c17bd in G4VBasicShell::ListDirectory(G4String const&) const () at
/..../geant4/geant4.10.03.p02/source/interfaces/common/src/G4VBasicShell.cc:344
#10 0x00007ffff68b1828 in G4UIterminal::GetCommand(char const*) () at
/.../geant4/geant4.10.03.p02/source/interfaces/basic/src/G4UIterminal.cc:229
#11 0x00007ffff68b26df in G4UIterminal::SessionStart() () at
/.../geant4/geant4.10.03.p02/source/interfaces/basic/src/G4UIterminal.cc:139
Comment 1 Koichi Murakami 2017-09-14 07:15:36 CEST
Created attachment 469 [details]
Fixed version of G4VBasicShell.cc

The fixed source file for
/sources/interfaces/common/src/G4VBasicShell.cc
Comment 2 Koichi Murakami 2017-09-14 07:16:44 CEST
The fix was included in interfaces-V10-03-01.
Comment 3 Gabriele Cosmo 2017-09-14 08:20:43 CEST

*** This problem has been marked as a duplicate of problem 1989 ***