openlvc / portico

Portico is an open source, cross-platform, fully supported HLA RTI implementation. Designed with modularity and flexibility in mind, Portico is a production-grade RTI for the Simulation and Training Community, so come say hi!
http://www.porticoproject.org
151 stars 81 forks source link

run example error #267

Open fresh-ji opened 6 years ago

fresh-ji commented 6 years ago

Hello Tim, I am a fresh man on hla/rti. Today when i run the project under "%RTI_HOME%\examples\cpp\ieee1516e" which was compiled by my own vs2010 IDE, the following error occured:

Created Federation Joined Federation as exampleFederate ERROR [fedamb] Received callback for unknown federate (id=1) ERROR [fedamb] Received callback for unknown federate (id=1)

. It is generated by "rtiamb->evokeMultipleCallbacks( 0.1, 1.0 );" after registered federation synchronization point. Could you give me some advice to solve it. Thank you very much!!!

BradyLeach commented 6 years ago

Hi Ji,

I was able to recreate your issue. I believe that you may have your environment variables and location of the dll configured incorrectly.

The only way I could get that error was by having the librtixx.dll in multiple locations. The RTI_HOME path is used to locate the dlls by the java side. By having copied them to the $(ProjectDIr) or the $(OutDir) you will be reading different dll on the cpp and java side.

This is an image from the process explorer that shows the conflicting dll being loaded. processexplorer

In order to get the debug and release mode to work leave the dll in teh installation directory and adjust the environment path in the vs10 project.

RTI_HOME=path\to\portico\ PATH=path\to\portico\jre\bin\server;path\to\portico\bin\vc10

I hope this helps to fix the error and gets you moving in the right direction.