Mudlet/Mudlet

Core.Hello (at least in PTB) is showing the version in Core.Hello trailing with a \n

gesslar opened this issue · 13 comments

In 4.17.2, the Core.Hello message does not include a trailing \n, but the PTB does. I don't know if this will, when it goes live, include the \n, but I would like this looked at, please to ensure that this does not end up going live.

Example:

OBJ(nukara /std/user#1234356)-> gmcp_query_client()    = ([ "client" : "Mudlet", "version" : "4.17.2" ])
OBJ(xihuana /std/user#1234382)-> gmcp_query_client()    = ([ "client" : "Mudlet", "version" : "4.17.2" ])
OBJ(gesslar /std/user#5)-> gmcp_query_client()    = ([ "client" : "Mudlet", version" : "4.17.2bfd0c9a6\n" ])
OBJ(karahd /std/user#130)-> gmcp_query_client()    = ([ "client" : "Mudlet", "version" : "4.17.2bfd0c9a6\n" ])
OBJ(jaxazon /std/connection#1410318)-> gmcp_query_client()    = ([ "client" : Mudlet", "version" : "4.17.2" ])

Line where the Core.Hello is sent:

output += encodeAndCookBytes(std::string(R"(Core.Hello { "client": "Mudlet", "version": ")") + APP_VERSION + mudlet::self()->mAppBuild.toUtf8().constData() + std::string(R"("})"));

Line where the build is pulled into the variable that is referenced in Core.Hello:

QFile gitShaFile(":/app-build.txt");

Potential PR that introduced it:
#6822

I'll have a look into this. Thank you for reporting it early!

Not only is there the trailing \n in the GMCP message, but also that version number is formatted as 4.17.2bfd0c9a6 instead of one with a date in it. There is some other weird stuff happening lately presumably due to handling of the version number. On Windows the PTB starting on Jan 21 have shown up in the taskbar with icon for development version instead of PTB version. The About dialog has the art for dev version. I just noticed yesterday that the PTB installer is overwriting the normal release Mudlet shortcut and pointing it at the PTB. So in some aspects it is acting like development or release versions. I'm guessing that there is some build script part that flags it as PTB by checking if it fits a pattern that no longer fits due to the \n.

@gesslar have a look at testing #7138. Does it work better?

@atari2600tim that is a very strange version number. What kind of a build was 4.17.2bfd0c9a6?

In the original report gesslar shows the result in-game when he queries users for their reported gmcp info. gesslar and karahd are his characters, and said he was using PTB. Looking at range between Feb 3 when the report was made and leading up to it, none of them have bfd0c in the file name.

01/02/2024  12:18 PM        55,974,792 Mudlet-4.17.2-ptb-2024-01-02-bf6e3-windows.exe
01/04/2024  12:04 PM        55,974,280 Mudlet-4.17.2-ptb-2024-01-03-c8a10-windows.exe
01/08/2024  01:25 PM        55,978,376 Mudlet-4.17.2-ptb-2024-01-04-0513d-windows.exe
01/08/2024  01:25 PM        55,992,712 Mudlet-4.17.2-ptb-2024-01-06-aef71-windows.exe
01/08/2024  01:25 PM        56,000,904 Mudlet-4.17.2-ptb-2024-01-08-144b2-windows.exe
01/11/2024  12:45 PM        55,998,344 Mudlet-4.17.2-ptb-2024-01-11-0b4d5-windows.exe
01/14/2024  10:16 AM        56,001,416 Mudlet-4.17.2-ptb-2024-01-13-1c041-windows.exe
01/18/2024  03:30 PM        56,001,416 Mudlet-4.17.2-ptb-2024-01-16-0301f-windows.exe
01/18/2024  03:30 PM        56,001,416 Mudlet-4.17.2-ptb-2024-01-18-3bd76-windows.exe
01/21/2024  08:33 PM        56,001,416 Mudlet-4.17.2-ptb-2024-01-19-68cdd-windows.exe
01/23/2024  10:02 PM        56,000,904 Mudlet-4.17.2-ptb-2024-01-20-d260c-windows.exe
01/21/2024  08:33 PM        55,951,752 Mudlet-4.17.2-ptb-2024-01-21-35144-windows.exe
01/25/2024  09:35 AM        55,951,240 Mudlet-4.17.2-ptb-2024-01-24-1899c-windows.exe
02/03/2024  10:58 AM        55,951,752 Mudlet-4.17.2-ptb-2024-01-27-09d4b-windows.exe
02/03/2024  10:59 AM        55,951,752 Mudlet-4.17.2-ptb-2024-01-28-4756d-windows.exe
02/03/2024  10:59 AM        55,951,752 Mudlet-4.17.2-ptb-2024-01-30-d7fb2-windows.exe
02/03/2024  11:00 AM        55,951,240 Mudlet-4.17.2-ptb-2024-01-31-10bd3-windows.exe
02/09/2024  12:54 AM        55,950,728 Mudlet-4.17.2-ptb-2024-02-05-c74ae-windows.exe
02/09/2024  12:55 AM        55,951,240 Mudlet-4.17.2-ptb-2024-02-07-2f58f-windows.exe
02/09/2024  12:55 AM        55,962,504 Mudlet-4.17.2-ptb-2024-02-09-02293-windows.exe

Looking at my current one, Mudlet-4.17.2-ptb-2024-02-09-02293-windows.exe is calling itself Mudlet 4.17.202293acc. Looking at the snapshot download list, I don't see any files with bfd0c in the name.

@gesslar can you retry with current ptb and see what it says?

This of courses makes one wonder if the revised caching has gone wrong somewhere.

The \n is gone.

And the taskbar icon is now properly the correct icon that I remember. I had noticed this was different before, but was reminded of it from @atari2600tim's comment.

OBJ(jaxazon /std/connection#1810481)-> gmcp_query_client()	= ([ "client" : "Mudlet", "version" : "4.17.2" ])
OBJ(gesslar /std/user#5)-> gmcp_query_client()	= ([ "client" : "Mudlet", "version" : "4.17.22a2de6c9" ])
OBJ(karahd /std/user#130)-> gmcp_query_client()	= ([ "client" : "Mudlet", "version" : "4.17.22a2de6c9" ])

Hmm, the version is still not quite right - but at the same time, I don't remember what it used to show before for test builds 🤔

IIRC one issue is that the code that reads the resource file does not reliably strip off any white-space that one of the writers (eithercmake or qmake) puts in. I am frantically trying to recover a fix for these issues that I proto-typed last week which I know I have stashed away on my (currently dead 🧟) main PC - I think I can get to it by mounting the drive in another machine which I intend to try in the hour....

On Windows the PTB starting on Jan 21 have shown up in the taskbar with icon for development version instead of PTB version. The About dialog has the art for dev version. I just noticed yesterday that the PTB installer is overwriting the normal release Mudlet shortcut and pointing it at the PTB

Compare #7141

@vadi2 wrote:

This of courses makes one wonder if the revised caching has gone wrong somewhere.

@atari2600tim wrote (on 2024-01-24 in Discord):

PTB 1-20-d260c is good, and 1-21-35144 has the date missing from the version name like your screenshot plus the icon and About window is that art instead of the PTB one. Those are consecutive so it is something in #6822

I think this might also be improved by #7139 .