It seems that code like:
causes segmentation fault, so does this one:Code:Ice::OutputStreamPtr out = Ice::createOutputStream(some_communicator); out->writeTypeId("::My::SomeObject");
In first case the problem is in IceInternal::BasicStream::writeTypeId:Code:Ice::OutputStreamPtr out = Ice::createOutputStream(some_communicator); out->startEncapsulation(); out->writeTypeId("::My::SomeObject"); out->endEncapsulation();
_currentWriteEncaps is NULL, as I understand in should be lazy intialized andCode:TypeIdWriteMap::const_iterator k = _currentWriteEncaps->typeIdMap->find(id);
startEncapsulation does the job, but not completly, in IceInternal::BasicStream::startWriteEncaps:
but _preAllocatedWriteEncaps is just an instance of IceInternal::WriteEncaps where typeIdMap member is NULL that's why that segmentation fault happens.Code:if(!oldEncaps) // First allocated encaps? { _currentWriteEncaps = &_preAllocatedWriteEncaps; }
The only place where typeIdMap and other members of _currentWriteEncaps get initialized is IceInternal::BasicStream::write(const ObjectPtr&), but
I don't want to send objects this way, I need to do it manually, any workaround for this ?

Reply With Quote
We'll fix this!