Jump to content
McKay Development

Yeezy

Member
  • Posts

    10
  • Joined

  • Last visited

Posts posted by Yeezy

  1. Hey, Just wondering if anyone managed to replicate or set the "status" rp key using node-steam, just like FiveM seems to do on sourcemod, not sure if this is possible either currently with node-steam

    https://partner.steamgames.com/doc/api/ISteamFriends#SetRichPresence

    image.thumb.png.2eaf665fff9db58caa8df50cf7f87525.png

     

    https://github.com/citizenfx/fivem/blob/88a0a6c5490f98c31ffdd56b565ac2f21fdfe523/code/components/steam/src/SteamComponent.cpp#L639

    image.thumb.png.6f2ec89b956c94dc48264864ed9c5fb7.png

     

     

    // doesn't work
    client.setPersona(SteamUser.EPersonaState.Online)
    client.gamesPlayed(218) // Source Mod 2007
    client.uploadRichPresence(218, { "status": "FiveM?"})
    
    // works but not what I'm trying to achieve
    client.setPersona(SteamUser.EPersonaState.Online)
    client.gamesPlayed(440) // TF2
    client.uploadRichPresence(440, {
      "steam_display": "#tf_richpresence_display",
      "state": "PlayingGeneric",
      "currentmap": "FiveM?"
    })

     

     

  2. When calling the method logOff(), it automatically reconnects,

    Possibly something wrong with line 53 in connection.js?

    since it believes its not loggingOff it will reconnect automatically when autoRelogin is enabled even though it was called from the logOff method.
    as for a quick dev test, forcing this value to true instead of false seems to fix it but ofc will break it when it tries to reconnect if it goes down due to steam downtime
    image.thumb.png.1b7c77be3883a86b3037159ddb8f2bbb.png


     

  3. 4.28.4 still leaked memory unfortunately.

     

    Running a test currently with the following handlers disabled:

    EMsg.ClientPersonaState
    EMsg.ClientClanState
    EMsg.ClientFriendsList

    It's been looking good so far no memory leak yet (running for 4+ days now)
     

     

  4. I don't have a snapshot from when the server was initialized but I have one from a server that was started at the exact same time and has the same amount of steamUser instances on it.

    If there's anything specific you'd like me to try and/or look at please let me know.

     

    no leak:

    Screenshot2023-05-23at12_41_40.thumb.png.24fdad189eeaba05540e2fa4482014ac.png

    Screenshot2023-05-23at12_41_48.thumb.png.a21f035194750deee6dffb4d93aeed36.png

     

    leaked:

    Screenshot2023-05-23at12_41_00.thumb.png.3998c27e88d3713f4e0bba1e05249129.png

    Screenshot2023-05-23at12_41_33.thumb.png.e69e019a3ca0cd3e2892818b2f2b106e.png

  5. 14 hours ago, Dr. McKay said:

    Between your two screenshots, it kinda looks to me like g_ProcessPersonaSemaphore is somehow hanging at some point. The semaphore is backed by a linked list, and I see a lot of prev pointers in your OP screenshot. I don't really see why it would hang though, all code paths end in releasing the lock. That would also cause SteamID objects to pile up, as you're seeing in your heap snapshot.

    In any case, try 4.28.4 and see if that fixes things for you.

    Thank you, I'll try the update and let you know

  6. There's a possible memory leak in comps/friends.js or comps/familysharing.js
    (edit: I could be wrong about where the leak is)
    (please check my attached image)

    The issue is rare and I'm unable to actively reproduce it yet, However it happens every 7 to 14 days after the App has been running for a while with 150~ instances of steamUser. (no memory leak until it happens)

     I will update this thread as I find more useful details to go on.

     

    the only part of my code which interacts with the steamUserFriends

        steamUser.chat.on('friendMessage', async (message) => {
            if (config.autoReply) {
                if (!client.autoReplyRecipients.includes(message.steamid_friend.getSteamID64())) {
                    client.autoReplyRecipients.push(message.steamid_friend.getSteamID64())
                    steamUser.chat.sendFriendMessage(message.steamid_friend, config.autoReply)
                    setTimeout((removeSteamId) => {
                        client.autoReplyRecipients = client.autoReplyRecipients.filter(steamId => steamId !== removeSteamId)
                    }, 60000, message.steamid_friend.getSteamID64())
                }
            }
        })
    
        steamUser.on('friendRelationship', (sid, relationship) => {
            if (config.autoFriend && relationship == SteamUser.EFriendRelationship.RequestRecipient) {
                steamUser.addFriend(sid)
            }
        })

     

    image.png

×
×
  • Create New...