1

我正在DDS(更具体地说RTI DDS)用于java应用程序。我在代码中topic为我的DDS实现一个一个地创建每个,因此我可以在DDS spy编写代码后用 a 测试每个。当我写第 8 篇时,topic一切正常。然而,当我随后写 9th 时topic,似乎什么也没发生,因为程序似乎停在了某个地方。然后我进行了调试,并在大量进入代码之后,将其打印到理事会。

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x01349a58, pid=16109, tid=2429123440
#
# JRE version: Java(TM) SE Runtime Environment (7.0_65-b17) (build 1.7.0_65-b17)
# Java VM: Java HotSpot(TM) Server VM (24.65-b04 mixed mode linux-x86 )
# Problematic frame:
# V  [libjvm.so+0x48aa58]  java_lang_String::utf8_length(oopDesc*)+0x58
#
# Core dump written. Default location: /home/foo/core or core.16109
#
# An error report file with more information is saved as:
# 
# /home/foo/corehs_err_pid16109.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
#
[D0000|ENABLE]COMMENDSrReaderService_new:!create worker-specific object
[D0000|ENABLE]PRESPsService_enable:!create srr (strict reliable reader)
[D0000|ENABLE]DDS_DomainParticipantService_enable:!enable publish/subscribe service
[D0000|ENABLE]DDS_DomainParticipant_enableI:!enable service

我不确定为什么在我创建 9th 时会突然发生这种情况topic,但如果我只有 8 个,它会很好用。我也试图增加我resourcelimits的值并得到一个Immutable QOS Policy错误。有谁知道为什么会发生这个错误,为什么我的 9topic会导致失败以及如何解决这个问题?我正在运行我的应用程序32 bit RHEL 6.6

4

1 回答 1

1

我发现这是因为max objects per thread默认情况下被设置为 8 qos。要更改此设置,在创建第一个主题之前,您必须执行以下操作。

    DomainParticipantFactoryQos factoryQos = 
            new DomainParticipantFactoryQos();
    DomainParticipantFactory.TheParticipantFactory.get_qos(factoryQos);
    factoryQos.resource_limits.max_objects_per_thread = 2048;
    DomainParticipantFactory.TheParticipantFactory.set_qos(factoryQos);

然后,这会在 DDS 开始之前设置大小,因此此时是可编辑的,而不是不可变的。

于 2015-02-10T18:57:19.213 回答