Skip to content
This repository has been archived by the owner on Jan 26, 2025. It is now read-only.

Fixing crash for very large USER_MOTION_SIZE values #389

Merged
merged 1 commit into from
Dec 10, 2023

Conversation

niklasknoell
Copy link
Contributor

@niklasknoell niklasknoell commented Dec 10, 2023

As mentioned in #317 and #303 a segmentation fault occurs when compiling with large USER_MOTION_SIZE values, preventing the generation of very long simulations. The error is caused by allocating the array containing the xyz motion in the main function, and thus on the stack. With large motion sizes this leads to a stack overflow causing the crash. The very simple fix is to just declare the xyz variable as a global variable outside the main function putting it into the data section of memory.

@osqzss osqzss merged commit f747b99 into osqzss:master Dec 10, 2023
@osqzss
Copy link
Owner

osqzss commented Dec 10, 2023

Thank you for fixing the segmentation fault issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants