mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-06-19 18:03:56 +02:00
Fix hanging processes for good #69
This commit is contained in:
+2
-2
@@ -33,8 +33,8 @@ Versioning](https://semver.org/spec/v2.0.0.html).
|
|||||||
- Fixed an issue where in certain situations Wine processes were left running
|
- Fixed an issue where in certain situations Wine processes were left running
|
||||||
after the host got forcefully terminated before it got a chance to tell the
|
after the host got forcefully terminated before it got a chance to tell the
|
||||||
plugin to shut down. This could happen when using Kontakt in Bitwig, as Bitwig
|
plugin to shut down. This could happen when using Kontakt in Bitwig, as Bitwig
|
||||||
sets a limit on the amount of time a plugin may take to shut down when closing
|
sets a limit on the amount of time a plugin may take to close when closing
|
||||||
Bitwig.
|
Bitwig, and Kontakt can take a while to shut down.
|
||||||
- Fixed a potential crash or freeze when removing a lot of plugins from a plugin
|
- Fixed a potential crash or freeze when removing a lot of plugins from a plugin
|
||||||
group at exactly the same time.
|
group at exactly the same time.
|
||||||
|
|
||||||
|
|||||||
@@ -148,7 +148,10 @@ void GroupBridge::handle_plugin_dispatch(size_t plugin_id) {
|
|||||||
if (active_plugins.size() == 0) {
|
if (active_plugins.size() == 0) {
|
||||||
logger.log(
|
logger.log(
|
||||||
"All plugins have exited, shutting down the group process");
|
"All plugins have exited, shutting down the group process");
|
||||||
main_context.stop();
|
|
||||||
|
// main_context.stop();
|
||||||
|
// FIXME: See the comment in `individual-host.cpp` #69
|
||||||
|
TerminateProcess(GetCurrentProcess(), 0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,9 +85,15 @@ main(int argc, char* argv[]) {
|
|||||||
Win32Thread dispatch_handler([&]() {
|
Win32Thread dispatch_handler([&]() {
|
||||||
bridge->handle_dispatch();
|
bridge->handle_dispatch();
|
||||||
|
|
||||||
// When the sockets get closed, this application should terminate
|
// // When the sockets get closed, this application should
|
||||||
// gracefully
|
// // terminate gracefully
|
||||||
main_context.stop();
|
// main_context.stop();
|
||||||
|
// FIXME: So some of the background threads spawned by the plugin may
|
||||||
|
// get stuck if the host got terminated abruptly. After an entire
|
||||||
|
// day of debugging I still have no idea whether this is a bug in
|
||||||
|
// yabridge, Wine, or those plugins, but just killing off this
|
||||||
|
// process and all of its threads 'fixes' the issue. #69
|
||||||
|
TerminateProcess(GetCurrentProcess(), 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle Win32 messages and X11 events on a timer, just like in
|
// Handle Win32 messages and X11 events on a timer, just like in
|
||||||
|
|||||||
Reference in New Issue
Block a user