Jump to content
3DXChat Community

Bug Tracker (3DXChat 2.6)


Gizmo

Recommended Posts

Profiles interfere, reason why iggy, xgold don't work

 

Here is an example:

 

gnwq2yk.jpg

 

the displayed profile the one of Shania. We were in the same room.

 

 

Update. this happens when you check the profile from the chatbox. If you do the same from friendlist....no problem

Link to comment
Share on other sites

When doing this 3way pose my body goes from normal looking to having much smaller boobs, a skinny body, and freakishly long legs. This happend on the test server before the move and its still happening. It wasnt like this before on the old server...

 

and for the love of God PLEASE fix albino Bob!!!  My male building avi looks fine...

post-6858-0-36956300-1542481700_thumb.png

post-6858-0-86638300-1542481776_thumb.png

post-6858-0-99125000-1542481839_thumb.png

Link to comment
Share on other sites

A few corrections to the previous bugfix post. Apparently, the mess with the data in the database has gotten even more complicated since there are now old broken profiles with broken encodings, old broken profiles with normal encodings, and new profiles. Also, the gifts sent after the update has been rolled out don't need to be fixed.

 

For the profiles:

private void LoadProfile(string profileData)
{
    profileData = profileData.Trim();
    if (profileData.StartsWith("{", StringComparison.Ordinal))
    {
        // New JSON profiles
        LoadJsonProfile(profileData);
    }
    else if (profileData.StartsWith("<profile>", StringComparison.Ordinal))
    {
        // Old XML profiles
        LoadXmlProfile(profileData);
    }
    else
    {
        // Some very ancient string-concatenated profiles
        LoadLegacyProfile(profileData);
    }
}

// New JSON profiles
private void LoadJsonProfile(string jsonData)
{
    // Go on with deserialization here
}

// Old XML profiles
private void LoadXmlProfile(string xmlData)
{
    xmlData = FixBrokenUtf8Encoding(xmlData);

    // Since most of the xmls are now malformed, need to rebuild them manually
    StringBuilder sb = new StringBuilder();
    sb.Append("<profile>");
    AppendXmlTag(sb, xmlData, "age", "18", false, true);
    AppendXmlTag(sb, xmlData, "interest", "?", false, true);
    AppendXmlTag(sb, xmlData, "location", "3DXChat", false, true);
    AppendXmlTag(sb, xmlData, "about", "I love 3DXChat!", true, true);
    sb.Append("</profile>");
    xmlData = sb.ToString();

    // Remove illegal XML chars
    xmlData = SanitizeInvalidXmlCharacterReferences(xmlData);

    // Go on with deserialization here
}

// Sorta-fix for an UTF-8 --> Latin1 --> UTF-8 conversion
private string FixBrokenUtf8Encoding(string text)
{
    if (IsValidForEncoding(text, 1252))
    {
        Encoding utf8 = Encoding.UTF8;
        Encoding latin1 = Encoding.GetEncoding(1252);
        byte[] bytes = Encoding.Convert(utf8, latin1, utf8.GetBytes(text));
        return utf8.GetString(bytes);
    }
    return text;
}

// Sorta-check to figure out if we really need to fix the encoding, may misfire
private bool IsValidForEncoding(string text, int codePage)
{
    Encoding encoder = Encoding.GetEncoding(codePage, new EncoderExceptionFallback(), new DecoderExceptionFallback());
    try
    {
        encoder.GetBytes(text);
    }
    catch (EncoderFallbackException)
    {
        return false;
    }
    return true;
}

private void AppendXmlTag(StringBuilder sb, string xmlData, string tag, string defaultValue, bool findMostInnerMatch, bool reparse)
{
    string openTag = $"<{tag}>";
    string closeTag = $"</{tag}>";
    int startIndex;
    int endIndex;
    bool isMatch = false;
    if (findMostInnerMatch)
    {
        // Some profiles saved with client versions 380 and 381 are weirdly malformed and contain nested data, so, need to try and untangle that
        startIndex = xmlData.IndexOf(openTag, StringComparison.Ordinal) + openTag.Length;
        endIndex = startIndex >= openTag.Length && startIndex < xmlData.Length ? xmlData.LastIndexOf(closeTag, xmlData.Length - 1, xmlData.Length - startIndex, StringComparison.Ordinal) : -1;
        while (endIndex > -1)
        {
            isMatch = true;
            xmlData = xmlData.Substring(startIndex, endIndex - startIndex);
            startIndex = xmlData.IndexOf(openTag, StringComparison.Ordinal) + openTag.Length;
            endIndex = startIndex >= openTag.Length && startIndex < xmlData.Length ? xmlData.LastIndexOf(closeTag, xmlData.Length - 1, xmlData.Length - startIndex, StringComparison.Ordinal) : -1;
        }
    }
    else
    {
        startIndex = xmlData.IndexOf(openTag, StringComparison.Ordinal) + openTag.Length;
        endIndex = startIndex >= openTag.Length && startIndex < xmlData.Length ? xmlData.IndexOf(closeTag, startIndex, StringComparison.Ordinal) : -1;
        if (endIndex > -1)
        {
            isMatch = true;
            xmlData = xmlData.Substring(startIndex, endIndex - startIndex);
        }
    }
    if (isMatch)
    {
        if (reparse)
        {
            // Inner values can be a total mess now, so it's easier to just re-encode them
            xmlData = HttpUtility.HtmlEncode(HttpUtility.HtmlDecode(xmlData));
        }
        sb.Append(openTag);
        sb.Append(xmlData);
        sb.Append(closeTag);
    }
    else
    {
        sb.Append(openTag);
        sb.Append(defaultValue);
        sb.Append(closeTag);
    }
}

private static Regex _xmlEncodedCharacterRegex = new Regex("(x?)([A-Fa-f0-9]+);");

private string SanitizeInvalidXmlCharacterReferences(string xmlData)
{
    if (xmlData.IndexOf("", StringComparison.Ordinal) < 0)
    {
        return xmlData;
    }
    return _xmlEncodedCharacterRegex.Replace(
        xmlData,
        match =>
        {
            string matchValue = match.Value;
            uint result;
            bool isParsed =
                matchValue[2] == 'x'
                    ? uint.TryParse(matchValue.Substring(3, matchValue.Length - 4), NumberStyles.AllowHexSpecifier, NumberFormatInfo.InvariantInfo, out result)
                    : uint.TryParse(matchValue.Substring(2, matchValue.Length - 3), NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out result);
            return isParsed && !IsValidXmlChar((char)result)
                ? "�"
                : matchValue;
        });
}

private bool IsValidXmlChar(char character)
{
    return
        character == 0x9 ||
        character == 0xa ||
        character == 0xd ||
        character >= 0x20 && character <= 0xd7ff ||
        character >= 0xe000 && character <= 0xfffd ||
        character >= 0x10000 && character <= 0x10ffff;
}

// Some very ancient string-concatenated profiles
private void LoadLegacyProfile(string profileData)
{
    string[] args = profileData.Split('|');
    if (args.Length < 1)
    {
        return;
    }
    if (args.Length >= 5)
    {
        // Go on with deserialization here
    }
}

For the gifts:

// The time the database was converted
private static DateTime _patch380ReleaseDate = new DateTime(2018, 11, 15, 19, 0, 0, 0, DateTimeKind.Utc);

private string FixBrokenGiftText(string giftText)
{
    // Check if really need to fix the text
    if (giftText != null && timeStamp.ToUniversalTime() < _patch380ReleaseDate)
    {
        // Correct broken encoding
        Encoding utf8 = Encoding.UTF8;
        Encoding latin1 = Encoding.GetEncoding(1252);
        byte[] bytes = Encoding.Convert(utf8, latin1, utf8.GetBytes(giftText));
        giftText = utf8.GetString(bytes);
        
        // Fix some string conversion leftovers
        giftText = giftText.Replace("\\'", "\'");
    }
    return giftText;
}
Link to comment
Share on other sites

Regarding the Bob and Betty issue: you currently have their data switched in the database (i.e. Betty should have id 1 and Bob — id 2). Since they are reverse the client tries to apply female char data to a male and vice versa.

 

Edit:

Correction. Betty now seems to occupy ids 2 and 3, Bob — ids 1 and 4, where ids 1 and 2 have working char data and broken profiles, and ids 3 and 4 have broken char data but working profiles. It's a mess.

Link to comment
Share on other sites

Regarding the Bob and Betty issue: you currently have their data switched in the database (i.e. Betty should have id 1 and Bob — id 2). Since they are reverse the client tries to apply female char data to a male and vice versa.

 

Edit:

Correction. Betty now seems to occupy ids 2 and 3, Bob — ids 1 and 4, where ids 1 and 2 have working char data and broken profiles, and ids 3 and 4 have broken char data but working profiles. It's a mess.

hi alex :) any idea as to why my boob shrink in that pose? 

Link to comment
Share on other sites

In World Editor, every so often the camera will flip upside down so I am looking at the world like I am standing on my head (yes, I am sober). It can be fixed by pressing F6 to return to third person and then selecting F5 for fly cam again, it is just very annoying. Also, to second what Rockster was saying. The fly cam is now faster so it is harder to move the camera to be more precise.

 

Also, I have noticed that people will lower performance PC's are now lagging more and crashing more often. Luckily for me, I hosted a room with 100+ people last night for 4 hours and only crashed on the final song.

 

Also, some more minor glitches that have been around for a while. When someone is playing guitar or drums and they leave the room, the guitar and drums keep playing.

Link to comment
Share on other sites

Apparently the DLL fixes the upside down world and finer grain control of fly cam, would prefer if the devs would fix this though rather than relying on hacks and mods. I definitely notice more lagging in 2.6 and I am running a GTX 1080, I am running on Extremely High settings, but I can run pretty much all major games on Ultra at 4K with no problems, 3DX does seem to be badly optimised for what shouldn't be too taxing for a good GPU.

Link to comment
Share on other sites

I hadn't used this stool or dragged it out of the inventory yet so didn't know if was suitable to sit on, it depends on how high it is and needs to be the same default height as all the other chairs in order for you to be able to sit on it and look natural with your feet (not too high and not falling through the floor), so I just went in and tested it out for you and I can confirm that it is the right height to sit on and look natural, all you need to do is bring out an invisible chair sit command from the inventory and place it on the stool and you can use it as any other chair, just make sure you tweak the height of the command prop to make it look natural and your bum and legs are in the right place relating to the top and front, and make sure it is centered in the middle and facing toward one of the sides without the wood coming up. I made you two screenshots to help.

 

stool-1.jpg

 

stool-2.jpg

 

Thank You, Rockster, o.c. I knew this workaround before, I only wanted to report an obvious bug here to have it documented, if not fixed somewhen :D

Link to comment
Share on other sites

BUG ALERT!

Yips we still have a bug with tha profiles, still.

 

Ok if you click on some ones AVI and their profile comes straight ups, fo me eets middle mouse button.

 

From their profile you click Pvte Message tab and their name is tagged onto your chatbox. If you now click their name on ya chatbox, view profile you either get a blank window or eet will show tha first persons profile ya viewed fo their profile with their name on eet but all info and pics are from tha other profile and every other person you try this with will show that very same profile fo everyone.

 

For example ah get tha profile for Melinaaa fo every other persons profile ah try to view using this procedure tha person ah click on will have their name up top of tha profile but tha actual profile and pics etc are of Melinaaa's.

 

At first ah thought everyone is dang Melinaaa but siwwee me ah remembered tings neva really get fixed here, mostlee :P

Link to comment
Share on other sites

BUG ALERT!

Yips we still have a bug with tha profiles, still.

 

Ok if you click on some ones AVI and their profile comes straight ups, fo me eets middle mouse button.

 

From their profile you click Pvte Message tab and their name is tagged onto your chatbox. If you now click their name on ya chatbox, view profile you either get a blank window or eet will show tha first persons profile ya viewed fo their profile and every other person you try this with will show that very same profile fo everyone. For example ah get tha profile for Melinaaa fo every other persons profile ah try to view using this procedure. 

 

At first ah thought everyone is dang Melinaaa but siwwee me ah remembered tings neva really get fixed here, mostlee :P

yep same here :o

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...