Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[tao-bugs] CORBA::ORB_init will fail when using -ORBSvcConf option where path to conf file contains a space.

94 views
Skip to first unread message

Steve Ramsay

unread,
Jan 6, 2009, 8:21:31 AM1/6/09
to tao-...@cs.wustl.edu
TAO VERSION: 1.6.7
ACE VERSION: 5.6.7

HOST MACHINE: Intel Core2 CPU
OPERATING SYSTEM: Windows XP, winsock 2

TARGET MACHINE and OPERATING SYSTEM: Same as Host
COMPILER NAME AND VERSION (AND PATCHLEVEL): VC++ 7.1.603, .NET
frameword 1.1 SP1

THE $ACE_ROOT/ace/config.h:
/* config.h */
#define ACE_HAS_STANDARD_CPP_LIBRARY 1
#define ACE_DEFAULT_THREAD_KEYS 1088
#include "ace/config-win32.h"

CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features:
ssl=1

AREA/CLASS/EXAMPLE AFFECTED: TAO_Internal.cpp :
parse_svcconf_args_i(int &argc,
ACE_TCHAR **argv,
ACE_ARGV &svc_config_argv)

DOES THE PROBLEM AFFECT:
COMPILATION? No
LINKING? No
EXECUTION? Yes
OTHER (please specify)? NO

SYNOPSIS:
CORBA::ORB_init will fail when using -ORBSvcConf option where path
to conf file contains a space.

DESCRIPTION:
Lets say I have a config file located in c:\config
files\TAO_conf_file.conf
when I invoke CORBA::ORB_init with the argument -ORBSvcConf
c:\config files\TAO_conf_file.conf the orb will fail to initialize. I
have traced this down into the parse_svcconf_args_i funtion located in
$ACE_ROOT\TAO\tao\TAO_Internal.cpp. If I pass a quoted string version
of the path, the file existance check will fail, however if I pass a non
quoted path, the check succeeds and the argument is added to the
svc_config_argv variable via the call svc_config_argv.add
(current_arg). Later on the argv will be obtained from svc_config_argv
and the path will have been split into multiple command line arguments. ie:
-f
c:\config
files\TAO_conf_file.conf

I have successfully corrected this by changing the call
svc_config_argv.add (current_arg) in parse_svcconf_args_i to pass an
additional true argument. ie:
svc_config_argv.add (current_arg, true).

I have successfully tested this using paths with and without spaces.

Milan Cvetkovic

unread,
Jan 7, 2009, 10:34:58 AM1/7/09
to Steve Ramsay, tao-...@cs.wustl.edu
can you try enclosing space in quotes?

./myprog -f "c:\config files\TAO_conf_file.conf"

> _______________________________________________
> tao-bugs mailing list
> tao-...@list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/tao-bugs
>
>

Steve Ramsay

unread,
Jan 7, 2009, 10:58:15 AM1/7/09
to Milan Cvetkovic, tao-...@cs.wustl.edu
The command line that gets passed into the ORB_init call is generated
from within our application. I have tried changing the path in my
generated argv to be a quoted string, this however caused the file
existence check to fail as it tried to open a file named "c:\config
files\TAO_conf_file.conf"

Milan Cvetkovic

unread,
Jan 7, 2009, 11:49:25 AM1/7/09
to Steve Ramsay, tao-...@cs.wustl.edu
Steve Ramsay wrote:
> The command line that gets passed into the ORB_init call is generated
> from within our application. I have tried changing the path in my
> generated argv to be a quoted string, this however caused the file
> existence check to fail as it tried to open a file named "c:\config
> files\TAO_conf_file.conf"

is your app generating the full path name as one argument?

for example:

char* argv[2] = {
"./myprog",

Steve Ramsay

unread,
Mar 20, 2009, 11:50:58 AM3/20/09
to tao-...@cs.wustl.edu
TAO VERSION: 1.6.8
ACE VERSION: 5.6.8

CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/default.features:
ssl=1

files\TAO_conf_file.conf. The arguments passed to ORB_init are generated within my applications as:

char* argv[11] = {
"D:\\myapp.exe ",
"-ORBSvcConf",
"c:\\config files\\TAO_conf_file.conf",
"-ORBDottedDecimalAddresses",
"1",
"-ORBEndpoint",
"iiop://:51001/portspan=25",
"-ORBInitRef",
"NameService=corbaloc:iiop:127.0.0.1:2809/NameService",
"-ORBInitRef=LoggingService",
"corbaloc:iiop:127.0.0.1:20000/LoggingService"
};

when I invoke CORBA::ORB_init it fails to initialize. I


have traced this down into the parse_svcconf_args_i funtion located in
$ACE_ROOT\TAO\tao\TAO_Internal.cpp.

I have tried using a path that is both quoted and unquoted and both will fail.

If I pass a quoted string version of the path (ie "\"c:\\config files\\TAO_conf_file.conf\"""),

the file existance check will fail, however if I pass a non
quoted path, the check succeeds and the argument is added to the
svc_config_argv variable via the call svc_config_argv.add
(current_arg). Later on the argv will be obtained from svc_config_argv
and the path will have been split into multiple command line arguments. ie:
-f
c:\config
files\TAO_conf_file.conf

I have successfully corrected this by changing the call
svc_config_argv.add (current_arg) in parse_svcconf_args_i to pass an
additional true argument. ie:
svc_config_argv.add (current_arg, true).

There are other places with TAO_Internal which pass true when adding arguments to the svc_config_argv
variable.

Johnny Willemsen

unread,
Mar 20, 2009, 11:58:20 AM3/20/09
to Steve Ramsay, tao-...@cs.wustl.edu
Hi

Thanks for using the PRF form. Can you make a small regression test as
reproducer, try to use the attached cpp file as start point (will be part of
the upcoming 1.6.9). Try to use a svc.conf file with a space in the file
name Then store this program with a unified diff of the change in bugzilla
(see http://bugzilla.dre.vanderbilt.edu/

Regards,

Johnny Willemsen
Remedy IT
Postbus 101 - 2650 AC  Berkel en Rodenrijs
Melkrijder 11 - 3861 SG Nijkerk
The Netherlands
www.theaceorb.nl / www.remedy.nl 

*** Integrated compile and test statistics see
http://scoreboard.theaceorb.nl **
*** Commercial service and support for ACE/TAO/CIAO             ***
*** Get your free TAO Programmers Guide copy from
http://www.theaceorb.nl ***

Bug_3565_Regression_Test.cpp
0 new messages