mumble-voip / mumble

Mumble is an open-source, low-latency, high quality voice chat software.
https://www.mumble.info
Other
6.13k stars 1.1k forks source link

[question] Inconsistent client behaviour when receiving long text messages. #3413

Open BafDyce opened 6 years ago

BafDyce commented 6 years ago

When sending very long text messages, there is some inconsistent behaviours by the official mumble clients. First some facts:

The following behaviour is observed:

So, while the server accepts the messages and forwards it to the official clients, all of them handle them differently. We could not find any setting which would control this behavior, so we assumed that it's controlled by some hard-coded value in the source code. However, by reading/searching through the source code I could not find the source code in judge of this.

My primary questions now are:

hacst commented 6 years ago

That code can be found in Log.cpp (https://github.com/mumble-voip/mumble/blob/master/src/mumble/Log.cpp#L429):

    int messageSize = s.width() * s.height();
    int allowedSize = 2048 * 2048;

    if (messageSize > allowedSize) {
QString errorSizeMessage = tr("[[ Text object too large to display ]]");

It checks the potential rendered screen surface area in pixels of the message. The idea was limit display size as with html formatting even very short text can be made to take up pretty much arbitrary screen space. I'm not sure in what way this interacts with DPI / scaling configurations but I doubt they those were a considerations when this was introduced.

I assume the inconsistencies you are seeing are due to text rendering differences on the different plattforms, versions and/or systems you tested.

This also means you cannot really know how big your message can get before the client decides it is to big for it to render as that depends on client-side (system) configuration. If you want to be reasonably sure it is displayed cap it before it well before it gets to the limit on a normally configured system.