[omniORB] MFC+omniORB3004 rootContext->resolve(name) crash

Alexios Ballas k994835@king.ac.uk
Tue, 29 Jan 2002 15:46:01 +0000


Thanks for your replay....

First of all I forgot to mention that I am getting the following linker 
warning:
LINK : warning LNK4089: all references to "omniDynamic304_rt.dll" discarded 
by /OPT:REF

Which I don't think that makes any difference to my problem as I also get 
it when I link my Win32 console application that runs properly.

I tried to set TraceLevel like this:  omniORB::TraceLevel = 10;
but I got an "unknown exception" again, I don't know why...maybe I 've put 
it in the wrong place.

I solved that problem by simulating "command line arguments -ORBtraceLevel 
10" with an array of strings
since there are no "command line arguments" in MFC as far as I know.

So this is what I get on stderr:

Application stderr output window
DO NOT CLOSE THIS WINDOW, it will terminate your application!
omniORB: Initialising omniDynamic library.
omniORB: Creating ref to remote: key<0x4e616d6553657276696365>
  target id      : IDL:omg.org/CORBA/Object:1.0
  most derived id:
omniORB: Initial reference `NameService' resolved from -ORBInitRef argument.
omniORB: Creating ref to remote: key<0x4e616d6553657276696365>
  target id      : IDL:omg.org/CosNaming/NamingContext:1.0
  most derived id:
omniORB: Creating ref to remote: root<0>
  target id      : IDL:omg.org/CORBA/Object:1.0
  most derived id: IDL:Data:1.0
omniORB: tcpSocketStrand::~Strand() close socket no. 848   <===here is the 
exception

the last line is outputted when rootContext->resolve(name) is running.

I also get these lines on my debugger if they are of any help to you:
First-chance exception in Fred.exe (MSVCRTD.DLL): 0xC0000005: Access Violation.
First-chance exception in Fred.exe (KERNEL32.DLL): 0xE06D7363: Microsoft 
C++ Exception.

I am using "Multithreaded DLL".Debug and release libs seams to be fine:
Release:omniORB304_rt.lib omniDynamic304_rt.lib omnithread2_rt.lib 
wsock32.lib advapi32.lib
Debug:omniORB304_rtd.lib omniDynamic304_rtd.lib omnithread2_rtd.lib 
wsock32.lib advapi32.lib

I would really appreciate if you could tell me what is wrong.

Thanks in advance!
Alexios Ballas


At 11:35 29/01/02 +0000, Duncan Grisby wrote:
>On Friday 25 January, Alexios Ballas wrote:
>
>[...]
> > I am taking the SAME code and putting it in my MFC application.
> > Everything compiles good, but when I run the program an "unknown 
> exception"
> > is thrown at this line:
> > rootContext->resolve(name)
>
>Try running the program with command line arguments -ORBtraceLevel 10.
>That will print out what the exception is, and where it is thrown
>from.
>
>It's possible that the problem is something to do with conflicting
>DLLs / debug information. Make sure your project is using
>"Multithreaded DLL" and that you're using the correct debug/non-debug
>version of omniORB to match your application code.
>
>Cheers,
>
>Duncan.
>
>--
>  -- Duncan Grisby  \  Research Engineer  --
>   -- AT&T Laboratories Cambridge          --
>    -- http://www.uk.research.att.com/~dpg1 --