[omniORB] Debug Assertion Failed! Problems with 2.8.0 and Visual C++.
Sai-Lai Lo
S.Lo@uk.research.att.com
29 Oct 1999 11:07:18 +0100
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