When I try to run action 40004 using Main_OnCommand, it crashes Reaper.
Code:
reaper.Main_OnCommand(40004, 0)
running the action in the actions-window or the menu doesn't crash it at all.
It is a regression, as it only crashes in Reaper 5.978, but not in Reaper 5.977.
I have tested it on Windows 7, using the 64bit-version of a vanilla Reaper, no extensions installed.