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

CA/Script Reentrance Crashes Reaper #607

Closed
Jeff0S opened this issue Jul 8, 2014 · 2 comments
Closed

CA/Script Reentrance Crashes Reaper #607

Jeff0S opened this issue Jul 8, 2014 · 2 comments

Comments

@Jeff0S
Copy link
Member

Jeff0S commented Jul 8, 2014

From rdvillw...@bigbobsmusicworld.com on November 01, 2013 02:47:58

Repro instructions:

  1. Create 2 simple Reascripts
  2. Create 2 simple CAs: CA1 simply runs Script 1, CA2 runs Script 2

Now if Script 1 executes CA2, when CA1 is triggered, it will crash Reaper.

If CA2 is changed to simply invoke Reaper actions instead of invoking Script 2, then no crash occurs. So, this may well be a ReaScript re-entrance problem at its heart. What is the expected output? What do you see instead? Reaper crashes as explained above

What version of SWS extension are you using? (Extensions -> About SWS...)
2.4.0#1 What is your Reaper version number and CPU architecture (e.g. Reaper 3.75 x64)? 4.55 x32 What operating system are you running? (e.g. Windows XP/7, OSX 10.5.8 etc, 64bit?) XP SP3

Original issue: http://code.google.com/p/sws-extension/issues/detail?id=607

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From rdvillw...@bigbobsmusicworld.com on November 01, 2013 14:41:41

Further testing has revealed that this problem has little to do with CAs. Rather, it seems to be a ReaScript re-entrance problem, please see: http://forum.cockos.com/showthread.php?t=130688 CA involvement is apparently just a 'red herring' :)

Sorry

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on November 05, 2013 10:51:44

fixed possible action recursion via ReaScript for the next build ( r1156 ):
CAs & macros are analyzed recursively to prevent recursion, not a scripts (not parsed, analyzed, etc..).
fix = ReaScript still not analyzed but recursion is now not possible (no crash, script is simply ignored: it is an user error anyway...)


Hey Big Bob!
thank you for the report! I digged this after your 1st post on the forum ( http://forum.cockos.com/showthread.php?t=129885 ) and there was indeed a "hole" in our recursion detection/protection thing.

Repro in v2.4.0 #1:

  • make a CA that calls a script that calls the said CA, i.e. a script like:
    from reaper_python import *
    RPR_Main_OnCommand(RPR_NamedCommandLookup('_S&M_CYCLACTION_1'),0)

sel tracks + items

RPR_Main_OnCommand(40182,0)
RPR_Main_OnCommand(40296,0)

  • run the CA

=> stack overflow!


I don't think the fix here deals with the same thing that you were describing though (2 CAs involved in the original report... may be your new finding might explain it, did not looked yet but will do/post if I find the time!) but that other fix can only help...
About SWS, I can confirm recursion is impossible (well, after the fix ;-).

Status: Fixed
Owner: jeffos...@gmail.com

@Jeff0S Jeff0S closed this as completed Jul 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant