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

Carla has a high chance of closing (stopping the engine) after waking up from suspend or hibernation #1942

Open
SnipeXandrej opened this issue Oct 22, 2024 · 0 comments

Comments

@SnipeXandrej
Copy link

SnipeXandrej commented Oct 22, 2024

I run Carla with PipeWire JACK, and there's a pretty high chance that after I suspend/hibernate my laptop, and then wake up, Carla will throw a bunch of "plugin bridges" (or whatever) errors, and after that I just restart Carla.

I am running into this issue on Arch Linux, Carla 2.5.9 and PipeWire 1.2.5 (though much older versions still had these "crashes", so it's not a new bug/regression)

In the logs this gets printed:

lilv_world_add_plugin(): warning: Duplicate plugin <https://github.com/lucianodato/noise-repellent-stereo#new>
lilv_world_add_plugin(): warning: ... found in file:///home/snipex/.lv2/nrepellent.lv2/
lilv_world_add_plugin(): warning: ... and      file:///usr/lib/lv2/nrepellent.lv2/ (ignored)
[carla] Did not receive ping message from server for 30 secs, closing...
[carla] [carla] Did not receive ping message from server for 30 secs, closing...
Did not receive ping message from server for 30 secs, closing...
[carla] [carla] Did not receive ping message from server for 30 secs, closing...[carla] 
[carla] Did not receive ping message from server for 30 secs, closing...
Did not receive ping message from server for 30 secs, closing...
[carla] Did not receive ping message from server for 30 secs, closing...
[carla] Did not receive ping message from server for 30 secs, closing...Did not receive ping message from server for 30 secs, closing...

[carla] Did not receive ping message from server for 30 secs, closing...[carla] 
[carla] Did not receive ping message from server for 30 secs, closing...
Did not receive ping message from server for 30 secs, closing...
[carla] Did not receive ping message from server for 30 secs, closing...
[carla] Did not receive ping message from server for 30 secs, closing...
[carla] CarlaRingBuffer::tryWrite(0x7ffcf4315b74, 4): failed, not enough space
[carla] waitForClient(process) timed out
[carla] waitForClient(process) timed out[carla] waitForClient(process) timed out
[carla] [carla] waitForClient(process) timed out[carla] waitForClient(process) timed out

[carla] [carla] waitForClient(process) timed out
[carla] waitForClient(process) timed out
waitForClient(process) timed out

waitForClient(process) timed out
[carla] waitForClient(process) timed out
[carla] Carla assertion failure: "unlocked" in file ../utils/CarlaSemUtils.hpp, line 182
[carla] CarlaRingBuffer::tryWrite(0x7ffcf4315bd4, 4): failed, not enough space
[carla] [carla] [carla] CarlaRingBuffer::tryWrite(0x7ffc8766fee0, 4): failed, not enough space
CarlaRingBuffer::tryWrite(0x7ffc054bd770, 4): failed, not enough space
CarlaRingBuffer::tryWrite(0x7ffc79516d60, 4): failed, not enough space
[carla] CarlaRingBuffer::tryWrite(0x7ffcf4315bd4, 4): failed, not enough space
[carla] CarlaRingBuffer::tryWrite(0x7ffcf4315bd4, 4): failed, not enough space
[carla] [carla] Bridge: Failed to wait for engine, is audio not running?Bridge: Failed to wait for engine, is audio not running?

[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] waitForClient(process) timed out
[carla] waitForClient(process) timed out
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] Bridge: Failed to wait for engine, is audio not running?
[carla] CarlaThread setup with realtime priority successful
[carla] Carla Bridge Ready!

And so I made a pretty simple workaround patch to stop Carla from unnecessarily and forcibly closing:

diff --git a/source/backend/engine/CarlaEngineBridge.cpp b/source/backend/engine/CarlaEngineBridge.cpp
index 20f1fdff5..9034212d3 100644
--- a/source/backend/engine/CarlaEngineBridge.cpp
+++ b/source/backend/engine/CarlaEngineBridge.cpp
@@ -649,9 +649,9 @@ public:
 
         if (fLastPingTime > 0 && Time::currentTimeMillis() > fLastPingTime + 30000 && ! wasFirstIdle)
         {
-            carla_stderr("Did not receive ping message from server for 30 secs, closing...");
-            signalThreadShouldExit();
-            callback(true, true, ENGINE_CALLBACK_QUIT, 0, 0, 0, 0, 0.0f, nullptr);
+            carla_stderr("Did not receive ping message from server for 30 secs, closing... (not closing heheh)");
+            // signalThreadShouldExit();
+            // callback(true, true, ENGINE_CALLBACK_QUIT, 0, 0, 0, 0, 0.0f, nullptr);
         }
     }
 

now it just prints that it would be closing like before, but actually doesn't with the above patch, and just continues running just fine

[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] [carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] [carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)Did not receive ping message from server for 30 secs, closing... (not closing heheh)

[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] [carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
[carla] Did not receive ping message from server for 30 secs, closing... (not closing heheh)
Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
[carla] Carla assertion failure: "groupName != nullptr && groupName[0] != '\0'" in file ../utils/CarlaPatchbayUtils.cpp, line 25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant