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

Synchronous Audio Router crashes when the "Configure" button is clicked #183

Closed
dechamps opened this issue Feb 2, 2023 · 2 comments
Closed
Labels
asiohost Relates to a specific ASIO Host Application.
Milestone

Comments

@dechamps
Copy link
Owner

dechamps commented Feb 2, 2023

When FlexASIO is selected as the backend of Synchronous Audio Router 0.13.1, if the "Configure" button is clicked in SAR, the process crashes.

Further investigation reveals that when the button is clicked, SAR initializes a second instance of FlexASIO inside the same process, without closing the first one beforehand. This is arguably a misuse of the ASIO API, which does not really allow for multiple ASIO driver instances inside a single process. (Nevertheless, it might be prudent, perhaps even useful, to make FlexASIO more tolerant to being instantiated multiple times.)

The crash occurs on this line, which is not surprising given this->write is a global variable:

if (this->write) abort();
this->write = std::move(write);

@dechamps
Copy link
Owner Author

dechamps commented Feb 3, 2023

I filed eiz/SynchronousAudioRouter#133 to suggest to the SAR folks that they might want to stop doing this as (IMHO) it is not compliant with the ASIO spec and might cause problems with other drivers besides FlexASIO.

@dechamps dechamps added this to the FlexASIO 1.10 milestone Feb 4, 2023
dechamps added a commit that referenced this issue Feb 4, 2023
This is to distinguish between multiple driver object instances, the
first occurrence of which was seen in #183.
@dechamps
Copy link
Owner Author

This is fixed in FlexASIO 1.10, which now allows multiple FlexASIO instances to exist simultaneously in the same process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asiohost Relates to a specific ASIO Host Application.
Projects
None yet
Development

No branches or pull requests

1 participant