Uploaded image for project: 'GMAT'
  1. GMAT
  2. GMT-6664

Error creating Command Summary

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: P1
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Environment:

      Windows, OSX, Linux (suspected)

      Description

      When some scripts are run and a Command Summary is selected for a command, GMAT crashes. Console output shows:

      0 libGmatBase.R2018a.dylib Moderator::CloseMatlabEngine() + 71
      1 GMAT GmatMainFrame::~GmatMainFrame() + 32
      2 GMAT GmatMainFrame::~GmatMainFrame() + 14

      The issue is that Moderator::Finalize and Moderator::CLoseMatlabEngine() are called in the wrong order and the Matlab interface pointer is corrupted.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            gmat_wcs Wendy Shoan added a comment -

            This appears to be related to an exception being thrown during the writing of the tank data to the Command Summary. I think the exception is not handled, which causes OnExit() to be called before the Matlab Engine is closed. When a call is then made to close the Matlab Engine, the Matlab interface has already been deleted and GMAT crashes.

            If I change the MAX_NUM_TANKS to 40 (instead of 20), the crash does not happen.

            Show
            gmat_wcs Wendy Shoan added a comment - This appears to be related to an exception being thrown during the writing of the tank data to the Command Summary. I think the exception is not handled, which causes OnExit() to be called before the Matlab Engine is closed. When a call is then made to close the Matlab Engine, the Matlab interface has already been deleted and GMAT crashes. If I change the MAX_NUM_TANKS to 40 (instead of 20), the crash does not happen.
            Hide
            gmat_wcs Wendy Shoan added a comment -

            Corrected indexing into data when writing Tank data. on Command Summary

            Show
            gmat_wcs Wendy Shoan added a comment - Corrected indexing into data when writing Tank data. on Command Summary

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 6 hours
                  6h
                  Remaining:
                  Remaining Estimate - 6 hours
                  6h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified