Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reapack crash on exit in REAPER 6.66 and earlier #56

Closed
schwaaa opened this issue Aug 17, 2022 · 1 comment
Closed

reapack crash on exit in REAPER 6.66 and earlier #56

schwaaa opened this issue Aug 17, 2022 · 1 comment

Comments

@schwaaa
Copy link

schwaaa commented Aug 17, 2022

REAPER 6.66 and earlier expects the string passed in via Register("API_xxx", &regstruct) to persist as long as the function pointer is valid. This causes a potential crash on exit because reapack's ~APIReg alters the string in-place before calling Register("-API_xxx").

This will be fixed in REAPER 6.67 and later, but you may want to handle the <= 6.66 case on your side by ensuring the string persists, either by passing in a persistent copy of m_help when registering, or leaving m_help untouched and passing in a local string when unregistering, or any other way.

@cfillion
Copy link
Owner

Fixing in both ReaPack and ReaImGui. Thank you!

cfillion added a commit to cfillion/reaimgui that referenced this issue Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants