[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [certi-dev] Unable to create RTI ambassador
From: |
Eric Noulard |
Subject: |
Re: [certi-dev] Unable to create RTI ambassador |
Date: |
Mon, 12 Sep 2011 15:05:07 +0200 |
2011/9/12 Jan-Patrick Osterloh <address@hidden>:
>> Not really, at least I don't think so.
>> rtia uses -f when run in "file descriptor mode"
>> it could use -p when used in TCP mode.
>> TCP mode is used if you compile CERTI with RTIA_USE_TCP.
>
> I will try this. Is this a flag that I have to set in cmake, or can I
> also use this in the makefile?
I's easier to set it in the CMakeLists.tx, which in turns switch on
a macro definition.
>>>> 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.
>> How would destructor be called if constructor is not?
>
> The constructor of the RTIambassador is called, but fails with an
> exception. I assume that therefore the destructor is called for cleanup...
OK.
>>>> 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...
>> Could you debug into
>> rti1516::RTIambassadorFactory::createRTIambassador
>> and go step by step in there in order see if something goes wrong in there?
>
> I already did this, by adding the following macro to the cpp file:
>
> #define dbg \
> { \
> FILE *logfiletmp = fopen("out2.txt","at"); \
> fprintf (logfiletmp, "DBG: %s::%s::%d\n", __FILE__, __FUNCTION__,
> __LINE__); \
> fclose (logfiletmp); \
> }
>
>
> Adding dbg commands to several lines in the code, I see which lines are
> executed (I had to print it to a file, as console output is somehow lost
> within xplane).
> See attached PDF for the code, and here is the output:
I'll have a look and come back to you.
[...]
>
> In xplane, I get the same lines, but after executeService::200 it
> diverges due to the error.
>
> I will try to compile it with the TCP flag. If this doesn't work, I may
> ask the xplane developers, if they have an idea (e.g. if xplane doesn't
> allow opening new processes).
Yes you could do that but I'm pretty sure we manage to do it with our
ugly plugin and virtual air did the same with theirs.
--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
- Re: [certi-dev] Unable to create RTI ambassador, Jan-Patrick Osterloh, 2011/09/01
- Re: [certi-dev] Unable to create RTI ambassador, Eric Noulard, 2011/09/07
- Re: [certi-dev] Unable to create RTI ambassador, Jan-Patrick Osterloh, 2011/09/12
- Re: [certi-dev] Unable to create RTI ambassador,
Eric Noulard <=
- Re: [certi-dev] Unable to create RTI ambassador, Jan-Patrick Osterloh, 2011/09/12
- Re: [certi-dev] Unable to create RTI ambassador, Jan-Patrick Osterloh, 2011/09/13
- Re: [certi-dev] Unable to create RTI ambassador, Eric Noulard, 2011/09/13
- Re: [certi-dev] [SOLVED] Unable to create RTI ambassador, Jan-Patrick Osterloh, 2011/09/13
- Re: [certi-dev] [SOLVED] Unable to create RTI ambassador, Eric Noulard, 2011/09/13
- Re: [certi-dev] [SOLVED] Unable to create RTI ambassador, Jan-Patrick Osterloh, 2011/09/14
- Re: [certi-dev] [SOLVED] Unable to create RTI ambassador, Eric Noulard, 2011/09/14
- Re: [certi-dev] [SOLVED] Unable to create RTI ambassador, Jan-Patrick Osterloh, 2011/09/14