certi-devel
[Top][All Lists]
Advanced

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

Re: [certi-dev] Unable to create RTI ambassador


From: Jan-Patrick Osterloh
Subject: Re: [certi-dev] Unable to create RTI ambassador
Date: Thu, 01 Sep 2011 18:30:25 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.20) Gecko/20110804 Lightning/1.0b2 Thunderbird/3.1.12

Am 31.08.2011 19:52, schrieb Eric Noulard:
>
>> I set these, and I get the following now, when I start xplane:
>>
>> UN Socket(RecevoirUN) : : No error
>> HLALOG - 1314800573.328 LibRTI::UnjoinedFederate -
>> d:/home/patrick/eclipse/certi/certi/libCERTI/Exception.cc>
>> CERTI::Exception [NetworkError - reason=Error while receiving UN message.
>> libRTI: exception: NetworkError (read)
>> UN Socket(EmettreUN) : : No error
>> HLALOG - 1314800573.328 LibRTI::UnjoinedFederate -
>> d:/home/patrick/eclipse/certi/certi/libCERTI/Exception.cc>
>> CERTI::Exception [NetworkError - reason=Error while sending UN message.
>> libRTI: exception: NetworkError (write)
>> libRTI: Could not execute 'Close connexion' service (Network error).
>> Service request ignored.
>>
>> ERROR: Unable to create RTI ambassador: 'libRTI: Network Read Error
>> waiting RTI reply'
> This output looks truncated and it looks as if RTIA has never started
> (or is already dead) when libRTI tries to send a message to it.
>
> Coud you add manual trace (using std::cout or std::cerr inside RTIA 
> constructor
> and destructor (see CERTI/RTIA/RTIA.cc file)
>  in order to check whether if RTIA destructor is not called prematurely.
I added some output into the RTIA.cc and also the
RTI1516ambassadorFactory.cpp::createRTIambassador. I figured out, that
in case I start everything in X-Plane, the RTIA constructor is never
called. I compared it with the one outside X-Plane, and there the RTIA
constructor is called. In the createRTIambassador method, the
CreateProcess is called with
C:/Programme/CERTI/bin/rtia.exe -f 404
within xplane, and with
C:/Programme/CERTI/bin/rtia.exe -f 1860
I've run it multiple times, and these numbers (404 and 1860) seem to be
very stable, at least in my few runs it have been always the same. Don't
know if this important.



> The fork/CreateProcess is done inside RTIambassador constructor:
> CERTI/libRTI/RTIambassador.cc lines 167--348, you can add traces in
> there as well.
I did it, but it is never called. Maybe because I use RTI1516? I should
have mentioned this, sorry.


> You can try with the debugger but it's sometimes difficult to debug
> multiple processes.
>
> Are you sure that your RTIambassador object is not going out-of-scope?
The RTIambassador is stored in a static object that my wrapper has. I
see from my debugging that after the NetworkError exception is thrown,
the descructor of the ambassador is called. From what I had debugged,
the exception occours when he's waiting for RTIA replay
(rep->receive(socketUn,msgBufReceive);) in the
RTI1516ambPrivateRefs.cpp::executeService().


> I think that in our ugly XPlane plugin we had to put the federate object
> (which contains the RTIambassador object instance) as a pointer in
> global scope (of the DLL)
> and create the object inside:
> PLUGIN_API int XPluginStart(char* outName, char* outSig, char* outDesc)
I do something similar, but I have my instance of the ambassador in my
wrapper object. Unfortunatly, he's already crashing in the constructor
part...
>
>>>> I checked the DLLs, but everything seems OK so far. I can only imagine
>>>> that xplane is loading some DLLs that interfere with CERTI, but I have
>>>> no idea how to check this... the dependency walker just shows that
>>>> xplane.exe uses a subset of the DLLs that the wrapper uses, and these
>>>> are the same. I tried to copy the CERTI dll's also to different
>>>> locations (next to xplane.exe, as well as in the plugin directory next
>>>> to my plugin, but it makes no difference. I'm running out of ideas. If I
>>>> would know, which DLLs are missing/wrong etc, it would be helpful.
>>> When you test your XPlane HLA connection are there any other federate
>>> in the federation?
>> No, I've got a "fresh", just started RTIG, without any other federates
>> joined or trying to join.
> When you setup RTIG_MSG=D in the console (or context) where the rtig is 
> started
> did you see whether if RTIG receives any message from RTIA?
>
> I guess no message will be received but I need to be sure.
>
> I'm pretty sure RTIA is dying prematurely but I cannot understand why...
>
I can confirm that the RTIG is not receiving any messages.

I think the create Process fails for some reason. If I put some output
in the main function of the RTIA, this never shows up...anyway, the
CreateProcess returns non-zero.


Bye
JPO

P.S. Thanks alot for your help so far. I'm off to a conference next week
(INTERACT), and I have to work on my presentation tomorrow, so I
probably can't do much tomorrow, and nothing next week. I hope we can
resume this work then.




-- 
Dipl. Inform. Jan-Patrick Osterloh
FuE Bereich Verkehr | R&D Division Transportation
Human Centered Design Group

OFFIS
FuE Bereich Verkehr | R&D Division Transport
Escherweg 2 - 26121 Oldenburg - Germany
Phone/Fax: +49 441 97 22-524/502
E-Mail: address@hidden
URL: http://www.offis.de


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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