audacity icon indicating copy to clipboard operation
audacity copied to clipboard

Crash when running Nyquist Prompt with code that has widgets

Open SteveDaulton opened this issue 2 years ago • 1 comments

Describe the bug Running any code in the Nyquist Prompt that includes a ";control" widget crashes Audacity

To Reproduce Minimal example - apply the following code in the Nyquist Prompt to a selection in an audio track:

;control dummy "Dummy control" int "" 5 0 10
(noise)

Actual behavior Audacity crashes.

Expected behavior White noise returned to the selected region

Screenshots If applicable, add screenshots/video to help explain your problem.

Additional information (please complete the following information):

  • OS: Any
  • Version Audacity 3.2.0 alpha

Additional context Regression. ../source_subfolder/src/common/wincmn.cpp(1492): assert ""firstHandler->GetPreviousHandler() == __null"" failed in PopEventHandler(): the first handler of the wxWindow stack should have no previous handlers set

SteveDaulton avatar Aug 07 '22 20:08 SteveDaulton

I was able to reproduce this as described.

Here is a link to the sentry report for the crash as well: https://sentry.audacityteam.org/share/issue/56dc4b54c3024710903a5aade0bf4149/

Ryan-Miller-Audacity avatar Aug 08 '22 17:08 Ryan-Miller-Audacity

I have made an alternative fix to Dmitry's, which is surprisingly simple, though I took some wrong turns finding it.

Paul-Licameli avatar Aug 13 '22 12:08 Paul-Licameli