Move ping/delay/jitter measurements from settings to main window#1762
Move ping/delay/jitter measurements from settings to main window#1762softins merged 11 commits intojamulussoftware:masterfrom dcorson-ticino-com:master
Conversation
The values are not updated on the cleintsettings tab. I don't think this is too ugly, so it could be workable. Please test to see if it no longer has memory loss. The only problem I see is with the stream data rate which is now not shown. I could imagine to use a static variable to store the last value and only update when changed, which will be almost never. I will start now to clean this up with the accessibility stuff, etc. where it should be. Will not change the functioning.
|
You definitely need the stream rate displayed somewhere, and it makes sense to do that in the original place (just having the one line in the Measurements box), since it is only when changing audio quality or mono/stereo that it changes. I have been running this PR under the same conditions as my earlier tests, and it does not ramp up the memory or CPU usage, so that is certainly an improvement. It also looks quite nice having the details on the screen like that. |
|
I've also tested running with the mixer window not on top:
In both cases, the memory and CPU usage remained stable. So it looks like this is the way to go. Just display the audio stream rate in the Settings window as before, and move the ping time, and overall delay to the main window as you have done. |
|
I'd say this is a good solution to the issue. (It might also close another issue I didn't look for yet) I just noticed that the UI (mixing board) starts to move around while the Ding/Delay changes. |
|
Will you totally remove the Measurements box in settings or do you think we should still show the LEDs there? |
I don't think it needs to show the LEDs, but it does need to show the data rate, as that is not shown anywhere else, and doesn't change except when the user changes something. |
|
Yes. But I think we could still show the LEDs. We'd at least have some stats in the settings window. |
But the LEDs still get updated when their status changes, and it's frequent updates in the settings window that potentially cause the issue (even though we've only seen it with |
|
Yes. But they don't seem to produce the bug. Let's wait what others think. |
WhatsThis etc. updated for new positions. Measurement values removed from settingsdlg Audio data rate back in settingsdlg
|
I just pushed an update with corrections and cleaning up. |
softins
left a comment
There was a problem hiding this comment.
This is a great improvement. But a few comments:
- Need to make the value fields long enough to contain the largest value (e.g. 999) without varying in length. And make the fields of fixed length so they don't make the right-hand separator jump. I think this is what @ann0see mentioned.
- There are some translation updates, e.g. "buffers" to "jitter buffers". We might want to revert to "buffers" until after the next release?
- I wasn't able to make the "> 500ms" message appear. Will try again.
|
This will have an effect on the translations in any case. The data stream was part of the same whatsthis text as the ping etc. |
src/clientdlgbase.ui
Outdated
| </tabstops> | ||
| <resources> | ||
| <include location="resources.qrc"/> | ||
| <include location="../../jamulus3_8_0rc1/src/resources.qrc"/> |
There was a problem hiding this comment.
I have no explanation how that got in there. I checking to correct.
There was a problem hiding this comment.
Those lines do not exist in my source.
I do not know what to do.
I have pushed again with small changes to the UI to assure the display of >500 etc.
I hope these errors are now gone.
BTW I checked the >500 display by changing the if comparison to 200, there are many servers with more than 200ms. But now it is back to 500.
There was a problem hiding this comment.
I hope these errors are now gone.
Looks good!
(Not marking this as resolved yet as it contains a hint for @softins regarding the 500ms question above)
| lblDelay->setWhatsThis ( strConnStats ); | ||
| lblDelayVal->setWhatsThis ( strConnStats ); | ||
| ledDelay->setWhatsThis ( strConnStats ); | ||
| ledDelay->setToolTip ( tr ( "If this LED indicator turns red, " |
There was a problem hiding this comment.
Not part of this PR, but we should use QString ( … %1 … ) .arg ( APP_NAME ); here
There was a problem hiding this comment.
Not part of this PR, but we should use QString ( … %1 … ) .arg ( APP_NAME ); here
Yes, I agree. Just to re-iterate, this not only does not have to be part of this PR, it should not be part of this PR to avoid introducing even more translation movements.
|
@dcorson-ticino-com would it make sense to update the Fancy LEDs as part of this change? In total 6 lines of codes you need to update and add two images (which you can take from my PR #1752)? |
Will we do a translation update for this? Just noticed a "What is This?" dialog which now contains a mixture of English (not translated) and Dutch. Not too disturbing though....but just checking. |
There was a problem hiding this comment.
Haven't looked at all details yet, just some thoughts:
- Despite the technical necessity to avoid the memleak, I personally like the change as it'll allow me to keep the settings window closed.
- I'm wondering if we should hide all the labels in disconnected state in order to avoid cluttering the UI for new users which haven't even connected (maybe in a follow up PR?).
- As this PR "only" shifts UI elements around, no new translations should be necessary, right? Are there any manual .ts edits necessary to guarantee that? (Also wondering where the strangeness that @henkdegroot described comes from)
- I'm a bit wary if this PR may just shift the problem from the settings window to the main window. @softins's tests seem to show that this is not the case. @pianojoe's initial bug report contained information that the main window may have a problem as well, so we should be extra sure that we don't make things worse by this change. Input from @pianojoe would be highly appreciated :)
|
I'll look more and respond sometime tomorrow. I'm rather Jamulused-out this evening after 4 days solid. |
from Henk's PR, thanks Henk !
As I wrote above: |
Let me double check....think this is caused by the fact that the qm files are not automatic updating in the deploy windows powershell...building now with updated qm to check. Update: No still happenig with updated qm files. Believe this is an effect from changing Buffer to Jitter (and Jitter buffer) but for some odd reason I can also not locate the English text in the ts file. Guess no lupdate has been performed yet. |
- connect button expands to column width - jitter buffer whatsthis corrected
|
@dcorson-ticino-com I noticed I can now make the settings dialog very narrow. Not sure if that is seen as being an issue or not. About the connect button, think because the left side now expands due to different lenght of text, it became visible that the button does not expand with it. Think making it the same width as the left section would be good. |
I just pushed a correction for the connect button. Please try it out. |
|
Yes. Looks much better now! Thank you! |
|
Yes. But I think that's intended |
hoffie
left a comment
There was a problem hiding this comment.
So, after having a closer look:
- UI-wise, I'm happy
- Code-wise, I'm mostly happy -- see minor nit wrt function naming (plus I only skimmed the .ui files)
- This PR does more than the title says. It not only moves the measurements, it also changes other aspects (labels/texts, resize behavior [?]). In general, this would not be a problem and I consider all of these changes to be good. However, given that this is (hopefully) our rescue against memory leaks in RC1 phase, I'm keen on keeping such changes limited.
-
The text changes invalidate translations (@softins hinted at earlier that as well). This raises new questions:
- Should we run another translation cycle? This will further delay the release. I'd really not do that.
- Should we accept that parts of the UI will be untranslated? It looks like this will "only" affect signal words (
Ping,Jitter) which are likely to be translated verbatim anyway + What's this texts. So it may be acceptable to go this path. - Should we revert the unnecessary updates here (or in a follow-up, 3.8.0-only PR)? Not sure if it's worth the effort...
-
This affects 7 places (according to a
grep '"unfinished"><' src/res/translation/translation_de_DE.ts -ccomparison between master and this PR). -
In any case, I'd suggest not trying to stuff further improvements into this PR, even if they are welcome in general. :)
-
This will have an effect on the translations in any case. The data stream was part of the same whatsthis text as the ping etc. As they are no longer together I had to change them.
I'm not sure about this part. While I think they had been part of the same concatenated string, they had been split into individual translations in the past as well. So it may be possible to retain the translation?
-
@jamulussoftware/maindevelopers What do you think?
In any case, @softins will probably have the final word here after another test run with the current PR state which has the data-rate label re-added.
Thanks for working on this @dcorson-ticino-com! :)
src/clientsettingsdlg.cpp
Outdated
| lblOverallDelayValue->setText ( QString().setNum ( iOverallDelayMs ) ); | ||
| lblOverallDelayUnit->setText ( "ms" ); | ||
| } | ||
| // ping and delay times now in clientdlg |
There was a problem hiding this comment.
Not sure if this comment is really necessary? If a programmer is looking for the ping time, they can use grep or something. If a user is looking for it, they'll most likely not check the code. :)
src/main.cpp
Outdated
| #else | ||
| # if defined( Q_OS_IOS ) | ||
| bUseGUI = true; | ||
| bUseGUI = true; |
There was a problem hiding this comment.
Hrm, does clang-format format it that way? What version are you using? Mine (11.1.0) would revert that change again.
There was a problem hiding this comment.
We comply with the version autobuild uses.
There was a problem hiding this comment.
But, as it appears to be the only change to main.cpp - please revert. And clang-format objected.
See #1762 (comment)
| </qresource> | ||
| <qresource prefix="/translations"> | ||
| <file alias="translation_fr">res/translation/translation_fr_FR.qm</file> | ||
| </qresource> | ||
| <qresource prefix="/translations"> | ||
| <file alias="translation_pt_PT">res/translation/translation_pt_PT.qm</file> | ||
| </qresource> | ||
| <qresource prefix="/translations"> | ||
| <file alias="translation_pt">res/translation/translation_pt_BR.qm</file> | ||
| </qresource> | ||
| <qresource prefix="/translations"> | ||
| <file alias="translation_es">res/translation/translation_es_ES.qm</file> | ||
| </qresource> | ||
| <qresource prefix="/translations"> | ||
| <file alias="translation_nl">res/translation/translation_nl_NL.qm</file> | ||
| </qresource> | ||
| <qresource prefix="/translations"> | ||
| <file alias="translation_it">res/translation/translation_it_IT.qm</file> | ||
| </qresource> | ||
| <qresource prefix="/translations"> | ||
| <file alias="translation_pl">res/translation/translation_pl_PL.qm</file> | ||
| </qresource> | ||
| <qresource prefix="/translations"> | ||
| <file alias="translation_sk">res/translation/translation_sk_SK.qm</file> | ||
| </qresource> | ||
| <qresource prefix="/translations"> | ||
| <file alias="translation_sv">res/translation/translation_sv_SE.qm</file> | ||
| </qresource> | ||
|
|
There was a problem hiding this comment.
This seems to merge different XML nodes to a single one. This sounds ok to me as a layman, but I'm still wondering why that happens (assuming that Qt Creator did this)?
There was a problem hiding this comment.
I'm wondering if some newer version of Qt Creator than the advised "newest" (4.11.0) did this. If so, please revert.
There was a problem hiding this comment.
Hmm ????
I have never touched that file and am using the same version of Qt since the end of last year. Why it should suddenly decide to change something ????
There was a problem hiding this comment.
I have never touched that file
You did:) .... when you added the two image files for the Fancy status LEDs with accessibility markers. Not sure if you did that manually or in Qt of course...
There was a problem hiding this comment.
You can also fix it (and the clang-format errors) like this:
git reset HEAD~
git add (all the other files except src/main.cpp and src/server.h)
git add -p src/resources.qrc
(n to everything except the two new png files)
git commit -m 'your commit message'
git checkout -- src/resources.qrc src/main.cpp src/server.h
(then, of course, test a local build before git push --force)
There was a problem hiding this comment.
I don't think there is a problem with this change. It just built happily on my Pi, and also on the Github CI. It is also more consistent with the sections for other resources.
src/clientsettingsdlg.cpp
Outdated
| QString strConnStats = "<b>" + tr ( "Audio Upstream Rate" ) + ":</b> " + | ||
| tr ( " depends on the current audio packet size and " |
There was a problem hiding this comment.
This part invalidates all translations, even if it may look nicer with the bold formatting.
Independent of that, it looks a bit strange to me. Should probably be Depends (uppercase, no leading space) in the polished version.
| // buffers LED | ||
| QString strLEDBuffers = "<b>" + tr ( "Buffers Status LED" ) + ":</b> " + | ||
| tr ( "The buffers status LED shows the current audio/streaming " | ||
| QString strLEDBuffers = "<b>" + tr ( "Local Jitter Buffer Status LED" ) + ":</b> " + | ||
| tr ( "The local jitter buffer status LED shows the current audio/streaming " | ||
| "status. If the light is red, the audio stream is interrupted. " | ||
| "This is caused by one of the following problems:" ) + |
src/clientdlg.cpp
Outdated
| ledBuffers->setWhatsThis ( strLEDBuffers ); | ||
|
|
||
| ledBuffers->setAccessibleName ( tr ( "Buffers status LED indicator" ) ); | ||
| ledBuffers->setAccessibleName ( tr ( "Local Jitter Buffer status LED indicator" ) ); |
| <widget class="QLabel" name="lblBuffers"> | ||
| <property name="text"> | ||
| <string>Input</string> | ||
| <string>Jitter</string> |
There was a problem hiding this comment.
New translation, probably ok because it's a special word which hopefully makes sense in most translations.
| <item row="0" column="0"> | ||
| <widget class="QLabel" name="lblPing"> | ||
| <property name="text"> | ||
| <string>Ping</string> |
There was a problem hiding this comment.
New translation -- previous was called "Ping time". I guess it'd be ok if untranslated.
|
Option 1: Release 3.8.0 with the known error and working translations, to be followed shortly by 3.8.1 with the fix (and potentially broken translations). Option 2: Release 3.8.0 with the fix and broken translations. Option 3: Delay 3.8.0, include the fix and update the translations. Personally, I'd go with 1 or 2. It depends on how the number of MacOS users compares with the number of translation users. |
|
I wouldn’t go with 1. This bug is already fixed and we shouldn’t ship broken software. Not having a translation isn’t that bad; having a bug is far worse. |
|
Shipping with known, documented defects is perfectly acceptable -- if the impact is small. If the number of people who'd be affected severely adversely by the broken translations was large (which I doubt, to be honest - the area affected is small) and the number of people affected by the bug was small, I'd go with the bug. Conversely, and I tend to believe more likely, if the number affected by the bug is greater, then fixing becomes the priority. But if the number affected by the translations is large, delay becomes an option. |
I'd clearly prefer option 2. My point was just that we could possibly limit the effect of broken translations even without doing another round of translations and delay. @softins did a very good job doing so in other places, but I suspect Tony's time budget is a bit taxed for this release... :) |
|
I have some time to devote to this tomorrow (Sat), and possibly a bit later this evening too. I would prefer option 2 or if we can manage it, 2.5 :) |
-Renamed SetPingTimeResult -> UpdateUploadRate. -Audio rate whatsthis text & added whatsthis to audio rate groupbox. -Removed superfluous comment.
src/clientdlg.cpp
Outdated
| chbChat->setChecked ( true ); | ||
| chbChat->blockSignals ( false ); | ||
| } | ||
| if ( !pClient->IsRunning() ) |
There was a problem hiding this comment.
Should be in CClientDlg::Disconnect()? (I can see you followed how CClientSettingsDlg worked - but it's different in CClientDlg as there's already a home for things like this.)
There was a problem hiding this comment.
Good catch!
Copy paste is good, turning brain on is better :)
| protected: | ||
| virtual void run(); | ||
|
|
||
| bool bRun; |
There was a problem hiding this comment.
Please revert this change. clang-format objected.
See #1762 (comment)
There was a problem hiding this comment.
I did not change this.
If anything changed it, it was clang-format.
|
There is a problem with the Clang-format compliance. |
|
@dcorson-ticino-com I see that this PR was raised from your
When starting to work on a new feature or a bug fix, you should always:
|
Following two weeks of misery at work, I now always recommend |
This reverts the affected texts back to the values that have already been translated, so we can release 3.8.0. The original improvements can be re-applied if required after the release.
softins
left a comment
There was a problem hiding this comment.
I think this is good to merge now. I will check the built Mac artifact when it becomes available, and will merge then, once it has a second approval.
hoffie
left a comment
There was a problem hiding this comment.
Thanks for the updates, @dcorson-ticino-com and @softins!
Approving now, but maybe @pljones can also indicate if the PR is acceptable for him now?
|
Is there another issue raised to cover reinstating the changed reverted? I'd like that done before things are lost... I'd like the unnecessary part of the change to All good to go other than that. |
It's still in the commit history. I don't propose to squash merge. But I've raised an issue for 3.8.1 to keep it visible #1775
OK, done |


The values are not updated on the cleintsettings tab.
I don't think this is too ugly, so it could be workable.
Please test to see if it no longer has memory loss.
The only problem I see is with the stream data rate which is now not
shown. I could imagine to use a static variable to store the last value
and only update when changed, which will be almost never.
I will start now to clean this up with the accessibility stuff, etc.
where it should be. Will not change the functioning.