-
Notifications
You must be signed in to change notification settings - Fork 227
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
Server de-registers on GUI state change #3287
Comments
I'll try it here and see if I find the same, and do some diagnosis if I do. But it will probably be after the weekend. |
I just tried the latest build of mac legacy, and it seems to register ok. I had one occurrence at the start when it registered, but then dropped back pretty quickly to not registered. But I've been unable to replicate that with several attempts: it has been registering fine and staying registered. @ann0see Is there a repeatable way you have found to demonstrate the problem? Or maybe I have misunderstood the description of the issue? |
I think that's what I saw. I don't have macOS access at the moment. Sorry for it being vague. It may have to do with restarting the server having a recording directory set to which the application doesn't have access to -> so the reason is the macOS sandbox. If the directory is set again, the sandbox has a whitelist to the chosen directory. But this may be reset after an app restart. |
Let me try to come up with steps to reproduce:
|
@softins could you please try again and wait a bit on the Server GUI? I can reproduce this with the new legacy build. |
What does this mean? Is it a special kind of build, or some special setting to apply to an installed application? |
This means that it's a sandboxed build. Both legacy and normal from the CI should be sandboxed. At least both show the error. |
Seems like a blocker! |
@softins can you reproduce this bug on your Mac? |
Now this also seems to apply to other directories like any genre 1, not just registering with localhost. |
Have you tried downgrading your version of macOS? That would help diagnose the problem, at least. This occurs on a Qt 6.7.x build, too? If not, it's going to be down to a Qt bug and the fix will never be back-ported. |
It occurs on legacy and non legacy but doesn't seem to happen on 3.10.0. So I suppose it's a bug on our side. |
What version is the non-Legacy build now? What was it for 3.10.0? Does the tagged 3.10.0 release built with the current build chain work or not? |
I have just been testing on my Macbook. It looks like the latest version of GUI server will register with a directory (I tested using I can see in Jamulus Explorer that the registration did initially succeed, and was maintained as long as the GUI retained focus. When it lost focus, the registration was actively cancelled with the directory, as Explorer showed the server was gone. I went back to 3.10.0 server, and this behaviour doesn't happen; the registration is maintained when the server window loses focus. Thankfully, I have about 16 different post-3.10.0 versions of Jamulus and JamulusServer app installed, so I want through them from earliest to latest until I got to one exhibiting the loss of registration. By checking the commit IDs of the latest working build and the first failing build, I've deduced that the change in PR #3144 is what breaks it. This is the PR that adds the saving of settings on GUI state change. It was intended to fix an issue on the Android version of Jamulus client. But in server mode it does seem to kill the registration. I haven't diagnosed why yet. It's probably not specific to the Mac. |
It's really intended for mobile rather than desktop. If it does affect the Windows desktop (I think I tested it there, though), we could make it mobile-only. |
I think on the client it's fine, but needs specific testing of the GUI server on the various platforms, and its effect on registration. I'm away for another week, so can't do much except on my Macbook. |
It sounds almost like MacOS is putting the app to sleep following that commit and, as it didn't previously acknowledge "states", it wasn't doing so. Is there some setting that can be used not to put the app to sleep when it's not got focus? Or like the run in background power states on Windows? (I notice 3.10.0 doesn't have the advanced option on Windows... let me check the latest.) |
Oh! It switches to "Not registered" immediately the window loses focus. Strange. OK, there are builds of the |
This can happen and is called App Nap I think. But it doesn't seem like that. |
src/settings.cpp 982:
... except Oh, we have two handlers for the Common to client and server - calls CSettings::Save, which is abstract, so either CClientSettings::Save or CServerSettings::Save is called.
Server-only:
|
I think the easier fix is to add a parameter to |
PR raised - if someone could check on MacOS, please? |
I tested running the server on macOS and it needed multiple tries to show up as directory. The directory did not show up for a local client if a path for recordings is set. It may not be related and needs more investigation (test with a path that is not writable).
It seems as if on 3.10.0 the directory shows up instantly.
Ursprünglich gepostet von @ann0see in #3259 (comment)
The text was updated successfully, but these errors were encountered: