[omniORB] DSI servant deactivation fails

Lars Immisch lars@ibp.de
Sat, 3 Feb 2001 23:17:21 +0100


--NeXT-Mail-1627755093-1
Content-Type: text/enriched; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Dear all,


I am trying to deactivate a DSI servant, but get a failed assertion
"id->localRefList() == 0" in omniInternal.cc, line 546. This is flagged as
a omniORB internal error.


I have re-created the problem with a slightly modified echo DSI example
(which I have attached).


The modified echo_dsiimpl example tries to deactivate the DSI echo servant
that was freshly activated, before any access is (or can be) attempted.


The situation is the same (modulo line numbers in the assertion) in the
release version of 3.0.2 and a cvs version tagged omni3_develop updated a
week ago.

<nofill>
Is this related to the lack of support of the PortableServer::Current interface?

But, more importantly, is there a workaround?

Thanks,

Lars
</nofill>
--NeXT-Mail-1627755093-1
Content-Type: application/octet-stream; name=echo_dsiimpl.cpp;
	x-unix-mode=0740
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=echo_dsiimpl.cpp

Ly8gZWNob19kc2lpbXBsLmNjDQovLw0KLy8gICAgICAgICAgICAgICBUaGlzIGV4YW1wbGUgZGVt
b25zdHJhdGVzIHRoZSBEeW5hbWljIFNrZWxldG9uIEludGVyZmFjZS4NCi8vICAgICAgICAgICAg
ICAgSXQgaXMgYSBzZXJ2ZXIgZm9yIHRoZSBlZzJfY2x0IGNsaWVudCBpbiB0aGUNCi8vICAgICAg
ICAgICAgICAgc3JjL2V4YW1wbGVzL2VjaG8gZGlyZWN0b3J5LiBBbHRlcm5hdGl2ZWx5IHlvdSBj
YW4gdXNlIHRoZQ0KLy8gICAgICAgICAgICAgICBESUkgZWNobyBjbGllbnQgaW4gc3JjL2V4YW1w
bGVzL2RpaS4NCi8vDQovLyBVc2FnZTogZWNob19kc2lpbXBsDQovLw0KLy8gICAgICAgIE9uIHN0
YXJ0dXAsIHRoZSBvYmplY3QgcmVmZXJlbmNlIGlzIHByaW50ZWQgdG8gY2VyciBhcyBhDQovLyAg
ICAgICAgc3RyaW5naWZ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