[omniORB] Debug Assertion Failed! Problems with 2.8.0 and Visual C++.

Mike Bendickson bendi003@tc.umn.edu
Fri, 29 Oct 1999 10:08:33 -0500


Oops, I was using the debug libraries initially.  I tried the release
versions when I was in "try anything" mode.  Going back to the debug
libraries, the client and server appear to start correctly.  The client
displays the:

    I said,"Hello!".  The Object said,"Hello!"

message, then I get the 2 debug assertion failed messages.

Debug Assertion Failed!

 Program: ...
File: dbgheap.c
Line: 1011

 Expression: _CrtlsValidHeapPointer(pUserData)

Doing a release build, everything seems to run correctly if I execute the
client and server from the VC++ IDE.  If I try to run the client from a DOS
window I get an exception 0, 1.  UNKNOWN, NOT_COMPLETED?  I'm still
concerned about the debug assertion failures.

Is it possible that I have a conflict with the older version of omniORB on
my system?  I renamed the old directory and took it out of my path.  I don't
see how anything could be using it, but would that cause this type of
behavior?

-Mike

----- Original Message -----
From: Sai-Lai Lo <S.Lo@uk.research.att.com>
To: Mike Bendickson <bendi003@tc.umn.edu>
Cc: <omniorb-list@uk.research.att.com>
Sent: Friday, October 29, 1999 5:07 AM
Subject: Re: [omniORB] Debug Assertion Failed! Problems with 2.8.0 and
Visual C++.


> Debug version of a program should be linked with the debug version of the
> runtime libraries:
>
> omniORB280_rtd.lib omniDynamic280_rtd.lib omnithread2_rtd.lib
>
> If you have not done so, please read README.win32 on building projects
> using omniORB2.
>
> Sai-Lai
>
> >>>>> Mike Bendickson writes:
>
> > I am getting the "Debug Assertion Failed!" messages with 2.8.0 and
Visual
> > C++ 6.0 on NT 4.0.
>
> > I was using 2.7.1, but had a problem with FreeLibrary() and I DLL that I
had
> > created which was an omniORB client.  2.8.0 seemed to fix this, but I'm
now
> > seeing assertion failures.  I took a step back and created a projects
for
> > the eg2_impl.exe and eg2_clt.exe.  More problems.
>
> > It's acting quite flaky for me.  I have no idea what I could be
forgetting.
> > I added the preprocessor defines:
>
> > __WIN32__,__x86__,__NT__,__OSVERSION__=4
>
> > Include path:
>
> > d:\omniORB_280\include
>
> > Libraries:
>
> > omniORB280_rt.lib omniDynamic280_rt.lib omnithread2_rt.lib
>
> > Library path:
>
> > d:\omniORB_280\lib\x86_win32
>
> > And took the code straight from the examples.
>
> > I make minor changes that should not affect program behavior and I end
up
> > with different errors.
>
> > With eg2_impl.cc as is I the IOR is printed then:
>
> > Debug Assertion Failed!
>
> > Program: ...
> > File: dbgdel.cpp
> > Line: 47
>
> > Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
>
> > ...
>
> > Using the debugger it seems to happen on the closing bracket in this
block:
>
> >   {
> >     Echo_var myobjRef = myobj->_this();
> >     CORBA::String_var p = orb->object_to_string(myobjRef);
> >     cerr << "'" << (char*)p << "'" << endl;
> >   }
>
> > Hmm, it doesn't appear that we need those brackets at all so I remove
them.
> > Now it starts without error.  Hmm.
>
> > Ok, so I try the client.  As-is I get:
>
> > Caught a system exception.
>
> > Adding some exception code:
>
> > //  catch(...) {
> > //    cerr << "Caught a system exception." << endl;
> > //  }
> >   catch(const CORBA::SystemException &e) {
> >    cerr << "Exception: " << e.minor() << ", " << e.completed() << endl;
> >   }
>
> > I now get:
>
> > Exception: 0, 1
>
> > What's 0?  UNKNOWN?  1 is COMPLETED_NO I think.
>
> > Hmm.  Ok, lets hard code the IOR in my client:
>
> > //    CORBA::Object_var obj = orb->string_to_object(argv[1]);
> > CORBA::Object_var obj = orb->string_to_object("IOR:010000000d0...");
>
> > Now I get:
>
> > Boom!  2 Debug Assertion Failed! messages.  One for the server, one for
the
> > client.  Same message as before.
>
> > Any ideas?  I was having no problems with 2.7.1 other than with
> > FreeLibrary().
>
> > Thanks,
> > -Mike
>
>
>
>
> --
> Sai-Lai Lo                                   S.Lo@uk.research.att.com
> AT&T Laboratories Cambridge           WWW:
http://www.uk.research.att.com
> 24a Trumpington Street                Tel:   +44 1223 343000
> Cambridge CB2 1QA                     Fax:   +44 1223 313542
> ENGLAND
>
>