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

Crash when cancelling Nyquist Prompt #2239

Closed
SteveDaulton opened this issue Dec 5, 2021 · 1 comment · Fixed by #2240
Closed

Crash when cancelling Nyquist Prompt #2239

SteveDaulton opened this issue Dec 5, 2021 · 1 comment · Fixed by #2240
Assignees
Labels
bug An error, undesired behaviour, or missed functionality P1 Highest level priority bugs (ship blocker / must fix) regression Bug is a regression against previous version

Comments

@SteveDaulton
Copy link
Member

SteveDaulton commented Dec 5, 2021

Describe the bug
When cancelling the Nyquist Prompt, Audacity may crash

To Reproduce
Steps to reproduce the behavior:

  1. Generate a tone
  2. Open the Nyquist Prompt and enter the code:

;control test "Test" float "" 5 0 10
(print test)

  1. Click the "OK" button
  2. Click the "Cancel" button
  3. Observe crash

Expected behavior
Not crash

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

Additional information (please complete the following information):

  • OS: Xubuntu 20.04
  • Version: Audacity 3.2.0-alpha-20211205

Additional context
This is a regression

@SteveDaulton SteveDaulton added bug An error, undesired behaviour, or missed functionality P1 Highest level priority bugs (ship blocker / must fix) regression Bug is a regression against previous version labels Dec 5, 2021
Paul-Licameli added a commit to Paul-Licameli/audacity that referenced this issue Dec 5, 2021
... To reproduce:

* Generate a tone
* Open the Nyquist Prompt and enter the code:

```
;control test "Test" float "" 5 0 10
(print test)
```

* Click the "OK" button
* Click the "Cancel" button
* Observe crash

Bug was introduced at b1e988e
The nulling-out of a pointer to the Effect in the Close routine was deleted,
but the destructor is still called later.

To fix it, don't unnecessarily repeat in the destructor of the modal dialog
(which may be delayed until an event loop) what was already done when closing
it.
@Paul-Licameli
Copy link
Member

Paul-Licameli commented Dec 5, 2021

I introduced this bug. It happens only in the development branch. See the linked PR for the fix.

@AnitaBats AnitaBats added this to To do in Sprint 10 - Enhancements&Bug fixes via automation Dec 6, 2021
@AnitaBats AnitaBats added this to the Audacity 3.1.3 milestone Dec 6, 2021
@AnitaBats AnitaBats moved this from To do to In progress in Sprint 10 - Enhancements&Bug fixes Dec 6, 2021
@AnitaBats AnitaBats moved this from In progress to Review in progress in Sprint 10 - Enhancements&Bug fixes Dec 7, 2021
Paul-Licameli added a commit to Paul-Licameli/audacity that referenced this issue Dec 9, 2021
... To reproduce:

* Generate a tone
* Open the Nyquist Prompt and enter the code:

```
;control test "Test" float "" 5 0 10
(print test)
```

* Click the "OK" button
* Click the "Cancel" button
* Observe crash

Bug was introduced at b1e988e
The nulling-out of a pointer to the Effect in the Close routine was deleted,
but the destructor is still called later.

To fix it, don't unnecessarily repeat in the destructor of the modal dialog
(which may be delayed until an event loop) what was already done when closing
it.
Paul-Licameli added a commit to Paul-Licameli/audacity that referenced this issue Dec 10, 2021
... To reproduce:

* Generate a tone
* Open the Nyquist Prompt and enter the code:

```
;control test "Test" float "" 5 0 10
(print test)
```

* Click the "OK" button
* Click the "Cancel" button
* Observe crash

Bug was introduced at b1e988e
The nulling-out of a pointer to the Effect in the Close routine was deleted,
but the destructor is still called later.

To fix it, don't unnecessarily repeat in the destructor of the modal dialog
(which may be delayed until an event loop) what was already done when closing
it.
Sprint 10 - Enhancements&Bug fixes automation moved this from Review in progress to Ready for QA Dec 10, 2021
Paul-Licameli added a commit that referenced this issue Dec 10, 2021
... To reproduce:

* Generate a tone
* Open the Nyquist Prompt and enter the code:

```
;control test "Test" float "" 5 0 10
(print test)
```

* Click the "OK" button
* Click the "Cancel" button
* Observe crash

Bug was introduced at b1e988e
The nulling-out of a pointer to the Effect in the Close routine was deleted,
but the destructor is still called later.

To fix it, don't unnecessarily repeat in the destructor of the modal dialog
(which may be delayed until an event loop) what was already done when closing
it.
@Penikov Penikov moved this from Ready for QA to In QA in Sprint 10 - Enhancements&Bug fixes Dec 10, 2021
@Penikov Penikov moved this from In QA to Done in Sprint 10 - Enhancements&Bug fixes Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error, undesired behaviour, or missed functionality P1 Highest level priority bugs (ship blocker / must fix) regression Bug is a regression against previous version
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants