nasa / trick

Trick Simulation Environment. Trick provides a common set of simulation capabilities and utilities to build simulations automatically.
Other
34 stars 19 forks source link

Fixed one warning message at shutdown after checkpoint load and kept the current multicast group after checkpoint load. #1784

Closed hchen99 closed 1 week ago

hchen99 commented 2 weeks ago
  1. When an external app such as the sim control panel is configured as following in the input file, the corresponding destructor gets called at the shutdown. In turn, the MM will try to clean the memory for the vars related to the external app even those vars were already taken care of due to the shutdown. Thus there was a warning message. simControlPanel = trick.SimControlPanel() trick.add_external_application(simControlPanel) However, if having trick.sim_control_panel_set_enabled(True) in the input file, there was no warning message.

Deleted the unnecessary command c str pointer, thus removed the need to free its memory allocation as before.

  1. Made sure that the multicast group is not initialized before calling a function to initialize it in VariableServerListenThread.cpp. Without the check, trick-sniffer wouldn't find the sim anymore after loading a checkpoint as the multicast group got initialized again even it was already initialized.
coveralls commented 2 weeks ago

Coverage Status

coverage: 55.83% (-0.06%) from 55.892% when pulling c1f4af18e48877239b9b4f88a9cc40f082542bfe on fix-two-warning-messages-related-to-checkpoint-load into eed87076385b57e1116ae43b4cb62a68bcdb74f0 on master.