Fri 02 Sep 2011 09:57:56 PM UTC, comment #5:
After some debugging session I found
that the example code is wrong, in Application2_HLA13.cpp:
//now delete objects and resign
rtiAmb->unsubscribeObjectClass(object_ac_id);
rtiAmb->deleteObjectInstance(object_ac_id,"Delete Aircraft");
rtiAmb->unpublishObjectClass(object_ac_id);
rtiAmb->unsubscribeObjectClass(object_sub_id);
rtiAmb->deleteObjectInstance(object_sub_id,"Delete Submarine");
rtiAmb->unpublishObjectClass(object_sub_id);
is wrong since "object_ac_id" is not an ObjectClassHandle
nor is "object_sub_id" so valid code should be:
rtiAmb->deleteObjectInstance(object_ac_id,"Delete Aircraft");
rtiAmb->unpublishObjectClass(aircraft_id);
rtiAmb->deleteObjectInstance(object_sub_id,"Delete Submarine");
rtiAmb->unpublishObjectClass(submarine_id);
using this updated code, one can do
1) rtig
2) app1
3) app2
3) app2
...
n) app2
without trouble.
Now the problem is the invalid code is misusing the HLA13 handles but CERTI cannot detect that because all thoses
handles are typedef which can be assigned to one another
without even a compiler warning...
So the Nestor trouble is not a real one it's an unfortunate misuse.
The Jan-Patrick problem of a federate crashing is another separate issue we should handle in a separate report.
|