Airspace-Encounter-Models / em-core

Software and data used by multiple repositories in the Aerospace Encounter Models organization.
BSD 2-Clause "Simplified" License
2 stars 8 forks source link

[BUG] Mex function, run_dynamics_fast, hard crashes MATLAB when -g flag is or isn't used to compile #8

Closed aweinert-MIT closed 2 years ago

aweinert-MIT commented 2 years ago

Depending on the operating system and compiler, the mex function, run_dynamics_fast, needs to be compiled with or without the -g flag. By default, the em-core/matlab/RUN_mex.m script uses the -g flag for windows PC and not the flag for other operating systems. However, @lydiaZeleke using MacOS and the Clang compiler ( Apple clang version 12.0.5 (clang-1205.0.22.11) required compiling with the -g. While the function should compile without or without the flag, when executing MATLAB can hard crash.

The objective of issue #7 is to improve documentation about the bug, this issue is tasked with resolving the bug such that run_dynamics_fast will compile with or without the -g on any operating system or compiler and successfully run.

aweinert-MIT commented 2 years ago

Pull request #8 addressed bug by resolving an issue when allocating the output buffer allocation size and another issue when reading inputs using pointers.