[omniORB] bind_new_context() on LINUX

Claudio Eccher ceccher@gsttn.it
Fri, 14 Dec 2001 12:23:46 +0100


Hallo,
I'm trying to compile on a PC with Linux (RedHat 7.2) the simple example
server (found in Chapter 2 of the OmniORB manual) using Naming Service to
pass an object reference to the client. The example works very well on a
Windows 2000 PC.
the code is as follow:

	CosNaming::Name contextName;
		contextName.length(1);
		contextName[0].id = (const char*) "test"; // string copied
		contextName[0].kind = (const char*) "my_context"; // string copied
		// Note on kind: The kind field is used to indicate the type
		// of the object. This is to avoid conventions such as that used
		// by files (name.type -- e.g. test.ps = postscript etc.)
		CosNaming::NamingContext_var testContext;
		try {
			// Bind the context to root.
			testContext = rootContext->bind_new_context(contextName);
			//other stuff

On Linux, the server crashes when
	testContext = rootContext->bind_new_context(contextName)
is invoked.

Performing the debug the message is:
Program received signal SIGSEGV, segemntation fault.
Can you help me?


Claudio Eccher
Gruppo Soluzioni Tecnologiche
Via Maccani 54
38100 Trento
tel. 0461431323
cell. 3487110174
email ceccher@gsttn.it