certi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [certi-dev] Segfault when sending TSO interactions with PyHLA


From: Nicolas Huynh
Subject: Re: [certi-dev] Segfault when sending TSO interactions with PyHLA
Date: Wed, 16 Mar 2011 17:33:20 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9

Le 16/03/2011 15:45, Eric Noulard a écrit :
Le 16 mars 2011 14:58, Nicolas Huynh<address@hidden>  a écrit :
Hello

I'm trying to send TSO interactions with PyHLA 1.1.0, but the
"sendInteraction" crashes into segmentation fault.
Here is an example in attachment : the fed file and the Python federate
code.
(compiled on Linux CentOS 5.5 x86_64 with Python 2.5)

The piece of code that crashes is :
        myRtiAmb.sendInteraction(myFedAmb.interactionClassHandle,
                                 {<parameters...>},
<tag>,
                                 myFedAmb.currTime + myFedAmb.lookahead)

If I omit the last argument (time), "sendInteraction" does not crash any
more, but my receiving federate complains because it waits for a TSO
interaction and receives it in Receive Order.

Any help would be welcome !
There seems to be a typo in _hla/_rti/rtiambassador.cpp:

at line 705:

if(!PyArg_ParseTuple(args, "O&O&s|d",
         RtiInteractionClassHandle_FromPython,&theInteraction,
         ParameterHandleValuePairSet_FromPython,&theParameters,
         &theTag,
         RTIfedTime_FromPython,&theTime))
         return NULL;

I think the format string argument should be "O&O&s|O&"
RTIfedTime_FromPython is a python object not a mere double value.

at least UAV does it this way.
Are timestamped UAV ok?

Many thanks Eric,

Your patch solves the issue !

Nicolas



Attachment: nicolas_huynh.vcf
Description: Vcard


reply via email to

[Prev in Thread] Current Thread [Next in Thread]