Hello all,
I compiled our code with the unbounded option set in rtiddsgen2. But all applications crash now with:
REDAFastBufferPool_growEmptyPoolEA: !allocate buffer of 68719444224 bytes REDAFastBufferPool_newWithNotification:!create fast buffer pool buffers PRESTypePluginDefaultEndpointData_createWriterPool:!create writer buffer pool WriterHistorySessionManager_new:!create newAllocator WriterHistoryMemoryPlugin_createHistory:!create sessionManager PRESWriterHistoryDriver_new:!create _whHnd PRESPsService_enableLocalEndpointWithCursor:!create WriterHistoryDriver PRESPsService_enableLocalEndpoint:!enable local endpoint terminate called after throwing an instance of 'dds::core::Error' what(): REDAFastBufferPool_newWithNotification:!create fast buffer pool buffers PRESTypePluginDefaultEndpointData_createWriterPool:!create writer buffer pool WriterHistorySessionManager_new:!create newAllocator WriterHistoryMemoryPlugin_createHistory:!create sessionManager PRESWriterHistoryDriver_new:!create _whHnd PRESPsService_enableLocalEndpointWithCursor:!create WriterHistoryDriver PRESPsService_enableLocalEndpoint:!enable local endpoint enable entity
https://community.rti.com/content/forum-topic/instance-resources-dispose-and-unregister
Ok, I fixed the issue by loading the attached qos profile.
But now I want to set the default QOS to this loaded QOS, but I am unable to do it. The question condenses to how can I set the default QOS from a QOS provider generated by loading an xml file?
This works:
dds::core::QosProvider qos_provider("build64/MT_RTI_QOS_PROFILES.xml","mt_profiles::unbounded_support");
dds::domain::DomainParticipant dp(1, qos_provider.participant_qos());
dds::topic::Topic<mt::Object> topic(dp,"topic", qos_provider.topic_qos());
This doesn't work!
auto qos_provider_params = qos_provider->default_provider_params();
dds::core::QosProvider::Default()->default_provider_params(qos_provider_params);
dds::domain::DomainParticipant dp(1);
dds::topic::Topic<mt::Object> topic(dp,"topic");
Hi,
Can you try changing
auto qos_provider_params = qos_provider->default_provider_params();
to:
auto qos_provider_params = qos_provider->provider_params(); ?
default_provider_params() is a static function that gives you access to the params of the Default QosProvider. So what you are doing is getting and setting the same values for the Default QosProvider. provider_params() on the other hand will get the params that you created qos_provider with, so that you can set them on the Default.